forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: trex_daemon on May 31, 2006, 10:12:57 am

Title: Last uploaded/random pictures still shows in main, even if album is protected
Post by: trex_daemon on May 31, 2006, 10:12:57 am
I have a problem, and i don't know how to solve it.

I am running cpg1.4.6. (latest release so far) and i have set up a few albums. Some of them are public, some of them are password protected.
The problem is, if i pasword protect an album, the thumbnails are still shown in main for last uploaded pic, or random pic.  It's true, when i click on it, it asks for password, so the normal image can't be viewed. But is there a possibility to show on the main page only the thumbnails of the last modified pictures/random pictures etc. for the unprotected albums only ??

Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Tranz on May 31, 2006, 03:52:35 pm
I was unable to replicate. I created a password protected album and uploaded a file. While logged in as admin, I saw the thumb and was not asked for the password when I clicked on it.

When logged out, I did not see the thumb under Last Uploaded. I can't confirm Random because I have too many files for that one thumb to randomly show up.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: trex_daemon on May 31, 2006, 04:40:08 pm
It's quite interesting.
I've created the album as root, and password protected it. I've uploaded a few pictures (batch upload) and then i've logged out.
Now, being unlogged, there is a public album, that is visible to all users, the other albums (including the one created above) are all private and password protected. However, in the "Last Addtions" tab, i can see the new thumbnails of the newly uploaded pictures to the private album. When i click on the thumbnail, it gives me an error message: "The selected album/file does not exist !".
But it's still showing the thumbnail.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Tranz on May 31, 2006, 04:51:46 pm
I tried again, using batch upload, and I still can't replicate. :-\

Could you post a link to your gallery and point out/describe the problem thumbs?
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: trex_daemon on May 31, 2006, 10:00:14 pm
deleted
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: trex_daemon on May 31, 2006, 10:02:44 pm
deleted
Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Joachim Müller on June 01, 2006, 06:10:11 am
Unfortunatly, currently it's not up between  00:00 (GMT+2) and 09:00 (GMT+2)
Get decent webspace - it's cheap. I won't look into issues that can only be observed on a webserver that is only available at random times.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: trex_daemon on June 01, 2006, 02:16:59 pm
It's a webserver for a small company, and it's under developement. When all the services will be available, then  the server will be up 24h/24h.
It's not available at random times, it's not available  between 00:00 (GMT+2) and 09:00 (GMT+2).
And i don't think that availability time affects the functionality of Coppermine Photo Gallery.
I've observed an issue, and i thought it's a  good idea  to announce to the developement team, to help improve your product.
Anyways, thank you for your reply. I'll wait then for a bigger "company" to discover this issue, and maybe then it will be fixed in future releases.




Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Paver on June 02, 2006, 01:22:13 am
There's no reason to get personal.  You explained your situation and I think it's reasonable.  There are other supporters in the community if some are unwilling to address certain issues.  Remember, we are all individuals here - even when we are working as a community, we each still have individual personalities that define us as persons instead of an automated support system.  We all want to investigate possible problems and help support issues users are having.

Please don't delete your posts.  If something changes, make a note in a further post.  If something is confusing in a past post, go ahead and edit it with a note at the end of the modified post saying what was changed - that way posts below make sense to people reading later.  All threads & posts are kept for historical reasons to help others who might run into the same issues.  Please respect this by using care in modifying past posts.

That being said, please post a link to your site again.  It's difficult for supporters to help if we cannot replicate the problem on our testbeds. 
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Shazilk on June 02, 2006, 09:40:25 pm
First I would like to say hi and thanks for a brilliant script  ;)

I have tried several other photo progs, one I even purchased a licence for. Non compete with this, the install and help hints everywhere are excellent.... keep up the great work.

However I do have a small problem similar to what I think is being described above. I have just installed 1.4.6
I have both private and non private albums. When I am logged out and look at the random files I can see some thumbnails that are from within the private album, when clicked upon I get error: The selected album/file does not exist !

Any Suggestions please??
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Nibbler on June 02, 2006, 10:01:41 pm
Can we get a link ?
Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Shazilk on June 02, 2006, 10:21:22 pm
Sorry!!

http://www.lady-cougar.com/mypics/ [Not work safe]
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Nibbler on June 02, 2006, 10:34:11 pm
Please don't post adult sites without warning.

This is a bug, but only appears when the private icon option is enabled.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Nibbler on June 02, 2006, 10:36:56 pm
Paver, please could you look into any possible side effects of http://forum.coppermine-gallery.net/index.php?topic=30894.0 in relation to this apparently  new bug ?
Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Paver on June 02, 2006, 10:40:46 pm
Yikes, I was wondering what may be the cause of this new series of bug reports.  The possibility that it was my commit is embarrassing and even more so that it was for fixing a notice message.  I thought I had tested the fix thoroughly, but right now, I'm not so sure.  I'll take a look at it tonight or at the latest this weekend.

I'm thinking for the future that notice fixes should only be committed to devel.  Sorry about that.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Shazilk on June 03, 2006, 12:11:42 am
Please don't post adult sites without warning.

My Apologies, I wish no one any offence and certainly will not be offended if you remove that link.

So from current response I assume this is a bug and not something I have done  :-[

I will watch here carefully for any further response or advice.





Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Nibbler on June 03, 2006, 12:23:03 am
For now you can reverse the code change mentioned in the bug thread I linked to above. Adult links are fine so long as you post a warning.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Paver on June 03, 2006, 04:01:16 am
Ok.  As far as I can tell, this bug is due to a mis-used $cpg_show_private_album in the function I modified here (http://forum.coppermine-gallery.net/index.php?topic=30894.0).  This variable is set in index.php:
Code: [Select]
$cpg_show_private_album = ($CONFIG['allow_private_albums'])?($CONFIG['show_private']):(true);
It's meant to allow private albums to show up in the index list but not be accessible any further.  So it should not be used as a bypass in setting $META_ALBUM_SET which is used by the last-uploaded and random blocks.

So, replace this line in function get_meta_album_set() in functions.inc.php:
Code: [Select]
if (($cpg_show_private_album || $USER_DATA['can_see_all_albums']) && $cat == 0) {with this line:
Code: [Select]
if ($USER_DATA['can_see_all_albums'] && $cat == 0) {
Although not necessary functionally (but will be done in the commit), you can also remove $cpg_show_private_album from the global line in the same function to restore it to what it was before my misguided fix, as shown:
Code: [Select]
global $USER_DATA, $FORBIDDEN_SET_DATA, $CONFIG;
So, before the misguided fix, $cpg_show_private_album was not available to get_meta_album_set() function and that was a good thing because it should not have been there.

For those who have this problem, please try the 2-line fix and report your results.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: Shazilk on June 03, 2006, 11:56:03 am
Excellent..... you are a star sir  :)

I changed the 2 lines as you stated and it looks good to me.

Thank You both Nibbler & Paver
Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Paver on June 03, 2006, 05:10:00 pm
A star after being a goat - I guess that's better than never being a star . . .  :-X
Title: Re: Last uploaded/random pictures still shows in main, even if album is protected
Post by: trex_daemon on June 04, 2006, 11:23:40 am
Sorry for deleting the post. Now the problem is solved.
Anyways, keep up the good work.
Title: Re: Last uploaded/random pictures still shows in main, even if album is protecte
Post by: Paver on June 04, 2006, 11:23:58 pm
Committed to stable & devel.  It will show up in the next version: 1.4.7.