Changing permissions on multiple categories Changing permissions on multiple categories
 

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

Changing permissions on multiple categories

Started by Αndré, January 17, 2014, 02:03:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Αndré

Due to the site outage we lost an already solved thread which could be useful for other people, that's why I post it again.

It's currently still available in Google's cache: http://webcache.googleusercontent.com/search?q=cache:yEYhzWPIEIUJ:forum.coppermine-gallery.net/index.php%3Ftopic%3D77007.0+&cd=2&hl=de&ct=clnk&gl=de&client=firefox-a


Question:
Quote from: TrickydickyJust installed my first gallery. Have created a number of categories using mass import. Is there a way to permission all the categories in one go? I want to allow registered users to create albums in all of them.


Solution:
Quote from: ΑndréThere's no interface to do that. If you want to do it in batch, you'd need to run an appropriate SQL query (e.g. with phpMyAdmin). This should work:
INSERT IGNORE INTO `cpg15x_categorymap` (SELECT cid, '2' FROM `cpg15x_categories` WHERE cid > 1);


Additional question:
Quote from: TrickydickyMany thanks I'll try that when I have access.

One more unrelated question - we bulk imported some albums (empty) but have changed our minds about the structure - is there a way to delete them in bulk?


Solution:
Quote from: ΑndréSQL query:
DELETE FROM `cpg15x_albums` WHERE aid NOT IN (SELECT DISTINCT aid FROM `cpg15x_pictures`)