@@ -207,6 +207,9 @@ discard block |
||
| 207 | 207 | // MD5 Encryption. |
| 208 | 208 | if (!function_exists('md5_hmac')) |
| 209 | 209 | { |
| 210 | + /** |
|
| 211 | + * @param string $key |
|
| 212 | + */ |
|
| 210 | 213 | function md5_hmac($data, $key) |
| 211 | 214 | { |
| 212 | 215 | if (strlen($key) > 64) |
@@ -441,6 +444,9 @@ discard block |
||
| 441 | 444 | } |
| 442 | 445 | |
| 443 | 446 | // Used to direct the user to another location. |
| 447 | +/** |
|
| 448 | + * @param string $location |
|
| 449 | + */ |
|
| 444 | 450 | function redirectLocation($location, $addForm = true) |
| 445 | 451 | { |
| 446 | 452 | global $upgradeurl, $upcontext, $command_line; |
@@ -2127,6 +2133,9 @@ discard block |
||
| 2127 | 2133 | return addslashes(preg_replace(array('~^\.([/\\\]|$)~', '~[/]+~', '~[\\\]+~', '~[/\\\]$~'), array($install_path . '$1', '/', '\\', ''), $path)); |
| 2128 | 2134 | } |
| 2129 | 2135 | |
| 2136 | +/** |
|
| 2137 | + * @param string $filename |
|
| 2138 | + */ |
|
| 2130 | 2139 | function parse_sql($filename) |
| 2131 | 2140 | { |
| 2132 | 2141 | global $db_prefix, $db_collation, $boarddir, $boardurl, $command_line, $file_steps, $step_progress, $custom_warning; |
@@ -2413,6 +2422,9 @@ discard block |
||
| 2413 | 2422 | return true; |
| 2414 | 2423 | } |
| 2415 | 2424 | |
| 2425 | +/** |
|
| 2426 | + * @param string $string |
|
| 2427 | + */ |
|
| 2416 | 2428 | function upgrade_query($string, $unbuffered = false) |
| 2417 | 2429 | { |
| 2418 | 2430 | global $db_connection, $db_server, $db_user, $db_passwd, $db_type, $command_line, $upcontext, $upgradeurl, $modSettings; |
@@ -3042,6 +3054,9 @@ discard block |
||
| 3042 | 3054 | $upcontext['current_step'] = 1; |
| 3043 | 3055 | } |
| 3044 | 3056 | |
| 3057 | +/** |
|
| 3058 | + * @param string $message |
|
| 3059 | + */ |
|
| 3045 | 3060 | function print_error($message, $fatal = false) |
| 3046 | 3061 | { |
| 3047 | 3062 | static $fp = null; |
@@ -3055,6 +3070,9 @@ discard block |
||
| 3055 | 3070 | exit; |
| 3056 | 3071 | } |
| 3057 | 3072 | |
| 3073 | +/** |
|
| 3074 | + * @param string $message |
|
| 3075 | + */ |
|
| 3058 | 3076 | function throw_error($message) |
| 3059 | 3077 | { |
| 3060 | 3078 | global $upcontext; |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * of elements, an array of xmlArray's is returned for use with foreach. |
| 258 | 258 | * Example use: |
| 259 | 259 | * foreach ($xml->set('html/body/p') as $p) |
| 260 | - * @param $path string The path to search for. |
|
| 260 | + * @param string $path string The path to search for. |
|
| 261 | 261 | * @return array An array of xmlArray objects |
| 262 | 262 | */ |
| 263 | 263 | public function set($path) |
@@ -855,7 +855,7 @@ discard block |
||
| 855 | 855 | * Changes a files atrributes (chmod) |
| 856 | 856 | * |
| 857 | 857 | * @param string $ftp_file The file to CHMOD |
| 858 | - * @param int|string $chmod The value for the CHMOD operation |
|
| 858 | + * @param integer $chmod The value for the CHMOD operation |
|
| 859 | 859 | * @return boolean Whether or not the operation was successful |
| 860 | 860 | */ |
| 861 | 861 | public function chmod($ftp_file, $chmod) |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | * |
| 1026 | 1026 | * @param string $ftp_path The path to the directory |
| 1027 | 1027 | * @param bool $search Whether or not to get a recursive directory listing |
| 1028 | - * @return string|boolean The results of the command or false if unsuccessful |
|
| 1028 | + * @return false|string The results of the command or false if unsuccessful |
|
| 1029 | 1029 | */ |
| 1030 | 1030 | public function list_dir($ftp_path = '', $search = false) |
| 1031 | 1031 | { |
@@ -1070,7 +1070,7 @@ discard block |
||
| 1070 | 1070 | * |
| 1071 | 1071 | * @param string $file The name of a file |
| 1072 | 1072 | * @param string $listing A directory listing or null to generate one |
| 1073 | - * @return string|boolean The name of the file or false if it wasn't found |
|
| 1073 | + * @return string|false The name of the file or false if it wasn't found |
|
| 1074 | 1074 | */ |
| 1075 | 1075 | public function locate($file, $listing = null) |
| 1076 | 1076 | { |
@@ -2225,9 +2225,9 @@ discard block |
||
| 2225 | 2225 | * |
| 2226 | 2226 | * @uses the template_include() function to include the file. |
| 2227 | 2227 | * @param string $template_name The name of the template to load |
| 2228 | - * @param array|string $style_sheets The name of a single stylesheet or an array of names of stylesheets to load |
|
| 2228 | + * @param string $style_sheets The name of a single stylesheet or an array of names of stylesheets to load |
|
| 2229 | 2229 | * @param bool $fatal If true, dies with an error message if the template cannot be found |
| 2230 | - * @return boolean Whether or not the template was loaded |
|
| 2230 | + * @return boolean|null Whether or not the template was loaded |
|
| 2231 | 2231 | */ |
| 2232 | 2232 | function loadTemplate($template_name, $style_sheets = array(), $fatal = true) |
| 2233 | 2233 | { |
@@ -2411,7 +2411,7 @@ discard block |
||
| 2411 | 2411 | * - all code added with this function is added to the same <style> tag so do make sure your css is valid! |
| 2412 | 2412 | * |
| 2413 | 2413 | * @param string $css Some css code |
| 2414 | - * @return void|bool Adds the CSS to the $context['css_header'] array or returns if no CSS is specified |
|
| 2414 | + * @return false|null Adds the CSS to the $context['css_header'] array or returns if no CSS is specified |
|
| 2415 | 2415 | */ |
| 2416 | 2416 | function addInlineCss($css) |
| 2417 | 2417 | { |
@@ -2427,7 +2427,7 @@ discard block |
||
| 2427 | 2427 | /** |
| 2428 | 2428 | * Add a Javascript file for output later |
| 2429 | 2429 | |
| 2430 | - * @param string $filename The name of the file to load |
|
| 2430 | + * @param string $fileName The name of the file to load |
|
| 2431 | 2431 | * @param array $params An array of parameter info |
| 2432 | 2432 | * Keys are the following: |
| 2433 | 2433 | * - ['external'] (true/false): define if the file is a externally located file. Needs to be set to true if you are loading an external file |
@@ -2525,7 +2525,7 @@ discard block |
||
| 2525 | 2525 | * |
| 2526 | 2526 | * @param string $javascript Some JS code |
| 2527 | 2527 | * @param bool $defer Whether the script should load in <head> or before the closing <html> tag |
| 2528 | - * @return void|bool Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified |
|
| 2528 | + * @return false|null Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified |
|
| 2529 | 2529 | */ |
| 2530 | 2530 | function addInlineJavaScript($javascript, $defer = false) |
| 2531 | 2531 | { |
@@ -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) |
@@ -5015,7 +5015,7 @@ discard block |
||
| 5015 | 5015 | |
| 5016 | 5016 | /** |
| 5017 | 5017 | * @param string $ip_address An IP address in IPv4, IPv6 or decimal notation |
| 5018 | - * @return binary The IP address in binary or false |
|
| 5018 | + * @return string The IP address in binary or false |
|
| 5019 | 5019 | */ |
| 5020 | 5020 | function inet_ptod($ip_address) |
| 5021 | 5021 | { |
@@ -5413,7 +5413,7 @@ discard block |
||
| 5413 | 5413 | * It assumes the data is already a string. |
| 5414 | 5414 | * @param string $data The data to print |
| 5415 | 5415 | * @param string $type The content type. Defaults to Json. |
| 5416 | - * @return void |
|
| 5416 | + * @return false|null |
|
| 5417 | 5417 | */ |
| 5418 | 5418 | function smf_serverResponse($data = '', $type = 'Content-Type: application/json') |
| 5419 | 5419 | { |