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: Batch Add - MOD to list user galleries in drop-down list  (Read 2424 times)

0 Members and 1 Guest are viewing this topic.

jabetcha

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • http://www.justfour.us
Batch Add - MOD to list user galleries in drop-down list
« on: April 13, 2007, 08:29:50 pm »

There are lots of posts about the Batch Add functionality and this seems to have changed in recent versions of Coppermine (some previous versions would allow an admin to batch add into any gallery)

Here's a quick patch for 1.4.10 to display all galleries on the batch add page. Use at your own risk

This file is in the bridge/ folder. This code is in patch -u format. If you don't have patch on your machine, delete the lines with the - in front and paste the ones with the + (delete the '+' though)

Code: [Select]
--- udb_base.inc.php.orig       2007-04-08 13:14:53.000000000 -0400
+++ udb_base.inc.php    2007-04-12 10:52:18.000000000 -0400
@@ -617,7 +617,9 @@
                         $sql = "SELECT aid, CONCAT('(', {$this->field['username']}, ') ', a.title) AS title
                                                         FROM {$CONFIG['TABLE_ALBUMS']} AS a
                                                         INNER JOIN {$this->usertable} AS u
-                                                        ON category = (" . FIRST_USER_CAT . " + ".USER_ID.") AND {$this->field['user_id']} = ".USER_ID." ORDER BY title";
+                                                        ON category - " . FIRST_USER_CAT . " = {$this->field['user_id']}
+                -- ON category = (" . FIRST_USER_CAT . " + ".USER_ID.") AND {$this->field['user_id']} = ".USER_ID."
+ORDER BY title";
                 } else {
                         $sql = "SELECT aid, IF(category > " . FIRST_USER_CAT . ", CONCAT('* ', title), CONCAT(' ', title)) AS title " . "FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = ".(FIRST_USER_CAT+USER_ID)." ORDER BY title";
                 }
@@ -793,4 +795,4 @@
                }
        }
 }
-?>
\ No newline at end of file
+?>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Batch Add - MOD to list user galleries in drop-down list
« Reply #1 on: April 15, 2007, 02:20:45 pm »

The fact that previous versions allowed you to batch-add to user albums actually was a bug that got fixed in a maintenance release. This is a software design question that the dev team hasn't finally decided on yet. Review http://forum.coppermine-gallery.net/index.php?topic=27325.0
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.