forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: jabetcha on April 13, 2007, 08:29:50 pm

Title: Batch Add - MOD to list user galleries in drop-down list
Post by: jabetcha 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
+?>
Title: Re: Batch Add - MOD to list user galleries in drop-down list
Post by: Joachim Müller 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