forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: tek on August 03, 2004, 12:13:38 am

Title: [Solved]: Admin utilities (Resize pictures) error
Post by: tek on August 03, 2004, 12:13:38 am
Hi, I just tried this script and it's great but one of the new functions does not work for me. I'm using version 1.3.1 and the "Delete original size photos" does not work. The error message is "Error renaming albums/new/normal_DSCF0009.JPG to albums/new/thumb_DSCF0009.JPG". I get this error for all files. I was running this script on my own server and I have checked the chmod settings. Everything else seems to work but I like this feature since I need to minimize my page.
Title: Re: Admin utilities (Resize pictures) error
Post by: Nibbler on August 03, 2004, 12:30:20 am
Hi, you will need to edit util.php, find :


Code: [Select]
        if (file_exists($normal)) {
            $test = rename ($normal, $image);

replace it with:

Code: [Select]
if (file_exists($normal)) {
unlink($image);
$test= rename($normal, $image);

and to fix the error message, change

Code: [Select]
printf($lang_util_php['error_rename'], $normal, $thumb);
to

Code: [Select]
printf($lang_util_php['error_rename'], $normal, $image);
Title: Re: Admin utilities (Resize pictures) error
Post by: tek on August 03, 2004, 06:58:32 am
thanks a lot it worked fine