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: Bridged Coppermine, Showing User Albums for ALL Registered Users  (Read 3187 times)

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244

Dear Andre :)

I was moving an album around, and clicked on "Edit Album Properties."  In the drop-down menu for "Album Categories," to showed me both the categories that I created (which is good  :)) .... and hundreds of hundreds of user galleries (which is bad  :-\).  Please see picture.   

In my "Config" > "Registration" settings, "Create user album in personal gallery on registration" is disabled because Coppermine is bridged so the function is automatically disabled. 

Is there a way for me to purge Coppermine of these unused user galleries? 

Joel
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bridged Coppermine, Showing User Albums for ALL Registered Users
« Reply #1 on: July 25, 2011, 11:30:24 am »

Open modifyalb.php, find
Code: [Select]
        $sql = $cpg_udb->get_admin_album_list();
       
        $result = cpg_db_query($sql);
       
        while ($row = mysql_fetch_assoc($result)) {
            print_r($row);
            // Add to multi-dim array for later sorting
            $rowset[] = array(
                'cat'   => $lang_modifyalb_php['user_gal'],
                'aid'   => $row['aid'],
                'title' => $row['title'],
            ); 
        }
       
        mysql_free_result($result);
and remove it completely.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Bridged Coppermine, Showing User Albums for ALL Registered Users
« Reply #2 on: July 25, 2011, 09:15:53 pm »

Hi Andre,

I did what you told me to do, but when I checked, it still showed all the User Galleries.  Please see picture.

Please see attached for my modifyalb (saved a text document to attach)

Joel
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bridged Coppermine, Showing User Albums for ALL Registered Users
« Reply #3 on: July 26, 2011, 02:21:00 pm »

Oops, my solution removed the user categories from the 'Choose album' box ;D

Undo that change. Instead, find
Code: [Select]
    foreach ($CAT_LIST as $category) {
        echo '                <option value="' . $category[0] . '"' . ($ALBUM_DATA['category'] == $category[0] ? ' selected="selected"': '') . ">" . $category[1] . '</option>' . $LINEBREAK;
    }
and replace with
Code: [Select]
    foreach ($CAT_LIST as $category) {
        if ($category[0] == USER_GAL_CAT || $category[0] > FIRST_USER_CAT) continue;
        echo '                <option value="' . $category[0] . '"' . ($ALBUM_DATA['category'] == $category[0] ? ' selected="selected"': '') . ">" . $category[1] . '</option>' . $LINEBREAK;
    }
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Bridged Coppermine, Showing User Albums for ALL Registered Users
« Reply #4 on: July 26, 2011, 07:28:19 pm »

Yes, this works -- resolved.

I have a question though, is this because my CPG is bridged with SMF, or did I have a setting wrong or something?  How come it showed all of these user albums even though, in my Groups settings, I purposely put no user uploads. 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bridged Coppermine, Showing User Albums for ALL Registered Users
« Reply #5 on: July 27, 2011, 08:57:50 am »

is this because my CPG is bridged with SMF
No.


did I have a setting wrong
No.


How come it showed all of these user albums
What you see are user categories, not albums. You as admin might want to assign (move) some albums to a particular user. That's the reason why you see all available user names.
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 20 queries.