diff options
author | rub <rub@piwigo.org> | 2007-02-14 22:53:04 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-02-14 22:53:04 +0000 |
commit | bb7899060119334c8a6feb2eaa63f6276f2da306 (patch) | |
tree | 94b0106214554f4a38ba86a2fbb167de09d5cc92 /include/picture_comment.inc.php | |
parent | aabdb3e9295474760b2d3fd5d76d2c235970fe16 (diff) |
My last improvements before 1.7.0RC1.
Can include Cc & Bcc on mail.
Send mail to all administrators on new comment or new users.
Add validate link on new comment mail.
Try to detect if the NBM complementary content is HTML or plain text. With plain text, this content is convert to readable HTML.
git-svn-id: http://piwigo.org/svn/trunk@1818 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/picture_comment.inc.php')
-rw-r--r-- | include/picture_comment.inc.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index e9bad6f79..eb99f9f64 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -209,6 +209,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) ) { include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); + $val_url = get_absolute_root_url().'comments.php?validate='.$comm['id']; $del_url = get_absolute_root_url().'comments.php?delete='.$comm['id']; $content = @@ -216,6 +217,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) ) .'Comment: '.$comm['content']."\n" .'IP: '.$comm['ip']."\n" .'Browser: '.$comm['agent']."\n\n" + .'Validate: '.$val_url."\n" .'Delete: '.$del_url."\n"; if ($comment_action!='validate') { @@ -223,8 +225,16 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) ) 'Validate: '.get_absolute_root_url() .'comments.php?validate='.$comm['id']; } - pwg_mail(get_webmaster_mail_address(), - array('subject' => 'PWG comment by '.$comm['author'], 'content' => $content)); + pwg_mail + ( + format_email('administrators', get_webmaster_mail_address()), + array + ( + 'subject' => 'PWG comment by '.$comm['author'], + 'content' => $content, + 'Bcc' => get_administrators_email() + ) + ); } } else |