coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: reallove on May 30, 2006, 10:32:15 PM

Title: Last additions
Post by: reallove on May 30, 2006, 10:32:15 PM
Hello,
After upgrading to 1.4.6,I have this issue.
I've created a password protected album,but after I upload pictures in it,the last pics added appear in the "last additions" section even for the unregistered users. Clicking on a pic over there,points to..other pic,what it should be there,I suppose.
My gallery's URL is http://dansimiha.websun.ro ,to see.
Thanks,
Title: Re: Last additions
Post by: Paver on May 30, 2006, 11:28:39 PM
I have a hunch that this is caused by the same problem noted in this thread (http://forum.coppermine-gallery.net/index.php?topic=31856.0).  Please try the same fix. 

Look for this line in functions.inc.php in the function get_meta_album_set($cat, &$meta_album_set):
if ($cpg_show_private_album || $USER_DATA['can_see_all_albums'] && $cat == 0) {


Add in an extra set of parentheses as shown:
<buggy code removed>

Remove $cpg_show_private_album as show:
if ($USER_DATA['can_see_all_albums'] && $cat == 0) {

Let me know if that fixes the problem.

edit: Modified code with correct fix.  Original code still contained a different but related bug.
Title: Re: Last additions
Post by: reallove on May 31, 2006, 08:41:31 AM
I did the little changes to that line,but the problem persists . :(
Title: Re: Last additions
Post by: reallove on June 12, 2006, 11:42:47 AM
Upgrading to 1.4.8 seemed to solve the issue,so maybe there was something buggy in 1.4.6 :)
Title: Re: Last additions
Post by: Nibbler on June 12, 2006, 12:01:30 PM
As explained in the link Paver gave you.
Title: Re: Last additions
Post by: Paver on June 12, 2006, 02:04:58 PM
As Nibbler said, the link I gave has the correct fix.  I modified my post above to reflect the correct fix as well.