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: [SOLVED] user edit description problem  (Read 3162 times)

0 Members and 1 Guest are viewing this topic.

murphyz

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
    • Farmyard Media
[SOLVED] user edit description problem
« on: July 04, 2004, 05:50:39 pm »

I have the gallery running with phpbb integration and with the mod for a user to delete their image whilst in 'admin' mode - all of which works fine.

However, when a user looks at their own picture and click on the 'edit description' link they are able to edit their description as normal. The problem is that there is no list of albums for them to specify where to move it to (if needed). See image below:

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.cluckbook.com%2Fa2z%2Fimages%2Fnolist.jpg&hash=b7c04d8999e17b73eddaaf230db92f062c6210ca)

This means that if the user goes to admin mode and attempts to change the image description, by clicking submit, the image is lost - I assume because it doesn't know which album the image is meant to go into.

This works fine if I am logged in as the administrator.

Any idea how to make the album list appear in the dropdown?

Mxx

Edit:  The 'album' pull down shows any of the users private albums if they have been created.  I think, therefore, that I will need to change the editOnePic.php file so that for any USER_ADMIN_MODE takes not only the user_albums_list, but also the public_albums_list.

I'll continue playing as before, but if anyone in the know can shed some light on the solution, that'll obviously be a great help - thanks :)

Edit:   Sorry, more patience on my behalf needed. I think I have solved it.

Find:
Code: [Select]
if (GALLERY_ADMIN_MODE) {
    $public_albums = db_query("SELECT DISTINCT aid, title, IF(category = 0, CONCAT('&gt; ', title), CONCAT(name,' &lt; ',title)) AS cat_title FROM {$CONFIG['TABLE_ALBUMS']}, {$CONFIG['TABLE_CATEGORIES']} WHERE category < '" . FIRST_USER_CAT . "' AND (category = 0 OR category = cid) ORDER BY cat_title");

Replace with:
 
Code: [Select]
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
    $public_albums = db_query("SELECT DISTINCT aid, title, IF(category = 0, CONCAT('&gt; ', title), CONCAT(name,' &lt; ',title)) AS cat_title FROM {$CONFIG['TABLE_ALBUMS']}, {$CONFIG['TABLE_CATEGORIES']} WHERE category < '" . FIRST_USER_CAT . "' AND (category = 0 OR category = cid) ORDER BY cat_title");

I'm just doing a few security checks just now, but if you don't hear anything further, please assume the above worked.  Apolgies for needless posting.
« Last Edit: July 04, 2004, 07:29:17 pm by murphyz »
Logged
Imagination is more important than knowledge ~ A Einstein

NetCritter

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 13
    • Shutterbugs.info
Re: [SOLVED] user edit description problem
« Reply #1 on: July 15, 2004, 08:34:25 pm »

Thanks murph, this seems to be working fine for me  ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.