aboutsummaryrefslogtreecommitdiffstats
path: root/comments.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-11-22 04:41:25 +0000
committerrvelices <rv-github@modusoptimus.com>2006-11-22 04:41:25 +0000
commit5de8aeafad74a35be113fd34917d66a5b10fce1e (patch)
tree56cb2caacdb76b74fbfbb21c07da340ac6830429 /comments.php
parentf3db3ef388192e4f004e5c36524608e7e300cb47 (diff)
feature 440: send mail to admin when comment is entered
git-svn-id: http://piwigo.org/svn/trunk@1617 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'comments.php')
-rw-r--r--comments.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/comments.php b/comments.php
index 8786605ef..4d9ca26db 100644
--- a/comments.php
+++ b/comments.php
@@ -155,28 +155,30 @@ else
// +-----------------------------------------------------------------------+
// | comments management |
// +-----------------------------------------------------------------------+
-if (is_admin() and !is_adviser() )
-{
- if (isset($_GET['delete']) and is_numeric($_GET['delete']) )
- {// comments deletion
- $query = '
+if (isset($_GET['delete']) and is_numeric($_GET['delete'])
+ and !is_adviser() )
+{// comments deletion
+ check_status(ACCESS_ADMINISTRATOR);
+ $query = '
DELETE FROM '.COMMENTS_TABLE.'
WHERE id='.$_GET['delete'].'
;';
- pwg_query($query);
- }
+ pwg_query($query);
+}
- if (isset($_GET['validate']) and is_numeric($_GET['validate']) )
- { // comments validation
- $query = '
+if (isset($_GET['validate']) and is_numeric($_GET['validate'])
+ and !is_adviser() )
+{ // comments validation
+ check_status(ACCESS_ADMINISTRATOR);
+ $query = '
UPDATE '.COMMENTS_TABLE.'
SET validated = \'true\'
- , validation_date = NOW()
+ , validation_date = NOW()
WHERE id='.$_GET['validate'].'
;';
- pwg_query($query);
- }
+ pwg_query($query);
}
+
// +-----------------------------------------------------------------------+
// | page header and options |
// +-----------------------------------------------------------------------+