I Cant Delete Album Images


Subject: I Cant Delete Album Images
sorry for my bad english:

If i try delete "selected images" in the control panel for moderators in the album...
i get the error "the image dont exist"

really need help for this >_<

EDIT; i cant delete the entire album category from ACP... i get the same error.....
and i cant copy too.... only can aprobe, delete or move....

Profile PM  
Subject: Re: I Cant Delete Album Images
I need help..... :(

Profile PM  
Subject: Re: I Cant Delete Album Images
There is a bug in pictures deletion, I have fixed it on my local testing environment, can you please test this with album_modcp.php:

FIND
Code: [Download] [Hide] [Select]
$file_part = explode('.', strtolower($pic_filename));
$pic_filetype = $file_part[count($file_part) - 1];
$pic_filename_only = substr($pic_filename, 0, strlen($pic_filename) - strlen($pic_filetype) - 1);
$pic_base_path = ALBUM_UPLOAD_PATH;
$pic_extra_path = '';
$pic_new_filename = $pic_extra_path . $pic_filename;
$pic_fullpath = $pic_base_path . $pic_new_filename;
$pic_thumbnail = $filerow[$i]['pic_thumbnail'];
$pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;

if (USERS_SUBFOLDERS_ALBUM == true)
{
if (count($pic_path) == 2)
{
$pic_extra_path = $pic_path[0] . '/';
$pic_thumbnail_path = ALBUM_CACHE_PATH . $pic_extra_path;
if (is_dir($pic_path_only))
{
$pic_new_filename = $pic_extra_path . $pic_filename;
$pic_fullpath = $pic_base_path . $pic_new_filename;
$pic_thumbnail_fullpath = $pic_thumbnail_path . $pic_thumbnail;
}
else
{
message_die(GENERAL_MESSAGE, $lang['Pic_not_exist']);
}
}
}

@unlink($pic_thumbnail_fullpath);
@unlink(ALBUM_MED_CACHE_PATH . $pic_extra_path . $pic_thumbnail);
@unlink(ALBUM_WM_CACHE_PATH . $pic_extra_path . $pic_thumbnail);
@unlink($pic_fullpath);
}


REPLACE WITH
Code: [Download] [Hide] [Select]
$file_part = explode('.', strtolower($pic_filename));
$pic_filetype = $file_part[sizeof($file_part) - 1];
$pic_filename_only = substr($pic_filename, 0, strlen($pic_filename) - strlen($pic_filetype) - 1);
$pic_base_path = ALBUM_UPLOAD_PATH;
$pic_extra_path = '';
$pic_new_filename = $pic_extra_path . $pic_filename;
$pic_fullpath = $pic_base_path . $pic_new_filename;
$pic_thumbnail = $filerow[$i]['pic_thumbnail'];
$pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;

if (USERS_SUBFOLDERS_ALBUM == true)
{
if (sizeof($pic_path) == 2)
{
$pic_extra_path = $pic_path[0] . '/';
$pic_base_full_path = ALBUM_UPLOAD_PATH . $pic_extra_path;
$pic_thumbnail_path = ALBUM_CACHE_PATH . $pic_extra_path;
if (is_dir($pic_base_full_path))
{
$pic_new_filename = $pic_extra_path . $pic_filename;
$pic_fullpath = $pic_base_path . $pic_new_filename;
$pic_thumbnail_fullpath = $pic_thumbnail_path . $pic_thumbnail;
}
else
{
message_die(GENERAL_MESSAGE, $lang['Pic_not_exist']);
}
}
}

@unlink($pic_thumbnail_fullpath);
@unlink(ALBUM_MED_CACHE_PATH . $pic_extra_path . $pic_thumbnail);
@unlink(ALBUM_WM_CACHE_PATH . $pic_extra_path . $pic_thumbnail);
@unlink($pic_fullpath);
}



Please let me know if it is working fine.

Subject: Re: I Cant Delete Album Images
thank you Mighty Gorgon

now work fine but, in the ACP, if i try to delete an "album category" with images, if I select "delete all images with the category" I get the error, but now I can delete all images, and after, delete the category.

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1777s (PHP: 10% SQL: 90%)
SQL queries: 13 - Debug Off - GZIP Enabled