forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: bitcloud on April 27, 2007, 03:17:12 am

Title: BUG: Renamed MiniThumbs and Avatar_Manage.php
Post by: bitcloud on April 27, 2007, 03:17:12 am
Hey stramm..

another bit of a minithumb bug for you :)

when you rename a file in the file information editor it will stop displaying it in the Avatar_Manage.php (and consequently in the profile if you set this file as your avatar)

I think when you rename the file it's not renaming the minithumb and updating the minithumb database. If you set "thisfile.jpg" as your avatar it will continue to display "mini_thisfile.jpg" in your profile even after you rename the file to "thatfile" - "mini_thisfile.jpg" still exists and the profile still displays that avatar for the file that shouldn't still exist... the avatar_manage file list will look for "mini_thatfile.jpg" (which doesn't exist)

I've tested this out on http://stramm.st.funpic.org/ (uploaded a file.. renamed it. visited avatar_manage.php)

So, to summarise:
1) the modpack isn't renaming the mini_ version of the file when you rename the file
2) the modpack isn't updating that change in the user's minithumb database entry

cheers
lachlan
Title: Re: BUG: Renamed MiniThumbs and Avatar_Manage.php
Post by: Stramm on April 27, 2007, 01:31:48 pm
you're good in finding the lil glitches

- Fixed the renaming problem. When renaming a file using editOnePic.php orig_ and mini_ files get renamed as well.
- Avatars created from already uploaded pics now get copied from minithumb pic to a file user_USER_ID + FIRST_USER_CAT_avatar.mime. That's the naming sheme I already use when a user uploads a file to use as avatar. This way I avoid checking if the renamed file is used as avatar.

orig, mini rename fix for modpack 1.4.10 v1 (http://stramm.st.funpic.org/albums/userpics/10001/stramm_mod1_4_10_bridge_1_fix3.zip)

PS.: Thanks for the finding and be aware that the fix isn't tested that much
Title: Re: BUG: Renamed MiniThumbs and Avatar_Manage.php
Post by: bitcloud on April 27, 2007, 03:52:27 pm
thanks for the quick response..

My files are all pretty modded.. is there any chance you could outline the fix so i can apply them to my files?
Title: Re: BUG: Renamed MiniThumbs and Avatar_Manage.php
Post by: Stramm on April 28, 2007, 01:29:28 pm
just use a diff viewer like winmerge http://winmerge.org/
Title: Re: BUG: Renamed MiniThumbs and Avatar_Manage.php
Post by: bitcloud on April 30, 2007, 04:09:24 pm
nice 1.. thanks for the tip