- Timestamp:
- 05/09/08 14:32:35 (7 months ago)
- Location:
- trunk/admin
- Files:
-
- 2 modified
-
plog-import.php (modified) (1 diff)
-
plog-thumb.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/plog-import.php
r536 r537 102 102 $imported++; 103 103 // delete thumbnail file if it exists 104 $thumbpath = $config['basedir'] . 'thumbs/import-' .basename($file_name);104 $thumbpath = $config['basedir'] . 'thumbs/import-'.$file_key.'-'.basename($file_name); 105 105 if (is_file($thumbpath) && is_readable($thumbpath)) 106 106 { -
trunk/admin/plog-thumb.php
r445 r537 3 3 // first it will be used for import only. 4 4 5 if (empty($_GET[ "img"])) {5 if (empty($_GET['img'])) { 6 6 return "No such image"; 7 } ;7 } 8 8 9 9 require_once("../plog-functions.php"); … … 13 13 14 14 15 $files = get_files($config['basedir'] . 'uploads');15 $files = get_files($config['basedir'] . "uploads"); 16 16 17 17 … … 19 19 $found = false; 20 20 21 $up_dir = $config['basedir'] . 'uploads';21 $up_dir = $config['basedir'] . "uploads"; 22 22 23 23 foreach($files as $file) { 24 if (md5($file) == $_GET[ "img"]) {24 if (md5($file) == $_GET['img']) { 25 25 $found = true; 26 26 $rname = substr($file,strlen($up_dir)+1); 27 27 28 $thumbpath = generate_thumb($up_dir.'/'.$rname,"import ",THUMB_SMALL);28 $thumbpath = generate_thumb($up_dir.'/'.$rname,"import-".md5($file),THUMB_SMALL); 29 29 print '<img src="'.$thumbpath.'" /></div>'; 30 30 //print "found $relative_name!"; 31 31 break; 32 } ;33 } ;32 } 33 } 34 34 35 35 ?>
