https://www.icyphoenix.com/viewtopic.php?f=35&t=6530 ----------------------------------- Riwer Tue 06 Oct, 2009 01:40 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.... ----------------------------------- Riwer Sun 11 Oct, 2009 15:04 Re: I Cant Delete Album Images ----------------------------------- I need help..... :( ----------------------------------- Mighty Gorgon Mon 12 Oct, 2009 10:08 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 [b]album_modcp.php[/b]: FIND [codeblock] $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); }[/codeblock] REPLACE WITH [codeblock] $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); }[/codeblock] Please let me know if it is working fine. ----------------------------------- Riwer Mon 12 Oct, 2009 14:37 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.