diff options
author | rub <rub@piwigo.org> | 2007-03-12 23:10:35 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-03-12 23:10:35 +0000 |
commit | 17246da0890c27a4598db4b808daba2362a48a4b (patch) | |
tree | a3845b41249f8cc968abe1dba536a21f67726210 /upload.php | |
parent | 4577278acc361facfbd70c6172355ee12e1b80e4 (diff) |
Add notification when a picture is loaded.
Change little translations.
Improve mail sent.
git-svn-id: http://piwigo.org/svn/trunk@1901 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | upload.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/upload.php b/upload.php index 380abc46d..36aba5b7d 100644 --- a/upload.php +++ b/upload.php @@ -222,6 +222,36 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) ) $query.= ';'; pwg_query( $query ); $page['waiting_id'] = mysql_insert_id(); + + if ($conf['email_admin_on_picture_uploaded']) + { + include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); + + $waiting_url = get_absolute_root_url().'admin.php?page=waiting'; + + $content = + 'Category: '.get_cat_display_name($category['upper_names'], null, false)."\n" + .'Picture name: '.$_FILES['picture']['name']."\n" + .'User: '.$_POST['username']."\n" + .'Email: '.$_POST['mail_address']."\n" + .'Picture name: '.$_POST['name']."\n" + .'Author: '.$_POST['author']."\n" + .'Creation Date: '.$_POST['date_creation']."\n" + .'Comment: '.$_POST['comment']."\n" + .get_block_mail_admin_info() + .'Waiting page: '.$waiting_url."\n"; + + pwg_mail + ( + format_email('administrators', get_webmaster_mail_address()), + array + ( + 'subject' => 'PWG picture uploaded by '.$_POST['username'], + 'content' => $content, + 'Bcc' => get_administrators_email() + ) + ); + } } } |