forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: the_todd on July 12, 2005, 12:45:58 am

Title: $CONFIG['users_can_edit_pics'] still valid? picEditor.php
Post by: the_todd on July 12, 2005, 12:45:58 am
picEditor.php line 80:
Code: [Select]
if (!(GALLERY_ADMIN_MODE || $CURRENT_PIC['category'] == FIRST_USER_CAT + USER_ID || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC['owner_id'] == USER_ID)) || !USER_ID) {cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);};
is $CONFIG['users_can_edit_pics'] still valid?, On my gallery this is barring me from editing pics because it is set to 0, by default I believe, but there is nowhere that I see in the gallery config to set "users can edit pics" to yes. Seems like it should go under the category: Files and thumbnails advanced settings.

Also, there is no 'category' column in the cpg140_ pictures talbe to make $CURRENT_PIC['category'] in this query in the same spot as above.
Code: [Select]
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE pid = '$pid'");
        $CURRENT_PIC = mysql_fetch_array($result);
if (!(GALLERY_ADMIN_MODE || $CURRENT_PIC['category'] == FIRST_USER_CAT + USER_ID || ($CURRENT_PIC['owner_id'] == USER_ID)) || !USER_ID) {cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);};
~Todd
Title: Re: $CONFIG['users_can_edit_pics'] still valid? picEditor.php
Post by: Nibbler on July 12, 2005, 12:56:02 am
Look it up in the lang file

Code: [Select]
array('Allow users to retain control over their pics in public galleries', 'users_can_edit_pics',
I'll take a look at that code, thanks.
Title: Re: $CONFIG['users_can_edit_pics'] still valid? picEditor.php
Post by: the_todd on July 12, 2005, 04:35:03 am
Thanks I should have thought to look there. Anyways, there still remains the issue with the unnecessary
Code: [Select]
$CURRENT_PIC['category'] == FIRST_USER_CAT + USER_ID in the if since it doesn't exist.

Todd
Title: Re: $CONFIG['users_can_edit_pics'] still valid? picEditor.php
Post by: Joachim Müller on July 31, 2005, 03:38:02 pm
[moderation]
bumping this unresolved thread to the top...
Title: Re: $CONFIG['users_can_edit_pics'] still valid? picEditor.php
Post by: omniscientdeveloper on September 12, 2005, 06:34:26 am
*BUMP*
Title: Re: $CONFIG['users_can_edit_pics'] still valid? picEditor.php
Post by: Aditya Mooley on September 12, 2005, 08:46:48 am
@Todd - thanks for bringing this to our notice

Removed
Code: [Select]
$CURRENT_PIC['category'] == FIRST_USER_CAT + USER_ID from picEditor.php and committed to CVS.

Aditya