mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
feature 440: send mail to admin when comment is entered
git-svn-id: http://piwigo.org/svn/trunk@1617 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+15
-13
@@ -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 |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user