@@ -382,7 +382,7 @@ |
||
| 382 | 382 | * @param array $parameters Not used? |
| 383 | 383 | * @param string $if_exists What to do if the index exists. If 'update', the definition will be updated. |
| 384 | 384 | * @param string $error |
| 385 | - * @return boolean Whether or not the operation was successful |
|
| 385 | + * @return false|null Whether or not the operation was successful |
|
| 386 | 386 | */ |
| 387 | 387 | function smf_db_add_index($table_name, $index_info, $parameters = array(), $if_exists = 'update', $error = 'fatal') |
| 388 | 388 | { |
@@ -325,7 +325,7 @@ |
||
| 325 | 325 | * Validates a IPv6 address. returns true if it is ipv6. |
| 326 | 326 | * |
| 327 | 327 | * @param string $ip The ip address to be validated |
| 328 | - * @return boolean Whether the specified IP is a valid IPv6 address |
|
| 328 | + * @return false|string Whether the specified IP is a valid IPv6 address |
|
| 329 | 329 | */ |
| 330 | 330 | function isValidIPv6($ip) |
| 331 | 331 | { |
@@ -426,8 +426,8 @@ |
||
| 426 | 426 | */ |
| 427 | 427 | function matchIPtoCIDR($ip_address, $cidr_address) |
| 428 | 428 | { |
| 429 | - list ($cidr_network, $cidr_subnetmask) = preg_split('/', $cidr_address); |
|
| 430 | - return (ip2long($ip_address) & (~((1 << (32 - $cidr_subnetmask)) - 1))) == ip2long($cidr_network); |
|
| 429 | + list ($cidr_network, $cidr_subnetmask) = preg_split('/', $cidr_address); |
|
| 430 | + return (ip2long($ip_address) & (~((1 << (32 - $cidr_subnetmask)) - 1))) == ip2long($cidr_network); |
|
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | /** |
@@ -382,7 +382,7 @@ |
||
| 382 | 382 | * @param array $parameters Not used? |
| 383 | 383 | * @param string $if_exists What to do if the index exists. If 'update', the definition will be updated. |
| 384 | 384 | * @param string $error |
| 385 | - * @return boolean Whether or not the operation was successful |
|
| 385 | + * @return false|null Whether or not the operation was successful |
|
| 386 | 386 | */ |
| 387 | 387 | function smf_db_add_index($table_name, $index_info, $parameters = array(), $if_exists = 'update', $error = 'fatal') |
| 388 | 388 | { |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | * - caches the formatting data from the setting for optimization. |
| 677 | 677 | * |
| 678 | 678 | * @param float $number A number |
| 679 | - * @param bool|int $override_decimal_count If set, will use the specified number of decimal places. Otherwise it's automatically determined |
|
| 679 | + * @param integer $override_decimal_count If set, will use the specified number of decimal places. Otherwise it's automatically determined |
|
| 680 | 680 | * @return string A formatted number |
| 681 | 681 | */ |
| 682 | 682 | function comma_format($number, $override_decimal_count = false) |
@@ -5527,7 +5527,7 @@ discard block |
||
| 5527 | 5527 | * It assumes the data is already a string. |
| 5528 | 5528 | * @param string $data The data to print |
| 5529 | 5529 | * @param string $type The content type. Defaults to Json. |
| 5530 | - * @return void |
|
| 5530 | + * @return false|null |
|
| 5531 | 5531 | */ |
| 5532 | 5532 | function smf_serverResponse($data = '', $type = 'Content-Type: application/json') |
| 5533 | 5533 | { |
@@ -5475,7 +5475,6 @@ discard block |
||
| 5475 | 5475 | |
| 5476 | 5476 | /** |
| 5477 | 5477 | * Tries different modes to make file/dirs writable. Wrapper function for chmod() |
| 5478 | - |
|
| 5479 | 5478 | * @param string $file The file/dir full path. |
| 5480 | 5479 | * @param int $value Not needed, added for legacy reasons. |
| 5481 | 5480 | * @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. |
@@ -5515,7 +5514,6 @@ discard block |
||
| 5515 | 5514 | |
| 5516 | 5515 | /** |
| 5517 | 5516 | * Wrapper function for json_decode() with error handling. |
| 5518 | - |
|
| 5519 | 5517 | * @param string $json The string to decode. |
| 5520 | 5518 | * @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. |
| 5521 | 5519 | * @param bool $logIt To specify if the error will be logged if theres any. |
@@ -6006,7 +6004,7 @@ discard block |
||
| 6006 | 6004 | $cont = stream_context_get_params($read); |
| 6007 | 6005 | $result = isset($cont["options"]["ssl"]["peer_certificate"]) ? true : false; |
| 6008 | 6006 | } |
| 6009 | - return $result; |
|
| 6007 | + return $result; |
|
| 6010 | 6008 | } |
| 6011 | 6009 | |
| 6012 | 6010 | /** |
@@ -2259,9 +2259,9 @@ discard block |
||
| 2259 | 2259 | * |
| 2260 | 2260 | * @uses the template_include() function to include the file. |
| 2261 | 2261 | * @param string $template_name The name of the template to load |
| 2262 | - * @param array|string $style_sheets The name of a single stylesheet or an array of names of stylesheets to load |
|
| 2262 | + * @param string $style_sheets The name of a single stylesheet or an array of names of stylesheets to load |
|
| 2263 | 2263 | * @param bool $fatal If true, dies with an error message if the template cannot be found |
| 2264 | - * @return boolean Whether or not the template was loaded |
|
| 2264 | + * @return boolean|null Whether or not the template was loaded |
|
| 2265 | 2265 | */ |
| 2266 | 2266 | function loadTemplate($template_name, $style_sheets = array(), $fatal = true) |
| 2267 | 2267 | { |
@@ -2444,7 +2444,7 @@ discard block |
||
| 2444 | 2444 | * - all code added with this function is added to the same <style> tag so do make sure your css is valid! |
| 2445 | 2445 | * |
| 2446 | 2446 | * @param string $css Some css code |
| 2447 | - * @return void|bool Adds the CSS to the $context['css_header'] array or returns if no CSS is specified |
|
| 2447 | + * @return false|null Adds the CSS to the $context['css_header'] array or returns if no CSS is specified |
|
| 2448 | 2448 | */ |
| 2449 | 2449 | function addInlineCss($css) |
| 2450 | 2450 | { |
@@ -2558,7 +2558,7 @@ discard block |
||
| 2558 | 2558 | * |
| 2559 | 2559 | * @param string $javascript Some JS code |
| 2560 | 2560 | * @param bool $defer Whether the script should load in <head> or before the closing <html> tag |
| 2561 | - * @return void|bool Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified |
|
| 2561 | + * @return false|null Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified |
|
| 2562 | 2562 | */ |
| 2563 | 2563 | function addInlineJavaScript($javascript, $defer = false) |
| 2564 | 2564 | { |
@@ -2791,7 +2791,7 @@ discard block |
||
| 2791 | 2791 | * It will try to choose only utf8 or non-utf8 languages. |
| 2792 | 2792 | * |
| 2793 | 2793 | * @param bool $use_cache Whether or not to use the cache |
| 2794 | - * @return array An array of information about available languages |
|
| 2794 | + * @return string An array of information about available languages |
|
| 2795 | 2795 | */ |
| 2796 | 2796 | function getLanguages($use_cache = true) |
| 2797 | 2797 | { |