Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Album list box on editOnePic.php not building properly  (Read 5634 times)

0 Members and 1 Guest are viewing this topic.

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Album list box on editOnePic.php not building properly
« on: February 15, 2005, 01:08:00 pm »

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.
« Last Edit: March 05, 2005, 08:25:07 pm by TranzNDance »
Logged
Chief Geek at Ranium Systems

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: Album list box on editOnePic.php not building properly
« Reply #1 on: February 15, 2005, 01:34:11 pm »

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]
« Last Edit: February 15, 2005, 01:39:33 pm by omniscientdeveloper »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Album list box on editOnePic.php not building properly
« Reply #2 on: February 17, 2005, 06:44:44 am »

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?
Logged
Chief Geek at Ranium Systems

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Album list box on editOnePic.php not building properly
« Reply #3 on: February 25, 2005, 09:13:28 am »

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

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

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Album list box on editOnePic.php not building properly
« Reply #4 on: March 05, 2005, 08:24:52 pm »

Seems fine to me. Will mark as fixed.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.