@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | // send an email, using PHPMailer or not. |
| 28 | 28 | // |
| 29 | -function send_email($user, $subject, $body, $body_html=null, $email_addr=null) { |
|
| 29 | +function send_email($user, $subject, $body, $body_html = null, $email_addr = null) { |
|
| 30 | 30 | if (function_exists("make_php_mailer")) { |
| 31 | 31 | if (file_exists("../inc/PHPMailer/src/PHPMailer.php") && file_exists("../inc/PHPMailer/src/SMTP.php")) { |
| 32 | 32 | require_once("../inc/PHPMailer/src/PHPMailer.php"); |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | return true; |
| 58 | 58 | } |
| 59 | 59 | } else { |
| 60 | - $headers =""; |
|
| 60 | + $headers = ""; |
|
| 61 | 61 | if (defined('EMAIL_FROM') && defined('EMAIL_FROM_NAME')) { |
| 62 | 62 | $headers = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM.">"; |
| 63 | 63 | } else if (defined('EMAIL_FROM')) { |
| 64 | - $headers = "From: ". EMAIL_FROM; |
|
| 64 | + $headers = "From: ".EMAIL_FROM; |
|
| 65 | 65 | } |
| 66 | 66 | if ($email_addr) { |
| 67 | 67 | return mail($email_addr, $subject, $body, $headers); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if (defined("USE_STOPFORUMSPAM") && USE_STOPFORUMSPAM && array_key_exists('REMOTE_ADDR', $_SERVER)) { |
| 141 | 141 | $ip = $_SERVER['REMOTE_ADDR']; |
| 142 | 142 | // For obviously private IPs check just the email against SFS, otherwise check both IP and email |
| 143 | - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { |
|
| 143 | + if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE)) { |
|
| 144 | 144 | $x = @file_get_contents("https://www.stopforumspam.com/api?ip=".$ip."&email=".$addr); |
| 145 | 145 | } else { |
| 146 | 146 | $x = @file_get_contents("https://www.stopforumspam.com/api?email=".$addr); |
@@ -151,12 +151,12 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | $pattern = '/^([^@]+)@([^@\.]+)\.([^@]{2,})$/'; |
| 153 | 153 | $match = preg_match($pattern, $addr); |
| 154 | - return (bool) $match; |
|
| 154 | + return (bool)$match; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | function send_confirm_delete_email($user) { |
| 158 | 158 | $token = create_token($user->id, TOKEN_TYPE_DELETE_ACCOUNT, TOKEN_DURATION_ONE_DAY); |
| 159 | - if ( $token === null ) { |
|
| 159 | + if ($token === null) { |
|
| 160 | 160 | error_page("Error creating token. Please try again later."); |
| 161 | 161 | } |
| 162 | 162 | |