Version Description
- fixed serious bug not uploading files when captcha is enabled
- fixed bug not redirecting files when email notification is enabled
Download this release
Release Info
Developer | nickboss |
Plugin | WordPress File Upload |
Version | 2.5.5 |
Comparing to | |
See all releases |
Code changes from version 2.5.4 to 2.5.5
- js/wordpress_file_upload_functions.js +8 -4
- lib/wfu_ajaxactions.php +1 -1
- lib/wfu_functions.php +5 -0
- readme.txt +7 -0
- wordpress_file_upload.php +1 -1
js/wordpress_file_upload_functions.js
CHANGED
@@ -553,10 +553,10 @@ function wfu_uploadComplete(evt) {
|
|
553 |
}
|
554 |
if (upload_params == "" || safe_params == "") {
|
555 |
// upload_params is passed as object, so no need to pass a safe_output string
|
556 |
-
last = wfu_ProcessUploadComplete(sid, this.file_id, Params, this.unique_id, this.params_index, this.session_token, "", [this.debugmode, debug_data, this.is_admin]);
|
557 |
}
|
558 |
else {
|
559 |
-
last = wfu_ProcessUploadComplete(sid, this.file_id, upload_params, this.unique_id, this.params_index, this.session_token, safe_params, [this.debugmode, debug_data, this.is_admin]);
|
560 |
}
|
561 |
if (last) {
|
562 |
wfu_unlock_upload(evt.target.shortcode_id);
|
@@ -568,7 +568,7 @@ function wfu_uploadComplete(evt) {
|
|
568 |
}
|
569 |
|
570 |
// wfu_ProcessUploadComplete: function to perform actions after successfull upload
|
571 |
-
function wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data) {
|
572 |
// initial checks to process or not the data
|
573 |
if (!sid || sid < 0) return;
|
574 |
if (upload_params == null || upload_params == "") return;
|
@@ -690,7 +690,7 @@ function wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, param
|
|
690 |
G.files_processed += Params.general.files_count;
|
691 |
G.message = wfu_join_strings("<br />", G.message, Params.general.message);
|
692 |
if (G.update_wpfilebase == "") G.update_wpfilebase = Params.general.update_wpfilebase;
|
693 |
-
G.redirect_link = Params.general.redirect_link;
|
694 |
G.notify_only_filename_list = wfu_join_strings(", ", G.notify_only_filename_list, Params.general.notify_only_filename_list);
|
695 |
G.notify_target_path_list = wfu_join_strings(", ", G.notify_target_path_list, Params.general.notify_target_path_list);
|
696 |
G.notify_attachment_list = wfu_join_strings(",", G.notify_attachment_list, Params.general.notify_attachment_list);
|
@@ -1084,6 +1084,10 @@ function wfu_HTML5UploadFile(sid, JSONtext, session_token) {
|
|
1084 |
//check if a subfolder has been selected (in case askforsubfolders is on)
|
1085 |
if (!wfu_selectsubdir_check(sid)) return;
|
1086 |
|
|
|
|
|
|
|
|
|
1087 |
|
1088 |
// check if there are empty user data fields that are required
|
1089 |
if (!wfu_check_required_userdata(sid)) return;
|
553 |
}
|
554 |
if (upload_params == "" || safe_params == "") {
|
555 |
// upload_params is passed as object, so no need to pass a safe_output string
|
556 |
+
last = wfu_ProcessUploadComplete(sid, this.file_id, Params, this.unique_id, this.params_index, this.session_token, "", [this.debugmode, debug_data, this.is_admin], this.requesttype);
|
557 |
}
|
558 |
else {
|
559 |
+
last = wfu_ProcessUploadComplete(sid, this.file_id, upload_params, this.unique_id, this.params_index, this.session_token, safe_params, [this.debugmode, debug_data, this.is_admin], this.requesttype);
|
560 |
}
|
561 |
if (last) {
|
562 |
wfu_unlock_upload(evt.target.shortcode_id);
|
568 |
}
|
569 |
|
570 |
// wfu_ProcessUploadComplete: function to perform actions after successfull upload
|
571 |
+
function wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type) {
|
572 |
// initial checks to process or not the data
|
573 |
if (!sid || sid < 0) return;
|
574 |
if (upload_params == null || upload_params == "") return;
|
690 |
G.files_processed += Params.general.files_count;
|
691 |
G.message = wfu_join_strings("<br />", G.message, Params.general.message);
|
692 |
if (G.update_wpfilebase == "") G.update_wpfilebase = Params.general.update_wpfilebase;
|
693 |
+
if (!request_type || (request_type && request_type != "email")) G.redirect_link = Params.general.redirect_link;
|
694 |
G.notify_only_filename_list = wfu_join_strings(", ", G.notify_only_filename_list, Params.general.notify_only_filename_list);
|
695 |
G.notify_target_path_list = wfu_join_strings(", ", G.notify_target_path_list, Params.general.notify_target_path_list);
|
696 |
G.notify_attachment_list = wfu_join_strings(",", G.notify_attachment_list, Params.general.notify_attachment_list);
|
1084 |
//check if a subfolder has been selected (in case askforsubfolders is on)
|
1085 |
if (!wfu_selectsubdir_check(sid)) return;
|
1086 |
|
1087 |
+
//calculate number of passes from number of files
|
1088 |
+
var numpasses = numfiles;
|
1089 |
+
//reconsider numpasses and include also the check passes
|
1090 |
+
numpasses += numpasses;
|
1091 |
|
1092 |
// check if there are empty user data fields that are required
|
1093 |
if (!wfu_check_required_userdata(sid)) return;
|
lib/wfu_ajaxactions.php
CHANGED
@@ -84,7 +84,7 @@ function wfu_ajax_action_callback() {
|
|
84 |
}
|
85 |
|
86 |
//the first pass to this callback script is for closing the previous connection_aborted
|
87 |
-
if ( $_POST["force_connection_close"] === "1" ) {
|
88 |
header("Connection: Close");
|
89 |
die("success");
|
90 |
}
|
84 |
}
|
85 |
|
86 |
//the first pass to this callback script is for closing the previous connection_aborted
|
87 |
+
if ( isset($_POST["force_connection_close"]) && $_POST["force_connection_close"] === "1" ) {
|
88 |
header("Connection: Close");
|
89 |
die("success");
|
90 |
}
|
lib/wfu_functions.php
CHANGED
@@ -295,6 +295,11 @@ function wfu_compare_versions($current, $latest) {
|
|
295 |
return array( 'status' => true, 'custom' => $custom, 'result' => 'equal' );
|
296 |
}
|
297 |
|
|
|
|
|
|
|
|
|
|
|
298 |
//********************* Directory Functions ************************************************************************************************
|
299 |
|
300 |
function wfu_upload_plugin_full_path( $params ) {
|
295 |
return array( 'status' => true, 'custom' => $custom, 'result' => 'equal' );
|
296 |
}
|
297 |
|
298 |
+
function wfu_debug_log($message) {
|
299 |
+
$logpath = WP_CONTENT_DIR.'/debug_log.txt';
|
300 |
+
file_put_contents($logpath, $message, FILE_APPEND);
|
301 |
+
}
|
302 |
+
|
303 |
//********************* Directory Functions ************************************************************************************************
|
304 |
|
305 |
function wfu_upload_plugin_full_path( $params ) {
|
readme.txt
CHANGED
@@ -110,6 +110,10 @@ Administrators can view and manage the uploaded files from the File Browser that
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
113 |
= 2.5.4 =
|
114 |
* mitigated issue with "Session failed" errors appearing randomly in websites
|
115 |
* fixed bug not applying %filename% variable inside redirect link
|
@@ -351,6 +355,9 @@ Initial version.
|
|
351 |
|
352 |
== Upgrade Notice ==
|
353 |
|
|
|
|
|
|
|
354 |
= 2.5.4 =
|
355 |
Important upgrade to address some bugs.
|
356 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 2.5.5 =
|
114 |
+
* fixed serious bug not uploading files when captcha is enabled
|
115 |
+
* fixed bug not redirecting files when email notification is enabled
|
116 |
+
|
117 |
= 2.5.4 =
|
118 |
* mitigated issue with "Session failed" errors appearing randomly in websites
|
119 |
* fixed bug not applying %filename% variable inside redirect link
|
355 |
|
356 |
== Upgrade Notice ==
|
357 |
|
358 |
+
= 2.5.5 =
|
359 |
+
Important upgrade to address some bugs.
|
360 |
+
|
361 |
= 2.5.4 =
|
362 |
Important upgrade to address some bugs.
|
363 |
|
wordpress_file_upload.php
CHANGED
@@ -4,7 +4,7 @@ session_start();
|
|
4 |
/*
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
-
Version: 2.5.
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|
4 |
/*
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
+
Version: 2.5.5
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|