@@ -1732,6 +1732,9 @@ discard block |
||
| 1732 | 1732 | return true; |
| 1733 | 1733 | } |
| 1734 | 1734 | |
| 1735 | + /** |
|
| 1736 | + * @param integer $chmod |
|
| 1737 | + */ |
|
| 1735 | 1738 | function chmod($ftp_file, $chmod) |
| 1736 | 1739 | { |
| 1737 | 1740 | if (!is_resource($this->connection)) |
@@ -1748,6 +1751,9 @@ discard block |
||
| 1748 | 1751 | return true; |
| 1749 | 1752 | } |
| 1750 | 1753 | |
| 1754 | + /** |
|
| 1755 | + * @param string $ftp_file |
|
| 1756 | + */ |
|
| 1751 | 1757 | function unlink($ftp_file) |
| 1752 | 1758 | { |
| 1753 | 1759 | // We are actually connected, right? |
@@ -1816,6 +1822,9 @@ discard block |
||
| 1816 | 1822 | return true; |
| 1817 | 1823 | } |
| 1818 | 1824 | |
| 1825 | + /** |
|
| 1826 | + * @param string $ftp_file |
|
| 1827 | + */ |
|
| 1819 | 1828 | function create_file($ftp_file) |
| 1820 | 1829 | { |
| 1821 | 1830 | // First, we have to be connected... very important. |
@@ -1887,6 +1896,10 @@ discard block |
||
| 1887 | 1896 | return $data; |
| 1888 | 1897 | } |
| 1889 | 1898 | |
| 1899 | + /** |
|
| 1900 | + * @param string $file |
|
| 1901 | + * @param false|string $listing |
|
| 1902 | + */ |
|
| 1890 | 1903 | function locate($file, $listing = null) |
| 1891 | 1904 | { |
| 1892 | 1905 | if ($listing === null) |
@@ -205,6 +205,9 @@ discard block |
||
| 205 | 205 | // MD5 Encryption. |
| 206 | 206 | if (!function_exists('md5_hmac')) |
| 207 | 207 | { |
| 208 | + /** |
|
| 209 | + * @param string $key |
|
| 210 | + */ |
|
| 208 | 211 | function md5_hmac($data, $key) |
| 209 | 212 | { |
| 210 | 213 | if (strlen($key) > 64) |
@@ -293,6 +296,9 @@ discard block |
||
| 293 | 296 | return true; |
| 294 | 297 | } |
| 295 | 298 | |
| 299 | + /** |
|
| 300 | + * @param integer $chmod |
|
| 301 | + */ |
|
| 296 | 302 | function chmod($ftp_file, $chmod) |
| 297 | 303 | { |
| 298 | 304 | if (!is_resource($this->connection)) |
@@ -309,6 +315,9 @@ discard block |
||
| 309 | 315 | return true; |
| 310 | 316 | } |
| 311 | 317 | |
| 318 | + /** |
|
| 319 | + * @param string $ftp_file |
|
| 320 | + */ |
|
| 312 | 321 | function unlink($ftp_file) |
| 313 | 322 | { |
| 314 | 323 | // We are actually connected, right? |
@@ -377,6 +386,9 @@ discard block |
||
| 377 | 386 | return true; |
| 378 | 387 | } |
| 379 | 388 | |
| 389 | + /** |
|
| 390 | + * @param string $ftp_file |
|
| 391 | + */ |
|
| 380 | 392 | function create_file($ftp_file) |
| 381 | 393 | { |
| 382 | 394 | // First, we have to be connected... very important. |
@@ -448,6 +460,10 @@ discard block |
||
| 448 | 460 | return $data; |
| 449 | 461 | } |
| 450 | 462 | |
| 463 | + /** |
|
| 464 | + * @param string $file |
|
| 465 | + * @param false|string $listing |
|
| 466 | + */ |
|
| 451 | 467 | function locate($file, $listing = null) |
| 452 | 468 | { |
| 453 | 469 | if ($listing === null) |
@@ -756,6 +772,9 @@ discard block |
||
| 756 | 772 | } |
| 757 | 773 | |
| 758 | 774 | // Used to direct the user to another location. |
| 775 | +/** |
|
| 776 | + * @param string $location |
|
| 777 | + */ |
|
| 759 | 778 | function redirectLocation($location, $addForm = true) |
| 760 | 779 | { |
| 761 | 780 | global $upgradeurl, $upcontext, $command_line; |
@@ -2437,6 +2456,9 @@ discard block |
||
| 2437 | 2456 | return addslashes(preg_replace(array('~^\.([/\\\]|$)~', '~[/]+~', '~[\\\]+~', '~[/\\\]$~'), array($install_path . '$1', '/', '\\', ''), $path)); |
| 2438 | 2457 | } |
| 2439 | 2458 | |
| 2459 | +/** |
|
| 2460 | + * @param string $filename |
|
| 2461 | + */ |
|
| 2440 | 2462 | function parse_sql($filename) |
| 2441 | 2463 | { |
| 2442 | 2464 | global $db_prefix, $db_collation, $boarddir, $boardurl, $command_line, $file_steps, $step_progress, $custom_warning; |
@@ -2723,6 +2745,9 @@ discard block |
||
| 2723 | 2745 | return true; |
| 2724 | 2746 | } |
| 2725 | 2747 | |
| 2748 | +/** |
|
| 2749 | + * @param string $string |
|
| 2750 | + */ |
|
| 2726 | 2751 | function upgrade_query($string, $unbuffered = false) |
| 2727 | 2752 | { |
| 2728 | 2753 | global $db_connection, $db_server, $db_user, $db_passwd, $db_type, $command_line, $upcontext, $upgradeurl, $modSettings; |
@@ -3349,6 +3374,9 @@ discard block |
||
| 3349 | 3374 | $upcontext['current_step'] = 1; |
| 3350 | 3375 | } |
| 3351 | 3376 | |
| 3377 | +/** |
|
| 3378 | + * @param string $message |
|
| 3379 | + */ |
|
| 3352 | 3380 | function print_error($message, $fatal = false) |
| 3353 | 3381 | { |
| 3354 | 3382 | static $fp = null; |
@@ -3362,6 +3390,9 @@ discard block |
||
| 3362 | 3390 | exit; |
| 3363 | 3391 | } |
| 3364 | 3392 | |
| 3393 | +/** |
|
| 3394 | + * @param string $message |
|
| 3395 | + */ |
|
| 3365 | 3396 | function throw_error($message) |
| 3366 | 3397 | { |
| 3367 | 3398 | global $upcontext; |
@@ -44,6 +44,10 @@ discard block |
||
| 44 | 44 | $this->Buf = range(0, 279); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | + /** |
|
| 48 | + * @param string $data |
|
| 49 | + * @param integer $datLen |
|
| 50 | + */ |
|
| 47 | 51 | public function decompress($data, &$datLen) |
| 48 | 52 | { |
| 49 | 53 | $stLen = strlen($data); |
@@ -63,6 +67,11 @@ discard block |
||
| 63 | 67 | return $ret; |
| 64 | 68 | } |
| 65 | 69 | |
| 70 | + /** |
|
| 71 | + * @param boolean $bInit |
|
| 72 | + * |
|
| 73 | + * @return integer |
|
| 74 | + */ |
|
| 66 | 75 | public function LZWCommand(&$data, $bInit) |
| 67 | 76 | { |
| 68 | 77 | if ($bInit) |
@@ -253,6 +262,10 @@ discard block |
||
| 253 | 262 | unset($this->m_nColors, $this->m_arColors); |
| 254 | 263 | } |
| 255 | 264 | |
| 265 | + /** |
|
| 266 | + * @param string $lpData |
|
| 267 | + * @param integer $num |
|
| 268 | + */ |
|
| 256 | 269 | public function load($lpData, $num) |
| 257 | 270 | { |
| 258 | 271 | $this->m_nColors = 0; |
@@ -324,6 +337,9 @@ discard block |
||
| 324 | 337 | unset($this->m_bSorted, $this->m_nTableSize, $this->m_nBgColor, $this->m_nPixelRatio, $this->m_colorTable); |
| 325 | 338 | } |
| 326 | 339 | |
| 340 | + /** |
|
| 341 | + * @param integer $hdrLen |
|
| 342 | + */ |
|
| 327 | 343 | public function load($lpData, &$hdrLen) |
| 328 | 344 | { |
| 329 | 345 | $hdrLen = 0; |
@@ -370,6 +386,10 @@ discard block |
||
| 370 | 386 | unset($this->m_bInterlace, $this->m_bSorted, $this->m_nTableSize, $this->m_colorTable); |
| 371 | 387 | } |
| 372 | 388 | |
| 389 | + /** |
|
| 390 | + * @param string $lpData |
|
| 391 | + * @param integer $hdrLen |
|
| 392 | + */ |
|
| 373 | 393 | public function load($lpData, &$hdrLen) |
| 374 | 394 | { |
| 375 | 395 | $hdrLen = 0; |
@@ -412,6 +432,10 @@ discard block |
||
| 412 | 432 | $this->m_lzw = new gif_lzw_compression(); |
| 413 | 433 | } |
| 414 | 434 | |
| 435 | + /** |
|
| 436 | + * @param string $data |
|
| 437 | + * @param integer $datLen |
|
| 438 | + */ |
|
| 415 | 439 | public function load($data, &$datLen) |
| 416 | 440 | { |
| 417 | 441 | $datLen = 0; |
@@ -464,6 +488,10 @@ discard block |
||
| 464 | 488 | return false; |
| 465 | 489 | } |
| 466 | 490 | |
| 491 | + /** |
|
| 492 | + * @param string $data |
|
| 493 | + * @param integer $extLen |
|
| 494 | + */ |
|
| 467 | 495 | public function skipExt(&$data, &$extLen) |
| 468 | 496 | { |
| 469 | 497 | $extLen = 0; |
@@ -252,6 +252,9 @@ discard block |
||
| 252 | 252 | return $tree; |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | +/** |
|
| 256 | + * @param integer $count |
|
| 257 | + */ |
|
| 255 | 258 | function mama_init_dir (&$tree, &$count) |
| 256 | 259 | { |
| 257 | 260 | $directory = ''; |
@@ -448,7 +451,7 @@ discard block |
||
| 448 | 451 | * Performs various checks on an uploaded file. |
| 449 | 452 | * - Requires that $_SESSION['temp_attachments'][$attachID] be properly populated. |
| 450 | 453 | * |
| 451 | - * @param $attachID |
|
| 454 | + * @param string $attachID |
|
| 452 | 455 | */ |
| 453 | 456 | function attachmentChecks($attachID) |
| 454 | 457 | { |
@@ -86,6 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @param type $url, the site we are going to fetch |
| 88 | 88 | * @param type $post_data, any post data as form name => value |
| 89 | + * @param string $url |
|
| 89 | 90 | */ |
| 90 | 91 | public function get_url_data($url, $post_data = array()) |
| 91 | 92 | { |
@@ -109,7 +110,7 @@ discard block |
||
| 109 | 110 | * |
| 110 | 111 | * @param type $url, site to fetch |
| 111 | 112 | * @param type $redirect, flag to indicate if this was a redirect request or not |
| 112 | - * @return boolean |
|
| 113 | + * @return false|null |
|
| 113 | 114 | */ |
| 114 | 115 | private function curl_request($url, $redirect = false) |
| 115 | 116 | { |
@@ -165,7 +166,7 @@ discard block |
||
| 165 | 166 | * |
| 166 | 167 | * @param type $last_url, where we went to |
| 167 | 168 | * @param type $new_url, where we were redirected to |
| 168 | - * @return new url location |
|
| 169 | + * @return string url location |
|
| 169 | 170 | */ |
| 170 | 171 | private function get_redirect_url($last_url = '', $new_url = '') |
| 171 | 172 | { |
@@ -279,7 +280,7 @@ discard block |
||
| 279 | 280 | * Called to initiate a redirect from a 301, 302 or 307 header |
| 280 | 281 | * - resets the cURL options for the loop, sets the referrer flag |
| 281 | 282 | * |
| 282 | - * @param type $target_url |
|
| 283 | + * @param string $target_url |
|
| 283 | 284 | * @param type $referer_url |
| 284 | 285 | */ |
| 285 | 286 | private function redirect($target_url, $referer_url) |
@@ -296,7 +297,7 @@ discard block |
||
| 296 | 297 | * |
| 297 | 298 | * @param type $cr |
| 298 | 299 | * @param type $header |
| 299 | - * @return type |
|
| 300 | + * @return integer |
|
| 300 | 301 | */ |
| 301 | 302 | private function header_callback($cr, $header) |
| 302 | 303 | { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * of elements, an array of xmlArray's is returned for use with foreach. |
| 242 | 242 | * Example use: |
| 243 | 243 | * foreach ($xml->set('html/body/p') as $p) |
| 244 | - * @param $path string - the path to search for. |
|
| 244 | + * @param string $path string - the path to search for. |
|
| 245 | 245 | * @return array, an array of xmlArray objects |
| 246 | 246 | */ |
| 247 | 247 | public function set($path) |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | /** |
| 471 | 471 | * Get a specific element's xml. (privately used...) |
| 472 | 472 | * @param $array |
| 473 | - * @param $indent |
|
| 473 | + * @param null|integer $indent |
|
| 474 | 474 | */ |
| 475 | 475 | protected function _xml($array, $indent) |
| 476 | 476 | { |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | |
| 544 | 544 | /** |
| 545 | 545 | * Parse out CDATA tags. (htmlspecialchars them...) |
| 546 | - * @param $data |
|
| 546 | + * @param string $data |
|
| 547 | 547 | */ |
| 548 | 548 | function _to_cdata($data) |
| 549 | 549 | { |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | |
| 580 | 580 | /** |
| 581 | 581 | * Turn the CDATAs back to normal text. |
| 582 | - * @param $data |
|
| 582 | + * @param string $data |
|
| 583 | 583 | */ |
| 584 | 584 | protected function _from_cdata($data) |
| 585 | 585 | { |
@@ -765,6 +765,9 @@ discard block |
||
| 765 | 765 | return true; |
| 766 | 766 | } |
| 767 | 767 | |
| 768 | + /** |
|
| 769 | + * @param integer $chmod |
|
| 770 | + */ |
|
| 768 | 771 | public function chmod($ftp_file, $chmod) |
| 769 | 772 | { |
| 770 | 773 | if (!is_resource($this->connection)) |
@@ -784,6 +787,9 @@ discard block |
||
| 784 | 787 | return true; |
| 785 | 788 | } |
| 786 | 789 | |
| 790 | + /** |
|
| 791 | + * @param string $ftp_file |
|
| 792 | + */ |
|
| 787 | 793 | public function unlink($ftp_file) |
| 788 | 794 | { |
| 789 | 795 | // We are actually connected, right? |
@@ -852,6 +858,9 @@ discard block |
||
| 852 | 858 | return true; |
| 853 | 859 | } |
| 854 | 860 | |
| 861 | + /** |
|
| 862 | + * @param string $ftp_file |
|
| 863 | + */ |
|
| 855 | 864 | public function create_file($ftp_file) |
| 856 | 865 | { |
| 857 | 866 | // First, we have to be connected... very important. |
@@ -923,6 +932,10 @@ discard block |
||
| 923 | 932 | return $data; |
| 924 | 933 | } |
| 925 | 934 | |
| 935 | + /** |
|
| 936 | + * @param string $file |
|
| 937 | + * @param false|string $listing |
|
| 938 | + */ |
|
| 926 | 939 | public function locate($file, $listing = null) |
| 927 | 940 | { |
| 928 | 941 | if ($listing === null) |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | /** |
| 171 | 171 | * This function optimizes a table. |
| 172 | 172 | * @param string $table - the table to be optimized |
| 173 | - * @return how much it was gained |
|
| 173 | + * @return integer much it was gained |
|
| 174 | 174 | */ |
| 175 | 175 | function smf_db_optimize_table($table) |
| 176 | 176 | { |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | /** |
| 84 | 84 | * This function optimizes a table. |
| 85 | 85 | * @param string $table - the table to be optimized |
| 86 | - * @return how much it was gained |
|
| 86 | + * @return integer much it was gained |
|
| 87 | 87 | */ |
| 88 | 88 | function smf_db_optimize_table($table) |
| 89 | 89 | { |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | /** |
| 132 | 132 | * This function optimizes a table. |
| 133 | 133 | * @param string $table - the table to be optimized |
| 134 | - * @return how much it was gained |
|
| 134 | + * @return integer much it was gained |
|
| 135 | 135 | */ |
| 136 | 136 | function smf_db_optimize_table($table) |
| 137 | 137 | { |