Changeset 504380 for relocate-upload
- Timestamp:
- 02/13/2012 04:45:45 PM (13 years ago)
- Location:
- relocate-upload
- Files:
-
- 2 edited
- 4 copied
-
tags/0.20 (copied) (copied from relocate-upload/trunk)
-
tags/0.20/readme.txt (copied) (copied from relocate-upload/trunk/readme.txt) (2 diffs)
-
tags/0.20/relocate-upload.php (copied) (copied from relocate-upload/trunk/relocate-upload.php) (3 diffs)
-
tags/0.20/screenshot-2.png (copied) (copied from relocate-upload/trunk/screenshot-2.png)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/relocate-upload.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
relocate-upload/tags/0.20/readme.txt
r142130 r504380 2 2 Contributors: alanft 3 3 Tags: admin, upload, folder, relocate 4 Requires at least: 2. 65 Tested up to: 2.8.26 Stable tag: 0. 144 Requires at least: 2.8 5 Tested up to: 3.3.1 6 Stable tag: 0.20 7 7 8 8 Wordpress uploads media to one pre-set folder. Relocate Upload lets you switch media to other folders. … … 36 36 37 37 == Changelog == 38 0.20 - Adopted proper 'wp_ajax_' action, to close off a major security issue. 39 38 40 0.14 - Many small fixes (check for existing files, database prefix bug fix, jquery enqueue, 2.8 media library update, path 'fixing') 39 41 -
relocate-upload/tags/0.20/relocate-upload.php
r142130 r504380 5 5 Description: Moves uploads to special folders 6 6 Author: Alan Trewartha 7 Version: 0. 147 Version: 0.20 8 8 Author URI: http://freakytrigger.co.uk/author/alan/ 9 9 */ … … 12 12 define('SERVER_DOC_ROOT', $GLOBALS['_SERVER']['DOCUMENT_ROOT']); 13 13 14 if( is_admin() ) 15 { 16 add_action('wp_ajax_relocate_upload', 'relocate_upload_js_action'); 17 } 14 18 15 19 // Move folder request handled when called by GET AJAX 16 if (isset($_GET['ru_folder'])) 17 { // WP setup and function access 18 define('WP_USE_THEMES', false); 19 require_once(urldecode($_GET['abspath']).'/wp-load.php'); // save us looking for it, it's passed as a GET parameter 20 function relocate_upload_js_action() 21 { global $wpdb; 22 if (!isset($_GET['ru_folder'])) exit; 20 23 check_admin_referer('ru_request_move'); 21 global $wpdb;22 23 24 24 25 // find default path … … 95 96 { jQuery($element).attr({disabled: true}); 96 97 jQuery($element).siblings("span").html(' Moving...'); 97 jQuery.get( 98 "<?php echo WP_CONTENT_URL."/plugins/relocate-upload/relocate-upload.php"; ?>", 98 jQuery.get(ajaxurl, 99 99 { ru_folder: $element.selectedIndex, 100 100 id: $element.getAttribute('media_id'), 101 _wpnonce: '<?php echo wp_create_nonce("ru_request_move") ?>',102 abspath: '<?php echo ABSPATH?>'101 action: 'relocate_upload', 102 _wpnonce: '<?php echo wp_create_nonce("ru_request_move") ?>' 103 103 }, 104 104 function(data) -
relocate-upload/trunk/readme.txt
r142130 r504380 2 2 Contributors: alanft 3 3 Tags: admin, upload, folder, relocate 4 Requires at least: 2. 65 Tested up to: 2.8.26 Stable tag: 0. 144 Requires at least: 2.8 5 Tested up to: 3.3.1 6 Stable tag: 0.20 7 7 8 8 Wordpress uploads media to one pre-set folder. Relocate Upload lets you switch media to other folders. … … 36 36 37 37 == Changelog == 38 0.20 - Adopted proper 'wp_ajax_' action, to close off a major security issue. 39 38 40 0.14 - Many small fixes (check for existing files, database prefix bug fix, jquery enqueue, 2.8 media library update, path 'fixing') 39 41 -
relocate-upload/trunk/relocate-upload.php
r142130 r504380 5 5 Description: Moves uploads to special folders 6 6 Author: Alan Trewartha 7 Version: 0. 147 Version: 0.20 8 8 Author URI: http://freakytrigger.co.uk/author/alan/ 9 9 */ … … 12 12 define('SERVER_DOC_ROOT', $GLOBALS['_SERVER']['DOCUMENT_ROOT']); 13 13 14 if( is_admin() ) 15 { 16 add_action('wp_ajax_relocate_upload', 'relocate_upload_js_action'); 17 } 14 18 15 19 // Move folder request handled when called by GET AJAX 16 if (isset($_GET['ru_folder'])) 17 { // WP setup and function access 18 define('WP_USE_THEMES', false); 19 require_once(urldecode($_GET['abspath']).'/wp-load.php'); // save us looking for it, it's passed as a GET parameter 20 function relocate_upload_js_action() 21 { global $wpdb; 22 if (!isset($_GET['ru_folder'])) exit; 20 23 check_admin_referer('ru_request_move'); 21 global $wpdb;22 23 24 24 25 // find default path … … 95 96 { jQuery($element).attr({disabled: true}); 96 97 jQuery($element).siblings("span").html(' Moving...'); 97 jQuery.get( 98 "<?php echo WP_CONTENT_URL."/plugins/relocate-upload/relocate-upload.php"; ?>", 98 jQuery.get(ajaxurl, 99 99 { ru_folder: $element.selectedIndex, 100 100 id: $element.getAttribute('media_id'), 101 _wpnonce: '<?php echo wp_create_nonce("ru_request_move") ?>',102 abspath: '<?php echo ABSPATH?>'101 action: 'relocate_upload', 102 _wpnonce: '<?php echo wp_create_nonce("ru_request_move") ?>' 103 103 }, 104 104 function(data)
Note: See TracChangeset
for help on using the changeset viewer.