From 17246da0890c27a4598db4b808daba2362a48a4b Mon Sep 17 00:00:00 2001 From: rub Date: Mon, 12 Mar 2007 23:10:35 +0000 Subject: 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 --- include/functions_mail.inc.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'include/functions_mail.inc.php') diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php index 7307781f2..61a637fcf 100644 --- a/include/functions_mail.inc.php +++ b/include/functions_mail.inc.php @@ -196,6 +196,19 @@ order by return $result; } +/* Return a standard block useful for admin mail */ +function get_block_mail_admin_info() +{ + global $user; + + return + "\n" + .'Connected user: '.$user['username']."\n" + .'IP: '.$_SERVER['REMOTE_ADDR']."\n" + .'Browser: '.$_SERVER['HTTP_USER_AGENT']."\n" + ."\n"; +} + /** * sends an email, using PhpWebGallery specific informations * @@ -373,7 +386,12 @@ function pwg_mail($to, $args = array()) // Content if (($args['content_format'] == 'text/plain') and ($args['email_format'] == 'text/html')) { - $content.= '

'.nl2br(htmlentities($args['content'])).'

'; + $content.= '

'. + nl2br( + preg_replace("/(http:\/\/)([^\s,]*)/i", + "$1$2", + htmlentities($args['content']))). + '

'; } else { -- cgit v1.2.3