@@ -20,7 +20,7 @@ |
||
| 20 | 20 | class GroupReq_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 any alerts as needed. |
|
| 23 | + * This executes the task - loads up the information, puts the email in the queue and inserts any alerts as needed. |
|
| 24 | 24 | * @return bool Always returns true. |
| 25 | 25 | */ |
| 26 | 26 | public function execute() |
@@ -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 | /** |
@@ -673,7 +673,7 @@ |
||
| 673 | 673 | 'Nikola "Dzonny" Novaković', |
| 674 | 674 | // Localizers |
| 675 | 675 | 'Dr. Deejay', |
| 676 | - 'd3vcho', |
|
| 676 | + 'd3vcho', |
|
| 677 | 677 | // Former Localizers |
| 678 | 678 | 'Relyana', |
| 679 | 679 | ), |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | |
| 83 | 83 | // The helper is crucial. Include it first thing. |
| 84 | 84 | if (!file_exists($upgrade_path . '/upgrade-helper.php')) |
| 85 | - die('upgrade-helper.php not found where it was expected: ' . $upgrade_path . '/upgrade-helper.php! Make sure you have uploaded ALL files from the upgrade package. The upgrader cannot continue.'); |
|
| 85 | + die('upgrade-helper.php not found where it was expected: ' . $upgrade_path . '/upgrade-helper.php! Make sure you have uploaded ALL files from the upgrade package. The upgrader cannot continue.'); |
|
| 86 | 86 | |
| 87 | 87 | require_once($upgrade_path . '/upgrade-helper.php'); |
| 88 | 88 | |
@@ -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 | } |
@@ -437,9 +437,9 @@ discard block |
||
| 437 | 437 | { |
| 438 | 438 | // Sort events by start time (all day events will be listed first) |
| 439 | 439 | uasort($day['events'], function($a, $b) { |
| 440 | - if ($a['start_timestamp'] == $b['start_timestamp']) |
|
| 441 | - return 0; |
|
| 442 | - return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
|
| 440 | + if ($a['start_timestamp'] == $b['start_timestamp']) |
|
| 441 | + return 0; |
|
| 442 | + return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
|
| 443 | 443 | }); |
| 444 | 444 | |
| 445 | 445 | echo ' |
@@ -619,9 +619,9 @@ discard block |
||
| 619 | 619 | { |
| 620 | 620 | // Sort events by start time (all day events will be listed first) |
| 621 | 621 | uasort($day['events'], function($a, $b) { |
| 622 | - if ($a['start_timestamp'] == $b['start_timestamp']) |
|
| 623 | - return 0; |
|
| 624 | - return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
|
| 622 | + if ($a['start_timestamp'] == $b['start_timestamp']) |
|
| 623 | + return 0; |
|
| 624 | + return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
|
| 625 | 625 | }); |
| 626 | 626 | |
| 627 | 627 | foreach ($day['events'] as $event) |
@@ -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. |
@@ -645,12 +645,12 @@ |
||
| 645 | 645 | </dd>'; |
| 646 | 646 | } |
| 647 | 647 | // A Textarea? |
| 648 | - elseif ($setting['type'] == 'textarea') |
|
| 648 | + elseif ($setting['type'] == 'textarea') |
|
| 649 | 649 | { |
| 650 | 650 | echo ' |
| 651 | 651 | <dd> |
| 652 | 652 | <textarea rows="4" style="width: 95%;" cols="40" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '">', $setting['value'], '</textarea>'; |
| 653 | - echo ' |
|
| 653 | + echo ' |
|
| 654 | 654 | </dd>'; |
| 655 | 655 | } |
| 656 | 656 | // A regular input box, then? |