Album list box on editOnePic.php not building properly Album list box on editOnePic.php not building properly
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Album list box on editOnePic.php not building properly

Started by Abbas Ali, February 15, 2005, 01:08:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Abbas Ali

Log in as Admin. Go to User's Gallery and select any pic of any user(non admin) to edit. You will find that Album list box on editOnePic.php doesn't shows the correct album in which that pic lies. Infact it doesn't shows the user's album (in which that pic lies) at all.

I am trying to find out the problem and will commit as i am done with it.
Chief Geek at Ranium Systems

omniscientdeveloper

#1
That's built-in (has always been that way...at least from what I remember). See line 232. The way around it is to use "category-FIRST_USER_CAT", but then you'll only be able to move the pics around inside the user's gallery....at least that's what it's suppose to do.


[edit]

Hmm...Ok. I see what you're talking about now. Disregard. I'm checking it out too, so if I find out before you, I'll post the problem here. I won't commit anything until later on today though.

[/edit]

Abbas Ali

The problem was because of passing the current logged in user's id to the function get_user_albums(). This function was getting the admin's id (if logged in as admin) instead of pic owner's id and thus the variable $user_albums_list was not building properly.

I rectified the problem and now the correct album in which that pic lies, comes selected in the album list box. I have comitted it.

After few testings I found that if admin edit pics of other users then on both editpics.php and editOnePic.php the album list box shows all the albums of admin and user but not the personal gallery albums of admin. Is this done on purpose or is it a bug?
Chief Geek at Ranium Systems

Abbas Ali

Modified the get_user_albums() function to fix the problem in editpics.php and editOnePic.php. Comitted.

[edit]
Please Confirm.
[/edit]
Chief Geek at Ranium Systems

Tranz