WordPress File Upload - Version 2.2.3

Version Description

  • correction of bug that was freezing the Shortcode Composer in some cases
  • correction of bug with successmessage attribute
Download this release

Release Info

Developer nickboss
Plugin Icon 128x128 WordPress File Upload
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

lib/wfu_processfiles.php CHANGED
@@ -323,7 +323,7 @@ function wfu_process_files($params, $method) {
323
  $file_output['color'] = $color_array[0];
324
  $file_output['bgcolor'] = $color_array[1];
325
  $file_output['borcolor'] = $color_array[2];
326
- $file_output['header'] = preg_replace($search, $replace, WFU_SUCCESSMESSAGE);
327
  /* prepare details of successful file upload, visible only to administrator */
328
  $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_SUCCESSMESSAGE_DETAILS), $file_output['admin_messages']);
329
  }
@@ -334,7 +334,7 @@ function wfu_process_files($params, $method) {
334
  $file_output['color'] = $color_array[0];
335
  $file_output['bgcolor'] = $color_array[1];
336
  $file_output['borcolor'] = $color_array[2];
337
- $file_output['header'] = preg_replace($search, $replace, WFU_WARNINGMESSAGE);
338
  /* prepare and prepend details of successful file upload, visible only to administrator */
339
  $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_SUCCESSMESSAGE_DETAILS), $file_output['admin_messages']);
340
  }
@@ -349,7 +349,7 @@ function wfu_process_files($params, $method) {
349
  $only_filename = wfu_upload_plugin_clean( $fileprops['name'] );
350
  $target_path = wfu_upload_plugin_full_path($params).$only_filename;
351
  $replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename, $target_path);
352
- $file_output['header'] = preg_replace($search, $replace, WFU_ERRORMESSAGE);
353
  /* prepare and prepend details of failed file upload, visible only to administrator */
354
  $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_FAILMESSAGE_DETAILS), $file_output['admin_messages']);
355
  }
323
  $file_output['color'] = $color_array[0];
324
  $file_output['bgcolor'] = $color_array[1];
325
  $file_output['borcolor'] = $color_array[2];
326
+ $file_output['header'] = preg_replace($search, $replace, $params['successmessage']);
327
  /* prepare details of successful file upload, visible only to administrator */
328
  $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_SUCCESSMESSAGE_DETAILS), $file_output['admin_messages']);
329
  }
334
  $file_output['color'] = $color_array[0];
335
  $file_output['bgcolor'] = $color_array[1];
336
  $file_output['borcolor'] = $color_array[2];
337
+ $file_output['header'] = preg_replace($search, $replace, $params['warningmessage']);
338
  /* prepare and prepend details of successful file upload, visible only to administrator */
339
  $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_SUCCESSMESSAGE_DETAILS), $file_output['admin_messages']);
340
  }
349
  $only_filename = wfu_upload_plugin_clean( $fileprops['name'] );
350
  $target_path = wfu_upload_plugin_full_path($params).$only_filename;
351
  $replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename, $target_path);
352
+ $file_output['header'] = preg_replace($search, $replace, $params['errormessage']);
353
  /* prepare and prepend details of failed file upload, visible only to administrator */
354
  $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_FAILMESSAGE_DETAILS), $file_output['admin_messages']);
355
  }
readme.txt CHANGED
@@ -101,6 +101,10 @@ The plugin is designed not to expose website information by using sessions. Para
101
 
102
  == Changelog ==
103
 
 
 
 
 
104
  = 2.2.2 =
105
  * serious bug fixed that was breaking operation of Shortcode Composer and File Browser when the Wordpress website is in a subdirectory
106
 
@@ -259,6 +263,9 @@ Initial version.
259
 
260
  == Upgrade Notice ==
261
 
 
 
 
262
  = 2.2.2 =
263
  Important upgrade to address some serious bugs.
264
 
101
 
102
  == Changelog ==
103
 
104
+ = 2.2.3 =
105
+ * correction of bug that was freezing the Shortcode Composer in some cases
106
+ * correction of bug with successmessage attribute
107
+
108
  = 2.2.2 =
109
  * serious bug fixed that was breaking operation of Shortcode Composer and File Browser when the Wordpress website is in a subdirectory
110
 
263
 
264
  == Upgrade Notice ==
265
 
266
+ = 2.2.3 =
267
+ Upgrade to address some minor bugs.
268
+
269
  = 2.2.2 =
270
  Important upgrade to address some serious bugs.
271
 
wordpress_file_upload.php CHANGED
@@ -4,7 +4,7 @@ session_start();
4
  Plugin Name: Wordpress File Upload
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
- Version: 2.2.2
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
@@ -29,15 +29,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
29
  */
30
 
31
  /* do not load plugin if this is the login page */
32
- global $pagenow;
33
- if ( 'wp-login.php' == $pagenow ) return;
34
 
35
  DEFINE("WPFILEUPLOAD_DIR", '/'.PLUGINDIR .'/'.dirname(plugin_basename (__FILE__)).'/');
36
  add_shortcode("wordpress_file_upload", "wordpress_file_upload_handler");
37
  load_plugin_textdomain('wordpress-file-upload', false, dirname(plugin_basename (__FILE__)).'/languages');
38
  /* do not load styles and scripts in admin pages */
39
  if ( is_admin() ) {
40
- if ( $pagenow == "options-general.php" ) {
41
  wp_enqueue_style('wordpress-file-upload-admin-style', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_adminstyle.css',false,'1.0','all');
42
  wp_enqueue_style( 'wp-color-picker' );
43
  wp_enqueue_script('wordpress_file_upload_admin_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_adminfunctions.js', array( 'wp-color-picker' ), false, true);
4
  Plugin Name: Wordpress File Upload
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
+ Version: 2.2.3
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
29
  */
30
 
31
  /* do not load plugin if this is the login page */
32
+ $uri = $_SERVER['REQUEST_URI'];
33
+ if ( strpos($uri, 'wp-login.php') !== false ) return;
34
 
35
  DEFINE("WPFILEUPLOAD_DIR", '/'.PLUGINDIR .'/'.dirname(plugin_basename (__FILE__)).'/');
36
  add_shortcode("wordpress_file_upload", "wordpress_file_upload_handler");
37
  load_plugin_textdomain('wordpress-file-upload', false, dirname(plugin_basename (__FILE__)).'/languages');
38
  /* do not load styles and scripts in admin pages */
39
  if ( is_admin() ) {
40
+ if ( strpos($uri, "options-general.php") !== false ) {
41
  wp_enqueue_style('wordpress-file-upload-admin-style', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_adminstyle.css',false,'1.0','all');
42
  wp_enqueue_style( 'wp-color-picker' );
43
  wp_enqueue_script('wordpress_file_upload_admin_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_adminfunctions.js', array( 'wp-color-picker' ), false, true);