Changeset 539

Show
Ignore:
Timestamp:
05/13/08 00:11:27 (7 months ago)
Author:
sidtheduck
Message:

+ updating code for ticket #78 - truncating md5 hash to first 2 characters. This *should* be unique enough for the import thumbnail filenames.

Location:
trunk/admin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/plog-import.php

    r538 r539  
    102102                                                        $imported++; 
    103103                                                        // delete thumbnail file if it exists 
    104                                                         $thumbpath = $config['basedir'] . 'thumbs/import-'.$file_key.'-'.basename($file_name); 
     104                                                        $thumbpath = $config['basedir'] . 'thumbs/import-'.substr($file_key,0,2).'-'.basename($file_name); 
    105105                                                        if (is_file($thumbpath) && is_readable($thumbpath)) 
    106106                                                        { 
  • trunk/admin/plog-thumb.php

    r537 r539  
    2626                $rname = substr($file,strlen($up_dir)+1); 
    2727 
    28                 $thumbpath = generate_thumb($up_dir.'/'.$rname,"import-".md5($file),THUMB_SMALL); 
     28                $thumbpath = generate_thumb($up_dir.'/'.$rname,"import-".substr(md5($file),0,2),THUMB_SMALL); 
    2929                print '<img src="'.$thumbpath.'" /></div>'; 
    3030                //print "found $relative_name!";