aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_modify.php
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2014-08-24 20:56:41 +0000
committerflop25 <flop25@piwigo.org>2014-08-24 20:56:41 +0000
commit02ce640d3e2478cddd3d8cad301e5fd090b11bd3 (patch)
tree79e8bc20acc051aca7c54a3497911973371b7b13 /admin/cat_modify.php
parent9e0872fa6ffe20b246f9415783f7f67bae45eb89 (diff)
feature:3126
Apply on subalbum checkbox about comments git-svn-id: http://piwigo.org/svn/trunk@29265 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/cat_modify.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index a3c34ada5..c2d47fb51 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -132,6 +132,16 @@ if (isset($_POST['submit']))
$data,
array('id' => $data['id'])
);
+ if ($_POST['apply_commentable_on_sub'])
+ {
+ $subcats = get_subcat_ids(array('id' => $data['id']));
+ $query = '
+UPDATE '.CATEGORIES_TABLE.'
+ SET commentable = \''.$data['commentable'].'\'
+ WHERE id IN ('.implode(',', $subcats).')
+;';
+ pwg_query($query);
+ }
// retrieve cat infos before continuing (following updates are expensive)
$cat_info = get_cat_info($_GET['cat_id']);