aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
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);
+ }
+
}
}