Skip to content

Commit

Permalink
Resolved issue 0000812: Format error with "$conf['enabled_format_emai…
Browse files Browse the repository at this point in the history
…l'] = false;"

Merge branch-1_7 2278:2279 into BSF

git-svn-id: http://piwigo.org/svn/trunk@2280 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rub committed Mar 17, 2008
1 parent a6437b8 commit 5a140f8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions include/functions_mail.inc.php
Expand Up @@ -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!="")
{
Expand Down Expand Up @@ -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'])
Expand All @@ -763,7 +765,11 @@ function pwg_send_mail($result, $to, $subject, $content, $headers)
return mail($to, $subject, $content, $headers);
}
}
}
}
else
{
return $result;
}
}

/*Testing block*/
Expand Down

0 comments on commit 5a140f8

Please sign in to comment.