Changeset 1468601
- Timestamp:
- 08/05/2016 12:47:53 PM (10 years ago)
- Location:
- media-file-manager
- Files:
-
- 23 added
- 3 edited
-
tags/1.4.1 (added)
-
tags/1.4.1/images (added)
-
tags/1.4.1/images/MRL_Icons.svg (added)
-
tags/1.4.1/images/audio.png (added)
-
tags/1.4.1/images/dir.png (added)
-
tags/1.4.1/images/dir_new.png (added)
-
tags/1.4.1/images/dir_up.png (added)
-
tags/1.4.1/images/file.png (added)
-
tags/1.4.1/images/left.png (added)
-
tags/1.4.1/images/media_folder.png (added)
-
tags/1.4.1/images/no_thumb.png (added)
-
tags/1.4.1/images/right.png (added)
-
tags/1.4.1/images/video.png (added)
-
tags/1.4.1/jquery.appear-1.1.1.min.js (added)
-
tags/1.4.1/media-relocator.js (added)
-
tags/1.4.1/media-relocator.php (added)
-
tags/1.4.1/media-selector.js (added)
-
tags/1.4.1/media-selector.php (added)
-
tags/1.4.1/output_log.php (added)
-
tags/1.4.1/readme.txt (added)
-
tags/1.4.1/screenshot-1.jpg (added)
-
tags/1.4.1/set_document_root.php (added)
-
tags/1.4.1/style.css (added)
-
trunk/media-relocator.php (modified) (1 diff)
-
trunk/media-selector.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-file-manager/trunk/media-relocator.php
r1335996 r1468601 4 4 Plugin URI: http://tempspace.net/plugins/?page_id=111 5 5 Description: You can make sub-directories in the upload directory, and move files into them. At the same time, this plugin modifies the URLs/path names in the database. Also an alternative file-selector is added in the editing post/page screen, so you can pick up media files from the subfolders easily. 6 Version: 1.4. 06 Version: 1.4.1 7 7 Author: Atsushi Ueda 8 8 Author URI: http://tempspace.net/plugins/ -
media-file-manager/trunk/media-selector.php
r1335996 r1468601 59 59 global $wpdb; 60 60 $id = $_POST['id']; 61 62 $res = $wpdb->get_results( 61 if (!is_numeric($id)) { 62 die("error"); 63 } 64 65 $query = $wpdb->prepare( 63 66 "SELECT * from $wpdb->posts ". 64 "WHERE id= ".$id." ".65 " ");67 "WHERE id='%d'",$id); 68 $res = $wpdb->get_results($query); 66 69 $ret->posts = $res[0]; 67 70 … … 69 72 $ret->meta = $meta; 70 73 71 $file = $wpdb->get_results( 72 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id=".$id." AND meta_key='_wp_attached_file'"); 74 $query = $wpdb->prepare( 75 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id='%d' AND meta_key='_wp_attached_file'", $id); 76 $file = $wpdb->get_results($query); 73 77 $ret->file = $file[0]->meta_value; 74 78 75 $alt = $wpdb->get_results( 76 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id=".$id." AND meta_key='_wp_attachment_image_alt'"); 79 $query = $wpdb->prepare( 80 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id='%d' AND meta_key='_wp_attachment_image_alt'", $id); 81 $alt = $wpdb->get_results($query); 77 82 if ($alt) { 78 83 $ret->alt = $alt[0]->meta_value; … … 94 99 95 100 $id = $_POST['id']; 101 if (!is_numeric($id)) { 102 die("error"); 103 } 96 104 97 105 $mime_type = ""; … … 108 116 $dat = array(); 109 117 110 $ res = $wpdb->get_results(118 $query = $wpdb->prepare( 111 119 "SELECT * from $wpdb->posts ". 112 "WHERE id= ".$id." ".113 " ");120 "WHERE id='%d'", $id); 121 $res = $wpdb->get_results($query); 114 122 if (count($res)) { 115 123 $mime_type = $res[0]->post_mime_type; … … 123 131 $is_image = (substr($mime_type, 0, 5)=='image'); 124 132 125 $res = $wpdb->get_results( 126 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id=".$id." AND meta_key='_wp_attached_file'"); 133 $query = $wpdb->prepare( 134 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id='%d' AND meta_key='_wp_attached_file'", $id); 135 $res = $wpdb->get_results($query); 127 136 if (count($res)) { 128 137 $file = $res[0]->meta_value; … … 170 179 $size_full='('.$meta['width']." x ".$meta['height'].')'; 171 180 172 $res = $wpdb->get_results( 173 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id=".$id." AND meta_key='_wp_attachment_image_alt'"); 181 $query = $wpdb->prepare( 182 "SELECT meta_value FROM $wpdb->postmeta WHERE post_id='%d' AND meta_key='_wp_attachment_image_alt'", $id); 183 $res = $wpdb->get_results($query); 174 184 if (count($res)) { 175 185 $alt = esc_html($res[0]->meta_value); -
media-file-manager/trunk/readme.txt
r1335996 r1468601 3 3 Donate link: http://tempspace.net/plugins/ 4 4 Tags: media,file,manager,explorer,relocate,folder,folders,files,rename,make directory,directories,organize,organizer,select,selector,database 5 Requires at least: 4. 3.06 Tested up to: 4. 4.17 Stable tag: 1.4. 05 Requires at least: 4.5.0 6 Tested up to: 4.5.3 7 Stable tag: 1.4.1 8 8 9 9 You can make sub-directories in the upload directory, and move files into them. … … 56 56 == Changelog == 57 57 58 = 1.4.1 = 59 * Fixed security bugs. 60 58 61 = 1.4.0 = 59 62 * Added an option of disabling set_time_limit().
Note: See TracChangeset
for help on using the changeset viewer.