Simple 301 Redirects – Addon – Bulk Uploader - Version 1.0.1

Version Description

  • Update to uploader to read the file coming from a PC
Download this release

Release Info

Developer ashdurham
Plugin Icon 128x128 Simple 301 Redirects – Addon – Bulk Uploader
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0 to 1.0.1

Files changed (2) hide show
  1. readme.txt +6 -0
  2. simple-301-bulk-uploader.php +7 -6
readme.txt CHANGED
@@ -68,10 +68,16 @@ Have a question thats not listed? Get support either on the support forums here
68
 
69
  == Changelog ==
70
 
 
 
 
71
  = 1.0 =
72
  * Initial
73
 
74
  == Upgrade Notice ==
75
 
 
 
 
76
  = 1.0 =
77
  * Gotta start somewhere
68
 
69
  == Changelog ==
70
 
71
+ = 1.0.1 =
72
+ * Update to uploader to read the file coming from a PC
73
+
74
  = 1.0 =
75
  * Initial
76
 
77
  == Upgrade Notice ==
78
 
79
+ = 1.0.1 =
80
+ * Update to uploader to read the file coming from a PC
81
+
82
  = 1.0 =
83
  * Gotta start somewhere
simple-301-bulk-uploader.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple 301 Redirects - Addon - Bulk CSV Uploader
4
  Plugin URI: http://kingpro.me/plugins/support-plugins/simple-301-redirects-addon-bulk-csv-uploader
5
  Description: Adds the ability to upload a CSV to populate the Simple 301 Redirects plugin
6
- Version: 1.0.0
7
  Author: Ash Durham
8
  Author URI: http://durham.net.au/
9
  License: GPL2
@@ -94,14 +94,14 @@ if (!class_exists("Bulk301Uploader")) {
94
  $temp = explode(".", $data["name"]);
95
  $extension = end($temp);
96
  $report = '';
97
-
98
- if (($data["type"] == "text/csv")
99
- && ($data["size"] < 1000000)
100
  && in_array($extension, $allowedExts))
101
  {
102
  if ($data["error"] > 0)
103
  {
104
- echo "Return Code: " . $data["error"] . "<br>";
105
  }
106
  else
107
  {
@@ -128,7 +128,8 @@ if (!class_exists("Bulk301Uploader")) {
128
  }
129
  else
130
  {
131
- $report .= "Invalid file";
 
132
  }
133
 
134
  return $report;
3
  Plugin Name: Simple 301 Redirects - Addon - Bulk CSV Uploader
4
  Plugin URI: http://kingpro.me/plugins/support-plugins/simple-301-redirects-addon-bulk-csv-uploader
5
  Description: Adds the ability to upload a CSV to populate the Simple 301 Redirects plugin
6
+ Version: 1.0.1
7
  Author: Ash Durham
8
  Author URI: http://durham.net.au/
9
  License: GPL2
94
  $temp = explode(".", $data["name"]);
95
  $extension = end($temp);
96
  $report = '';
97
+
98
+ if ((($data["type"] == "text/csv") || ($data["type"] == "application/vnd.ms-excel"))
99
+ && ($data["size"] < 10000000)
100
  && in_array($extension, $allowedExts))
101
  {
102
  if ($data["error"] > 0)
103
  {
104
+ $report .= "Return Code: " . $data["error"] . "<br>";
105
  }
106
  else
107
  {
128
  }
129
  else
130
  {
131
+ $report .= "Invalid file. Use the below for debugging and when asking for support.<br /><br />";
132
+ $report .= "File: ".print_r($data, 1);
133
  }
134
 
135
  return $report;