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