Version Description
- fixed important bug in free version not correctly showing message after failed upload
Download this release
Release Info
Developer | nickboss |
Plugin | WordPress File Upload |
Version | 2.5.2 |
Comparing to | |
See all releases |
Code changes from version 2.5.1 to 2.5.2
- js/wordpress_file_upload_functions.js +6 -0
- lib/wfu_admin.php +26 -8
- lib/wfu_admin_browser.php +3 -2
- lib/wfu_admin_composer.php +6 -3
- lib/wfu_admin_log.php +4 -3
- readme.txt +6 -0
- wordpress_file_upload.php +1 -1
js/wordpress_file_upload_functions.js
CHANGED
@@ -671,6 +671,12 @@ function wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, param
|
|
671 |
else {
|
672 |
if (G.unique_id == "" || G.unique_id != unique_id || G.unique_id != Params.general.unique_id) return;
|
673 |
if (G.last) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
var file_status = "";
|
675 |
for (var i = 0; i < Params.general.files_count; i++) {
|
676 |
// define new upload state based on the status of current file
|
671 |
else {
|
672 |
if (G.unique_id == "" || G.unique_id != unique_id || G.unique_id != Params.general.unique_id) return;
|
673 |
if (G.last) return;
|
674 |
+
if (Params.general.files_count == 0 && Params[0]) {
|
675 |
+
if (Params[0].message_type == "error") {
|
676 |
+
//notify that file has finished by setting files_count to 1
|
677 |
+
Params.general.files_count = 1;
|
678 |
+
}
|
679 |
+
}
|
680 |
var file_status = "";
|
681 |
for (var i = 0; i < Params.general.files_count; i++) {
|
682 |
// define new upload state based on the status of current file
|
lib/wfu_admin.php
CHANGED
@@ -88,7 +88,6 @@ function wordpress_file_upload_update_db_check() {
|
|
88 |
|
89 |
// This is the callback function that generates dashboard page content
|
90 |
function wordpress_file_upload_manage_dashboard() {
|
91 |
-
global $wpdb;
|
92 |
$_POST = stripslashes_deep($_POST);
|
93 |
$_GET = stripslashes_deep($_GET);
|
94 |
$action = (!empty($_POST['action']) ? $_POST['action'] : (!empty($_GET['action']) ? $_GET['action'] : ''));
|
@@ -152,30 +151,33 @@ function wordpress_file_upload_manage_dashboard() {
|
|
152 |
}
|
153 |
elseif ( $action == 'sync_db' ) {
|
154 |
$affected_items = wfu_sync_database();
|
155 |
-
$echo_str =
|
|
|
|
|
|
|
156 |
}
|
157 |
else {
|
158 |
-
$echo_str =
|
159 |
}
|
160 |
|
161 |
echo $echo_str;
|
162 |
}
|
163 |
|
164 |
-
function
|
165 |
if ( !current_user_can( 'manage_options' ) ) return wfu_shortcode_composer();
|
166 |
|
167 |
-
global $wpdb;
|
168 |
$siteurl = site_url();
|
169 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
170 |
|
171 |
-
$echo_str = '<div class="
|
172 |
$echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
|
173 |
if ( $message != '' ) {
|
174 |
$echo_str .= "\n\t".'<div class="updated">';
|
175 |
$echo_str .= "\n\t\t".'<p>'.$message.'</p>';
|
176 |
$echo_str .= "\n\t".'</div>';
|
177 |
}
|
178 |
-
$echo_str .= "\n\t".'<div style="margin-top:
|
|
|
179 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser" class="button" title="File browser">File Browser</a>';
|
180 |
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=shortcode_composer" class="button" title="Shortcode composer">Shortcode Composer</a>';
|
181 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=view_log" class="button" title="View log">View Log</a>';
|
@@ -228,7 +230,23 @@ function wfu_manage_settings($message = '') {
|
|
228 |
$echo_str .= "\n\t\t\t\t".'</tr>';
|
229 |
$echo_str .= "\n\t\t\t".'</tbody>';
|
230 |
$echo_str .= "\n\t\t".'</table>';
|
231 |
-
$echo_str .= "\n\t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
$echo_str .= "\n\t\t".'<form enctype="multipart/form-data" name="editsettings" id="editsettings" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=edit_settings" class="validate">';
|
233 |
$nonce = wp_nonce_field('wfu_edit_admin_settings', '_wpnonce', false, false);
|
234 |
$nonce_ref = wp_referer_field(false);
|
88 |
|
89 |
// This is the callback function that generates dashboard page content
|
90 |
function wordpress_file_upload_manage_dashboard() {
|
|
|
91 |
$_POST = stripslashes_deep($_POST);
|
92 |
$_GET = stripslashes_deep($_GET);
|
93 |
$action = (!empty($_POST['action']) ? $_POST['action'] : (!empty($_GET['action']) ? $_GET['action'] : ''));
|
151 |
}
|
152 |
elseif ( $action == 'sync_db' ) {
|
153 |
$affected_items = wfu_sync_database();
|
154 |
+
$echo_str = wfu_manage_mainmenu('Database updated. '.$affected_items.' items where affected.');
|
155 |
+
}
|
156 |
+
elseif ( $action == 'plugin_settings' ) {
|
157 |
+
$echo_str = wfu_manage_settings();
|
158 |
}
|
159 |
else {
|
160 |
+
$echo_str = wfu_manage_mainmenu();
|
161 |
}
|
162 |
|
163 |
echo $echo_str;
|
164 |
}
|
165 |
|
166 |
+
function wfu_manage_mainmenu($message = '') {
|
167 |
if ( !current_user_can( 'manage_options' ) ) return wfu_shortcode_composer();
|
168 |
|
|
|
169 |
$siteurl = site_url();
|
170 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
171 |
|
172 |
+
$echo_str = '<div class="wrap">';
|
173 |
$echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
|
174 |
if ( $message != '' ) {
|
175 |
$echo_str .= "\n\t".'<div class="updated">';
|
176 |
$echo_str .= "\n\t\t".'<p>'.$message.'</p>';
|
177 |
$echo_str .= "\n\t".'</div>';
|
178 |
}
|
179 |
+
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
180 |
+
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=plugin_settings" class="button" title="Settings">Settings</a>';
|
181 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser" class="button" title="File browser">File Browser</a>';
|
182 |
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=shortcode_composer" class="button" title="Shortcode composer">Shortcode Composer</a>';
|
183 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=view_log" class="button" title="View log">View Log</a>';
|
230 |
$echo_str .= "\n\t\t\t\t".'</tr>';
|
231 |
$echo_str .= "\n\t\t\t".'</tbody>';
|
232 |
$echo_str .= "\n\t\t".'</table>';
|
233 |
+
$echo_str .= "\n\t".'</div>';
|
234 |
+
$echo_str .= "\n".'</div>';
|
235 |
+
|
236 |
+
echo $echo_str;
|
237 |
+
}
|
238 |
+
|
239 |
+
function wfu_manage_settings($message = '') {
|
240 |
+
if ( !current_user_can( 'manage_options' ) ) return wfu_shortcode_composer();
|
241 |
+
|
242 |
+
$siteurl = site_url();
|
243 |
+
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
244 |
+
|
245 |
+
$echo_str = '<div class="wrap">';
|
246 |
+
$echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
|
247 |
+
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
248 |
+
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=manage_mainmenu" class="button" title="go back">Go to Main Menu</a>';
|
249 |
+
$echo_str .= "\n\t\t".'<h2 style="margin-bottom: 10px; margin-top: 20px;">Settings</h2>';
|
250 |
$echo_str .= "\n\t\t".'<form enctype="multipart/form-data" name="editsettings" id="editsettings" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=edit_settings" class="validate">';
|
251 |
$nonce = wp_nonce_field('wfu_edit_admin_settings', '_wpnonce', false, false);
|
252 |
$nonce_ref = wp_referer_field(false);
|
lib/wfu_admin_browser.php
CHANGED
@@ -47,10 +47,11 @@ function wfu_browse_files($basedir) {
|
|
47 |
if ( $delim_pos !== false ) $updir = substr($updir, 0, $delim_pos + 1);
|
48 |
|
49 |
$echo_str = "\n".'<div class="wrap">';
|
|
|
50 |
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
51 |
-
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=
|
52 |
$echo_str .= "\n\t".'</div>';
|
53 |
-
$echo_str .= "\n\t".'<h2 style="margin-bottom: 10px;">File Browser</h2>';
|
54 |
$echo_str .= "\n\t".'<div>';
|
55 |
$echo_str .= "\n\t\t".'<span><strong>Location:</strong> </span>';
|
56 |
foreach ( $route as $item ) {
|
47 |
if ( $delim_pos !== false ) $updir = substr($updir, 0, $delim_pos + 1);
|
48 |
|
49 |
$echo_str = "\n".'<div class="wrap">';
|
50 |
+
$echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
|
51 |
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
52 |
+
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=manage_mainmenu" class="button" title="go back">Go to Main Menu</a>';
|
53 |
$echo_str .= "\n\t".'</div>';
|
54 |
+
$echo_str .= "\n\t".'<h2 style="margin-bottom: 10px; margin-top: 20px;">File Browser</h2>';
|
55 |
$echo_str .= "\n\t".'<div>';
|
56 |
$echo_str .= "\n\t\t".'<span><strong>Location:</strong> </span>';
|
57 |
foreach ( $route as $item ) {
|
lib/wfu_admin_composer.php
CHANGED
@@ -26,9 +26,12 @@ function wfu_shortcode_composer() {
|
|
26 |
$governors = array();
|
27 |
|
28 |
$echo_str = '<div id="wfu_wrapper" class="wrap">';
|
29 |
-
|
30 |
-
$echo_str .= "\n\t".'<
|
31 |
-
$echo_str .= "\n\t".'<
|
|
|
|
|
|
|
32 |
$echo_str .= "\n\t\t".'<div class="wfu_shortcode_container">';
|
33 |
$echo_str .= "\n\t\t\t".'<span><strong>Generated Shortcode</strong></span>';
|
34 |
$echo_str .= "\n\t\t\t".'<span id="wfu_save_label" class="wfu_save_label">saved</span>';
|
26 |
$governors = array();
|
27 |
|
28 |
$echo_str = '<div id="wfu_wrapper" class="wrap">';
|
29 |
+
$echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
|
30 |
+
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
31 |
+
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=manage_mainmenu" class="button" title="go back">Go to Main Menu</a>';
|
32 |
+
$echo_str .= "\n\t".'</div>';
|
33 |
+
$echo_str .= "\n\t".'<h2 style="margin-bottom: 10px; margin-top: 20px;">Shortcode Composer</h2>';
|
34 |
+
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
35 |
$echo_str .= "\n\t\t".'<div class="wfu_shortcode_container">';
|
36 |
$echo_str .= "\n\t\t\t".'<span><strong>Generated Shortcode</strong></span>';
|
37 |
$echo_str .= "\n\t\t\t".'<span id="wfu_save_label" class="wfu_save_label">saved</span>';
|
lib/wfu_admin_log.php
CHANGED
@@ -10,11 +10,12 @@ function wfu_view_log() {
|
|
10 |
if ( !current_user_can( 'manage_options' ) ) return;
|
11 |
|
12 |
$echo_str = "\n".'<div class="wrap">';
|
|
|
13 |
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
14 |
-
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=
|
15 |
$echo_str .= "\n\t".'</div>';
|
16 |
-
$echo_str .= "\n\t".'<h2 style="margin-bottom: 10px;">History Log</h2>';
|
17 |
-
$echo_str .= "\n\t".'<div
|
18 |
$echo_str .= "\n\t\t".'<table class="widefat">';
|
19 |
$echo_str .= "\n\t\t\t".'<thead>';
|
20 |
$echo_str .= "\n\t\t\t\t".'<tr>';
|
10 |
if ( !current_user_can( 'manage_options' ) ) return;
|
11 |
|
12 |
$echo_str = "\n".'<div class="wrap">';
|
13 |
+
$echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
|
14 |
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
15 |
+
$echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=manage_mainmenu" class="button" title="go back">Go to Main Menu</a>';
|
16 |
$echo_str .= "\n\t".'</div>';
|
17 |
+
$echo_str .= "\n\t".'<h2 style="margin-bottom: 10px; margin-top: 20px;">History Log</h2>';
|
18 |
+
$echo_str .= "\n\t".'<div>';
|
19 |
$echo_str .= "\n\t\t".'<table class="widefat">';
|
20 |
$echo_str .= "\n\t\t\t".'<thead>';
|
21 |
$echo_str .= "\n\t\t\t\t".'<tr>';
|
readme.txt
CHANGED
@@ -110,6 +110,9 @@ Administrators can view and manage the uploaded files from the File Browser that
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
113 |
= 2.5.1 =
|
114 |
* fixed important bug in free version giving the same name to all uploaded files
|
115 |
* fixed bug in free version not clearing completely the plugin cache from previous file upload
|
@@ -337,6 +340,9 @@ Initial version.
|
|
337 |
|
338 |
== Upgrade Notice ==
|
339 |
|
|
|
|
|
|
|
340 |
= 2.5.1 =
|
341 |
Important upgrade to address some bugs.
|
342 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 2.5.2 =
|
114 |
+
* fixed important bug in free version not correctly showing message after failed upload
|
115 |
+
|
116 |
= 2.5.1 =
|
117 |
* fixed important bug in free version giving the same name to all uploaded files
|
118 |
* fixed bug in free version not clearing completely the plugin cache from previous file upload
|
340 |
|
341 |
== Upgrade Notice ==
|
342 |
|
343 |
+
= 2.5.2 =
|
344 |
+
Important upgrade to address some bugs.
|
345 |
+
|
346 |
= 2.5.1 =
|
347 |
Important upgrade to address some bugs.
|
348 |
|
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.2
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|