Icy Phoenix

     
 

I Cant Delete Album Images

I Cant Delete Album Images

Article
Reply with quote    Download Post  
Post 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 - View user's profile Send private message  
Riwer [ Tue 06 Oct, 2009 01:40 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


I Cant Delete Album Images

Comments
Reply with quote    Download Post  
Post Re: I Cant Delete Album Images 
 
I need help.....  



 
Riwer - View user's profile Send private message  
Riwer [ Sun 11 Oct, 2009 15:04 ]
Reply with quote    Download Post  
Post 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.



 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Mon 12 Oct, 2009 10:08 ]
Reply with quote    Download Post  
Post 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.



 
Riwer - View user's profile Send private message  
Riwer [ Mon 12 Oct, 2009 14:37 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron