aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2009-06-10 20:11:28 +0000
committernikrou <nikrou@piwigo.org>2009-06-10 20:11:28 +0000
commit1e8ae9e88b0b2c3959ae8b64343c1f5edc1b4fec (patch)
tree208c92bface99de522a5f7ed1f5c43b6b9947017 /picture.php
parent0ace0450a61636066d3728205a6425c2b241a002 (diff)
feature 1028 : Allow admin to validate comment from picture page
git-svn-id: http://piwigo.org/svn/trunk@3409 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--picture.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/picture.php b/picture.php
index 5aac74be7..fd42536b2 100644
--- a/picture.php
+++ b/picture.php
@@ -322,6 +322,23 @@ DELETE FROM '.COMMENTS_TABLE.'
redirect($url_self);
}
+ case 'validate_comment' :
+ {
+ if (isset($_GET['comment_to_validate'])
+ and is_numeric($_GET['comment_to_validate'])
+ and is_admin() and !is_adviser() )
+ {
+ $query = '
+UPDATE '.COMMENTS_TABLE.'
+ SET validated = \'true\'
+ , validation_date = NOW()
+ WHERE id='.$_GET['comment_to_validate'].'
+;';
+ pwg_query( $query );
+ }
+ redirect($url_self);
+ }
+
}
}