aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-03-17 20:22:05 +0000
committerrub <rub@piwigo.org>2008-03-17 20:22:05 +0000
commit5a140f84bd455783a12267f5c49cb6893de60ecc (patch)
tree6e1f45f774b524f4ca4867546fb3c73f483d6780 /include/functions_mail.inc.php
parenta6437b81e68d5b14ded9cd2eaed7f134999ab794 (diff)
Resolved issue 0000812: Format error with "$conf['enabled_format_email'] = false;"
Merge branch-1_7 2278:2279 into BSF git-svn-id: http://piwigo.org/svn/trunk@2280 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_mail.inc.php')
-rw-r--r--include/functions_mail.inc.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index dae9b4bfc..f826572a6 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -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!="")
{
@@ -739,8 +741,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'])
@@ -763,7 +765,11 @@ function pwg_send_mail($result, $to, $subject, $content, $headers)
return mail($to, $subject, $content, $headers);
}
}
- }
+ }
+ else
+ {
+ return $result;
+ }
}
/*Testing block*/