@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | ) |
785 | 785 | ); |
786 | 786 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
787 | - $error_ips[] = inet_dtop($row['ip']); |
|
787 | + $error_ips[] = inet_dtop($row['ip']); |
|
788 | 788 | $smcFunc['db_free_result']($request); |
789 | 789 | |
790 | 790 | return $error_ips; |
@@ -2168,9 +2168,9 @@ discard block |
||
2168 | 2168 | |
2169 | 2169 | if ($low == '255.255.255.255') return 'unknown'; |
2170 | 2170 | if ($low == $high) |
2171 | - return $low; |
|
2171 | + return $low; |
|
2172 | 2172 | else |
2173 | - return $low . '-' . $high; |
|
2173 | + return $low . '-' . $high; |
|
2174 | 2174 | } |
2175 | 2175 | |
2176 | 2176 | /** |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | public $headers; |
95 | 95 | |
96 | 96 | /** |
97 | - * Start the curl object |
|
98 | - * - allow for user override values |
|
99 | - * |
|
100 | - * @param array $options An array of cURL options |
|
101 | - * @param int $max_redirect Maximum number of redirects |
|
102 | - */ |
|
97 | + * Start the curl object |
|
98 | + * - allow for user override values |
|
99 | + * |
|
100 | + * @param array $options An array of cURL options |
|
101 | + * @param int $max_redirect Maximum number of redirects |
|
102 | + */ |
|
103 | 103 | public function __construct($options = array(), $max_redirect = 3) |
104 | 104 | { |
105 | 105 | // Initialize class variables |
@@ -108,16 +108,16 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * Main calling function, |
|
112 | - * - will request the page data from a given $url |
|
113 | - * - optionally will post data to the page form if post data is supplied |
|
114 | - * - passed arrays will be converted to a post string joined with &'s |
|
115 | - * - calls set_options to set the curl opts array values based on the defaults and user input |
|
116 | - * |
|
117 | - * @param string $url the site we are going to fetch |
|
118 | - * @param array $post_data any post data as form name => value |
|
119 | - * @return object An instance of the curl_fetch_web_data class |
|
120 | - */ |
|
111 | + * Main calling function, |
|
112 | + * - will request the page data from a given $url |
|
113 | + * - optionally will post data to the page form if post data is supplied |
|
114 | + * - passed arrays will be converted to a post string joined with &'s |
|
115 | + * - calls set_options to set the curl opts array values based on the defaults and user input |
|
116 | + * |
|
117 | + * @param string $url the site we are going to fetch |
|
118 | + * @param array $post_data any post data as form name => value |
|
119 | + * @return object An instance of the curl_fetch_web_data class |
|
120 | + */ |
|
121 | 121 | public function get_url_data($url, $post_data = array()) |
122 | 122 | { |
123 | 123 | // POSTing some data perhaps? |
@@ -134,14 +134,14 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
137 | - * Makes the actual cURL call |
|
138 | - * - stores responses (url, code, error, headers, body) in the response array |
|
139 | - * - detects 301, 302, 307 codes and will redirect to the given response header location |
|
140 | - * |
|
141 | - * @param string $url The site to fetch |
|
142 | - * @param bool $redirect Whether or not this was a redirect request |
|
143 | - * @return void|bool Sets various properties of the class or returns false if the URL isn't specified |
|
144 | - */ |
|
137 | + * Makes the actual cURL call |
|
138 | + * - stores responses (url, code, error, headers, body) in the response array |
|
139 | + * - detects 301, 302, 307 codes and will redirect to the given response header location |
|
140 | + * |
|
141 | + * @param string $url The site to fetch |
|
142 | + * @param bool $redirect Whether or not this was a redirect request |
|
143 | + * @return void|bool Sets various properties of the class or returns false if the URL isn't specified |
|
144 | + */ |
|
145 | 145 | private function curl_request($url, $redirect = false) |
146 | 146 | { |
147 | 147 | // we do have a url I hope |
@@ -193,12 +193,12 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
196 | - * Used if being redirected to ensure we have a fully qualified address |
|
197 | - * |
|
198 | - * @param string $last_url The URL we went to |
|
199 | - * @param string $new_url The URL we were redirected to |
|
200 | - * @return string The new URL that was in the HTTP header |
|
201 | - */ |
|
196 | + * Used if being redirected to ensure we have a fully qualified address |
|
197 | + * |
|
198 | + * @param string $last_url The URL we went to |
|
199 | + * @param string $new_url The URL we were redirected to |
|
200 | + * @return string The new URL that was in the HTTP header |
|
201 | + */ |
|
202 | 202 | private function get_redirect_url($last_url = '', $new_url = '') |
203 | 203 | { |
204 | 204 | // Get the elements for these urls |
@@ -216,13 +216,13 @@ discard block |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
219 | - * Used to return the results to the calling program |
|
220 | - * - called as ->result() will return the full final array |
|
221 | - * - called as ->result('body') to just return the page source of the result |
|
222 | - * |
|
223 | - * @param string $area Used to return an area such as body, header, error |
|
224 | - * @return string The response |
|
225 | - */ |
|
219 | + * Used to return the results to the calling program |
|
220 | + * - called as ->result() will return the full final array |
|
221 | + * - called as ->result('body') to just return the page source of the result |
|
222 | + * |
|
223 | + * @param string $area Used to return an area such as body, header, error |
|
224 | + * @return string The response |
|
225 | + */ |
|
226 | 226 | public function result($area = '') |
227 | 227 | { |
228 | 228 | $max_result = count($this->response) - 1; |
@@ -235,13 +235,13 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
238 | - * Will return all results from all loops (redirects) |
|
239 | - * - Can be called as ->result_raw(x) where x is a specific loop results. |
|
240 | - * - Call as ->result_raw() for everything. |
|
241 | - * |
|
242 | - * @param string $response_number Which response we want to get |
|
243 | - * @return array|string The entire response array or just the specified response |
|
244 | - */ |
|
238 | + * Will return all results from all loops (redirects) |
|
239 | + * - Can be called as ->result_raw(x) where x is a specific loop results. |
|
240 | + * - Call as ->result_raw() for everything. |
|
241 | + * |
|
242 | + * @param string $response_number Which response we want to get |
|
243 | + * @return array|string The entire response array or just the specified response |
|
244 | + */ |
|
245 | 245 | public function result_raw($response_number = '') |
246 | 246 | { |
247 | 247 | if (!is_numeric($response_number)) |
@@ -254,13 +254,13 @@ discard block |
||
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
257 | - * Takes supplied POST data and url encodes it |
|
258 | - * - forms the date (for post) in to a string var=xyz&var2=abc&var3=123 |
|
259 | - * - drops vars with @ since we don't support sending files (uploading) |
|
260 | - * |
|
261 | - * @param array|string $post_data The raw POST data |
|
262 | - * @return string A string of post data |
|
263 | - */ |
|
257 | + * Takes supplied POST data and url encodes it |
|
258 | + * - forms the date (for post) in to a string var=xyz&var2=abc&var3=123 |
|
259 | + * - drops vars with @ since we don't support sending files (uploading) |
|
260 | + * |
|
261 | + * @param array|string $post_data The raw POST data |
|
262 | + * @return string A string of post data |
|
263 | + */ |
|
264 | 264 | private function build_post_data($post_data) |
265 | 265 | { |
266 | 266 | if (is_array($post_data)) |
@@ -279,11 +279,11 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
282 | - * Sets the final cURL options for the current call |
|
283 | - * - overwrites our default values with user supplied ones or appends new user ones to what we have |
|
284 | - * - sets the callback function now that $this is existing |
|
285 | - * @return void |
|
286 | - */ |
|
282 | + * Sets the final cURL options for the current call |
|
283 | + * - overwrites our default values with user supplied ones or appends new user ones to what we have |
|
284 | + * - sets the callback function now that $this is existing |
|
285 | + * @return void |
|
286 | + */ |
|
287 | 287 | private function set_options() |
288 | 288 | { |
289 | 289 | // Callback to parse the returned headers, if any |
@@ -308,12 +308,12 @@ discard block |
||
308 | 308 | } |
309 | 309 | |
310 | 310 | /** |
311 | - * Called to initiate a redirect from a 301, 302 or 307 header |
|
312 | - * - resets the cURL options for the loop, sets the referrer flag |
|
313 | - * |
|
314 | - * @param string $target_url The URL we want to redirect to |
|
315 | - * @param string $referer_url The URL that we're redirecting from |
|
316 | - */ |
|
311 | + * Called to initiate a redirect from a 301, 302 or 307 header |
|
312 | + * - resets the cURL options for the loop, sets the referrer flag |
|
313 | + * |
|
314 | + * @param string $target_url The URL we want to redirect to |
|
315 | + * @param string $referer_url The URL that we're redirecting from |
|
316 | + */ |
|
317 | 317 | private function redirect($target_url, $referer_url) |
318 | 318 | { |
319 | 319 | // no no I last saw that over there ... really, 301, 302, 307 |
@@ -323,13 +323,13 @@ discard block |
||
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
326 | - * Callback function to parse returned headers |
|
327 | - * - lowercases everything to make it consistent |
|
328 | - * |
|
329 | - * @param type $cr Not sure what this is used for? |
|
330 | - * @param string $header The header |
|
331 | - * @return int The length of the header |
|
332 | - */ |
|
326 | + * Callback function to parse returned headers |
|
327 | + * - lowercases everything to make it consistent |
|
328 | + * |
|
329 | + * @param type $cr Not sure what this is used for? |
|
330 | + * @param string $header The header |
|
331 | + * @return int The length of the header |
|
332 | + */ |
|
333 | 333 | private function header_callback($cr, $header) |
334 | 334 | { |
335 | 335 | $_header = trim($header); |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | { |
838 | 838 | uasort($loaded_attachments, function($a, $b) { |
839 | 839 | if ($a['filesize'] == $b['filesize']) |
840 | - return 0; |
|
840 | + return 0; |
|
841 | 841 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
842 | 842 | }); |
843 | 843 | } |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | { |
1243 | 1243 | uasort($loaded_attachments, function($a, $b) { |
1244 | 1244 | if ($a['filesize'] == $b['filesize']) |
1245 | - return 0; |
|
1245 | + return 0; |
|
1246 | 1246 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
1247 | 1247 | }); |
1248 | 1248 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | cache_put_data('wave_file/' . $user_info['ip2'], $ip2 ? $ip2 + 1 : 1, 20); |
39 | 39 | |
40 | 40 | // Fixate randomization for this word. |
41 | - $tmp = unpack('n', md5($word . session_id())); |
|
41 | + $tmp = unpack('n', md5($word . session_id())); |
|
42 | 42 | mt_srand(end($tmp)); |
43 | 43 | |
44 | 44 | // Try to see if there's a sound font in the user's language. |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | class CreatePost_Notify_Background extends SMF_BackgroundTask |
19 | 19 | { |
20 | 20 | /** |
21 | - * This handles notifications when a new post is created - new topic, reply, quotes and mentions. |
|
21 | + * This handles notifications when a new post is created - new topic, reply, quotes and mentions. |
|
22 | 22 | * @return bool Always returns true |
23 | 23 | */ |
24 | 24 | public function execute() |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | // Don't send a notification if the watching member ignored the member who made the action. |
108 | 108 | if (!empty($data['pm_ignore_list']) && in_array($data['id_member_updated'], explode(',', $data['pm_ignore_list']))) |
109 | - continue; |
|
109 | + continue; |
|
110 | 110 | if (!in_array($type, array('reply', 'topic')) && $notify_types == 2 && $member != $data['id_member_started']) |
111 | 111 | continue; |
112 | 112 | elseif (in_array($type, array('reply', 'topic')) && $member == $posterOptions['id']) |
@@ -18,10 +18,10 @@ |
||
18 | 18 | */ |
19 | 19 | class Birthday_Notify_Background extends SMF_BackgroundTask |
20 | 20 | { |
21 | - /** |
|
22 | - * This executes the task. It loads up the birthdays, figures out the greeting, etc. |
|
23 | - * @return bool Always returns true |
|
24 | - */ |
|
21 | + /** |
|
22 | + * This executes the task. It loads up the birthdays, figures out the greeting, etc. |
|
23 | + * @return bool Always returns true |
|
24 | + */ |
|
25 | 25 | public function execute() |
26 | 26 | { |
27 | 27 | global $txt, $smcFunc, $txtBirthdayEmails, $modSettings, $sourcedir; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | class EventNew_Notify_Background extends SMF_BackgroundTask |
21 | 21 | { |
22 | 22 | /** |
23 | - * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed. |
|
23 | + * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed. |
|
24 | 24 | * @return bool Always returns true |
25 | 25 | */ |
26 | 26 | public function execute() |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | 'content_action' => empty($this->_details['sender_id']) ? 'new_guest' : 'new', |
82 | 82 | 'is_read' => 0, |
83 | 83 | 'extra' => $smcFunc['json_encode']( |
84 | - array( |
|
85 | - "event_id" => $this->_details['event_id'], |
|
84 | + array( |
|
85 | + "event_id" => $this->_details['event_id'], |
|
86 | 86 | "event_title" => $this->_details['event_title'] |
87 | 87 | ) |
88 | 88 | ), |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | // Stick our "create a redirection topic" template in here... |
64 | 64 | template_redirect_options('move'); |
65 | 65 | |
66 | - echo ' |
|
66 | + echo ' |
|
67 | 67 | <input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button"> |
68 | 68 | </div><!-- .move_topic --> |
69 | 69 | </div><!-- .windowbg -->'; |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | */ |
87 | 87 | function template_redirect_options($type) |
88 | 88 | { |
89 | - global $txt, $context, $modSettings; |
|
89 | + global $txt, $context, $modSettings; |
|
90 | 90 | |
91 | - echo ' |
|
91 | + echo ' |
|
92 | 92 | <label for="postRedirect"> |
93 | 93 | <input type="checkbox" name="postRedirect" id="postRedirect"', $context['is_approved'] ? ' checked' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt[$type . '_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';"> ', $txt['post_redirection'], '. |
94 | 94 | </label> |
@@ -5495,7 +5495,6 @@ discard block |
||
5495 | 5495 | |
5496 | 5496 | /** |
5497 | 5497 | * Tries different modes to make file/dirs writable. Wrapper function for chmod() |
5498 | - |
|
5499 | 5498 | * @param string $file The file/dir full path. |
5500 | 5499 | * @param int $value Not needed, added for legacy reasons. |
5501 | 5500 | * @return boolean true if the file/dir is already writable or the function was able to make it writable, false if the function couldn't make the file/dir writable. |
@@ -5535,7 +5534,6 @@ discard block |
||
5535 | 5534 | |
5536 | 5535 | /** |
5537 | 5536 | * Wrapper function for json_decode() with error handling. |
5538 | - |
|
5539 | 5537 | * @param string $json The string to decode. |
5540 | 5538 | * @param bool $returnAsArray To return the decoded string as an array or an object, SMF only uses Arrays but to keep on compatibility with json_decode its set to false as default. |
5541 | 5539 | * @param bool $logIt To specify if the error will be logged if theres any. |
@@ -6029,7 +6027,7 @@ discard block |
||
6029 | 6027 | $params = stream_context_get_params($stream); |
6030 | 6028 | $result = isset($params["options"]["ssl"]["peer_certificate"]) ? true : false; |
6031 | 6029 | } |
6032 | - return $result; |
|
6030 | + return $result; |
|
6033 | 6031 | } |
6034 | 6032 | |
6035 | 6033 | /** |