@@ -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"); |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | return true; |
59 | 59 | } |
60 | 60 | } else { |
61 | - $headers =""; |
|
61 | + $headers = ""; |
|
62 | 62 | if (defined('EMAIL_FROM') && defined('EMAIL_FROM_NAME')) { |
63 | 63 | $headers = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM.">"; |
64 | 64 | } else if (defined('EMAIL_FROM')) { |
65 | - $headers = "From: ". EMAIL_FROM; |
|
65 | + $headers = "From: ".EMAIL_FROM; |
|
66 | 66 | } |
67 | 67 | if (!$email_addr) { |
68 | 68 | $email_addr = $user->email_addr; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $body = "<html><body>\n"; |
72 | 72 | $body .= $body_html; |
73 | 73 | $body .= "\n</body></html>\n"; |
74 | - $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; |
|
74 | + $headers .= 'Content-type: text/html; charset=UTF-8'."\r\n"; |
|
75 | 75 | } |
76 | 76 | return mail($email_addr, $subject, $body, $headers); |
77 | 77 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | if (defined("USE_STOPFORUMSPAM") && USE_STOPFORUMSPAM && array_key_exists('REMOTE_ADDR', $_SERVER)) { |
147 | 147 | $ip = $_SERVER['REMOTE_ADDR']; |
148 | 148 | // For obviously private IPs check just the email against SFS, otherwise check both IP and email |
149 | - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { |
|
149 | + if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE)) { |
|
150 | 150 | $x = @file_get_contents("https://www.stopforumspam.com/api?ip=".$ip."&email=".$addr); |
151 | 151 | } else { |
152 | 152 | $x = @file_get_contents("https://www.stopforumspam.com/api?email=".$addr); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | $pattern = '/^([^@]+)@([^@\.]+)\.([^@]{2,})$/'; |
159 | 159 | $match = preg_match($pattern, $addr); |
160 | - return (bool) $match; |
|
160 | + return (bool)$match; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | function send_confirm_delete_email($user) { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | return md5($key.'oogabooga'); |
186 | 186 | } |
187 | 187 | |
188 | -function opt_out_url($user, $page="opt_out.php") { |
|
188 | +function opt_out_url($user, $page = "opt_out.php") { |
|
189 | 189 | return sprintf("%s%s?code=%s&userid=%d", |
190 | 190 | secure_url_base(), |
191 | 191 | $page, |