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: Bug in list_albums: No control buttons +FIX  (Read 2771 times)

0 Members and 1 Guest are viewing this topic.

jjulian_97

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Bug in list_albums: No control buttons +FIX
« on: December 10, 2003, 08:49:55 am »

I think this may be the same problem as the administrator can't belong to other groups, but here it is anyway.

As the administrator, I created three albums in my user gallery. One of them, I set to allow access to a custom group, one to the registered group, and one to the general public. When list_albums builds $alb_list, the info for the albums in all but the public group album had no control buttons (delete, properties, edit pics). The link for the thumbnail was also incorrect as it pointed to "thumbnails.php?album=" for the non-public albums.

I tracked it down to the $visibility check under the "//Prepair Everything" remark. Seems to be checking against only one group rather than all the groups that the user belongs to. Here's the diff that fixed it for me.
Code: [Select]

** index.php.old2003-12-09 23:03:06.000000000 -0800
--- index.php2003-12-09 23:02:48.000000000 -0800
***************
*** 357,363 ****
              $alb_list[$alb_idx]['thumb_pic'] = "<img src=\"images/nopic.jpg\" {$image_size['geom']} alt=\"\" border=\"0\" class=\"image\" />";
          }
          // Prepare everything
!         if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || $visibility == $USER_DATA['group_id']) {
              $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : '';
              $alb_list[$alb_idx]['aid'] = $alb_thumb['aid'];
              $alb_list[$alb_idx]['album_title'] = $alb_thumb['title'];
--- 357,363 ----
              $alb_list[$alb_idx]['thumb_pic'] = "<img src=\"images/nopic.jpg\" {$image_size['geom']} alt=\"\" border=\"0\" class=\"image\" />";
          }
          // Prepare everything
!         if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || strstr(USER_GROUP_SET, $visibility)) {
              $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : '';
              $alb_list[$alb_idx]['aid'] = $alb_thumb['aid'];
              $alb_list[$alb_idx]['album_title'] = $alb_thumb['title'];
Logged

rayne

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Bug in list_albums: No control buttons +FIX
« Reply #1 on: December 12, 2003, 08:28:29 pm »

How did you set the album to allow access to a custom group?
Thanks.
--Rayne
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.