aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-03-17 20:18:31 +0000
committerrub <rub@piwigo.org>2008-03-17 20:18:31 +0000
commitfba40ee64c7c3e75e0db109caf54141830d97e2f (patch)
treefbc27a3594c6f09f1e873c792d8d12e0037dc86a /include/functions_mail.inc.php
parentc7aea2a7dacd7f7d8d3c866753927551deb9f942 (diff)
Resolved issue 0000812: Format error with "$conf['enabled_format_email'] = false;"
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2279 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_mail.inc.php')
-rw-r--r--include/functions_mail.inc.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 3f71f78e3..fb45eef91 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -98,11 +98,13 @@ function format_email($name, $email)
{
global $conf;
+ // Spring cleaning
+ $cvt_email = trim(preg_replace('#[\n\r]+#s', '', $email));
+
if ($conf['enabled_format_email'])
{
// Spring cleaning
$cvt_name = trim(preg_replace('#[\n\r]+#s', '', $name));
- $cvt_email = trim(preg_replace('#[\n\r]+#s', '', $email));
if ($cvt_name!="")
{
@@ -747,8 +749,8 @@ function pwg_mail($to, $args = array())
*/
function pwg_send_mail($result, $to, $subject, $content, $headers)
{
- if (!$result)
- {
+ if (!$result)
+ {
global $conf_mail;
if ($conf_mail['use_smtp'])
@@ -771,7 +773,11 @@ function pwg_send_mail($result, $to, $subject, $content, $headers)
return mail($to, $subject, $content, $headers);
}
}
- }
+ }
+ else
+ {
+ return $result;
+ }
}
/*Testing block