[SOLVED] user edit description problem [SOLVED] user edit description problem
 

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]

Main Menu

[SOLVED] user edit description problem

Started by murphyz, July 04, 2004, 05:50:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

murphyz

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://coppermine-gallery.com/forum/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:
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:
  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.
Imagination is more important than knowledge ~ A Einstein

NetCritter

Thanks murph, this seems to be working fine for me  ;D