@@ -80,7 +80,7 @@ |
||
| 80 | 80 | /** |
| 81 | 81 | * Handles retrieving previews of news items, newsletters, signatures and warnings. |
| 82 | 82 | * Calls the appropriate function based on $_POST['item'] |
| 83 | - * @return void|bool Returns false if $_POST['item'] isn't set or isn't valid |
|
| 83 | + * @return false|null Returns false if $_POST['item'] isn't set or isn't valid |
|
| 84 | 84 | */ |
| 85 | 85 | function RetrievePreview() |
| 86 | 86 | { |
@@ -1717,7 +1717,7 @@ discard block |
||
| 1717 | 1717 | /** |
| 1718 | 1718 | * Show today's birthdays. |
| 1719 | 1719 | * @param string $output_method The output method. If 'echo', displays a list of users, otherwise returns an array of info about them. |
| 1720 | - * @return void|array Displays a list of users or returns an array of info about them depending on output_method. |
|
| 1720 | + * @return null|string Displays a list of users or returns an array of info about them depending on output_method. |
|
| 1721 | 1721 | */ |
| 1722 | 1722 | function ssi_todaysBirthdays($output_method = 'echo') |
| 1723 | 1723 | { |
@@ -1746,7 +1746,7 @@ discard block |
||
| 1746 | 1746 | /** |
| 1747 | 1747 | * Shows today's holidays. |
| 1748 | 1748 | * @param string $output_method The output method. If 'echo', displays a list of holidays, otherwise returns an array of info about them. |
| 1749 | - * @return void|array Displays a list of holidays or returns an array of info about them depending on output_method |
|
| 1749 | + * @return null|string Displays a list of holidays or returns an array of info about them depending on output_method |
|
| 1750 | 1750 | */ |
| 1751 | 1751 | function ssi_todaysHolidays($output_method = 'echo') |
| 1752 | 1752 | { |
@@ -1773,7 +1773,7 @@ discard block |
||
| 1773 | 1773 | |
| 1774 | 1774 | /** |
| 1775 | 1775 | * @param string $output_method The output method. If 'echo', displays a list of events, otherwise returns an array of info about them. |
| 1776 | - * @return void|array Displays a list of events or returns an array of info about them depending on output_method |
|
| 1776 | + * @return null|string Displays a list of events or returns an array of info about them depending on output_method |
|
| 1777 | 1777 | */ |
| 1778 | 1778 | function ssi_todaysEvents($output_method = 'echo') |
| 1779 | 1779 | { |
@@ -1807,7 +1807,7 @@ discard block |
||
| 1807 | 1807 | /** |
| 1808 | 1808 | * Shows today's calendar items (events, birthdays and holidays) |
| 1809 | 1809 | * @param string $output_method The output method. If 'echo', displays a list of calendar items, otherwise returns an array of info about them. |
| 1810 | - * @return void|array Displays a list of calendar items or returns an array of info about them depending on output_method |
|
| 1810 | + * @return null|string Displays a list of calendar items or returns an array of info about them depending on output_method |
|
| 1811 | 1811 | */ |
| 1812 | 1812 | function ssi_todaysCalendar($output_method = 'echo') |
| 1813 | 1813 | { |
@@ -2198,7 +2198,7 @@ discard block |
||
| 2198 | 2198 | * @param int|string $id The ID or username of a user |
| 2199 | 2199 | * @param string $password The password to check |
| 2200 | 2200 | * @param bool $is_username If true, treats $id as a username rather than a user ID |
| 2201 | - * @return bool Whether or not the password is correct. |
|
| 2201 | + * @return null|boolean Whether or not the password is correct. |
|
| 2202 | 2202 | */ |
| 2203 | 2203 | function ssi_checkPassword($id = null, $password = null, $is_username = false) |
| 2204 | 2204 | { |
@@ -227,7 +227,7 @@ |
||
| 227 | 227 | * @param int|string $verify_id The verification control ID |
| 228 | 228 | * @param string $display_type What type to display. Can be 'single' to only show one verification option or 'all' to show all of them |
| 229 | 229 | * @param bool $reset Whether to reset the internal tracking counter |
| 230 | - * @return bool False if there's nothing else to show, true if $display_type is 'single', nothing otherwise |
|
| 230 | + * @return boolean|null False if there's nothing else to show, true if $display_type is 'single', nothing otherwise |
|
| 231 | 231 | */ |
| 232 | 232 | function template_control_verification($verify_id, $display_type = 'all', $reset = false) |
| 233 | 233 | { |
@@ -83,6 +83,7 @@ |
||
| 83 | 83 | * Redirection topic options |
| 84 | 84 | * |
| 85 | 85 | * @var string $type What type of topic this is for - currently 'merge' or 'move'. Used to display appropriate text strings... |
| 86 | + * @param string $type |
|
| 86 | 87 | */ |
| 87 | 88 | function template_redirect_options($type) |
| 88 | 89 | { |
@@ -1096,7 +1096,7 @@ |
||
| 1096 | 1096 | /** |
| 1097 | 1097 | * CHMOD control form |
| 1098 | 1098 | * |
| 1099 | - * @return bool False if nothing to do. |
|
| 1099 | + * @return false|null False if nothing to do. |
|
| 1100 | 1100 | */ |
| 1101 | 1101 | function template_control_chmod() |
| 1102 | 1102 | { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * Make files writable. First try to use regular chmod, but if that fails, try to use FTP. |
| 143 | 143 | * |
| 144 | - * @param $files |
|
| 144 | + * @param string[] $files |
|
| 145 | 145 | * @return bool |
| 146 | 146 | */ |
| 147 | 147 | function makeFilesWritable(&$files) |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | /** |
| 382 | 382 | * Prints an error to stderr. |
| 383 | 383 | * |
| 384 | - * @param $message |
|
| 384 | + * @param string $message |
|
| 385 | 385 | * @param bool $fatal |
| 386 | 386 | */ |
| 387 | 387 | function print_error($message, $fatal = false) |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | /** |
| 401 | 401 | * Throws a graphical error message. |
| 402 | 402 | * |
| 403 | - * @param $message |
|
| 403 | + * @param string $message |
|
| 404 | 404 | * @return bool |
| 405 | 405 | */ |
| 406 | 406 | function throw_error($message) |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * Display a list of upcoming events, birthdays, and holidays. |
| 69 | 69 | * |
| 70 | 70 | * @param string $grid_name The grid name |
| 71 | - * @return void|bool Returns false if the grid doesn't exist. |
|
| 71 | + * @return false|null Returns false if the grid doesn't exist. |
|
| 72 | 72 | */ |
| 73 | 73 | function template_show_upcoming_list($grid_name) |
| 74 | 74 | { |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | * |
| 239 | 239 | * @param string $grid_name The grid name |
| 240 | 240 | * @param bool $is_mini Is this a mini grid? |
| 241 | - * @return void|bool Returns false if the grid doesn't exist. |
|
| 241 | + * @return false|null Returns false if the grid doesn't exist. |
|
| 242 | 242 | */ |
| 243 | 243 | function template_show_month_grid($grid_name, $is_mini = false) |
| 244 | 244 | { |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | * Shows a weekly grid |
| 524 | 524 | * |
| 525 | 525 | * @param string $grid_name The name of the grid |
| 526 | - * @return void|bool Returns false if the grid doesn't exist |
|
| 526 | + * @return false|null Returns false if the grid doesn't exist |
|
| 527 | 527 | */ |
| 528 | 528 | function template_show_week_grid($grid_name) |
| 529 | 529 | { |
@@ -388,6 +388,9 @@ discard block |
||
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | // Used to direct the user to another location. |
| 391 | +/** |
|
| 392 | + * @param string $location |
|
| 393 | + */ |
|
| 391 | 394 | function redirectLocation($location, $addForm = true) |
| 392 | 395 | { |
| 393 | 396 | global $upgradeurl, $upcontext, $command_line; |
@@ -1560,6 +1563,9 @@ discard block |
||
| 1560 | 1563 | return addslashes(preg_replace(array('~^\.([/\\\]|$)~', '~[/]+~', '~[\\\]+~', '~[/\\\]$~'), array($install_path . '$1', '/', '\\', ''), $path)); |
| 1561 | 1564 | } |
| 1562 | 1565 | |
| 1566 | +/** |
|
| 1567 | + * @param string $filename |
|
| 1568 | + */ |
|
| 1563 | 1569 | function parse_sql($filename) |
| 1564 | 1570 | { |
| 1565 | 1571 | global $db_prefix, $db_collation, $boarddir, $boardurl, $command_line, $file_steps, $step_progress, $custom_warning; |
@@ -1594,6 +1600,10 @@ discard block |
||
| 1594 | 1600 | |
| 1595 | 1601 | // Our custom error handler - does nothing but does stop public errors from XML! |
| 1596 | 1602 | set_error_handler( |
| 1603 | + |
|
| 1604 | + /** |
|
| 1605 | + * @param string $errno |
|
| 1606 | + */ |
|
| 1597 | 1607 | function ($errno, $errstr, $errfile, $errline) use ($support_js) |
| 1598 | 1608 | { |
| 1599 | 1609 | if ($support_js) |
@@ -1840,6 +1850,9 @@ discard block |
||
| 1840 | 1850 | return true; |
| 1841 | 1851 | } |
| 1842 | 1852 | |
| 1853 | +/** |
|
| 1854 | + * @param string $string |
|
| 1855 | + */ |
|
| 1843 | 1856 | function upgrade_query($string, $unbuffered = false) |
| 1844 | 1857 | { |
| 1845 | 1858 | global $db_connection, $db_server, $db_user, $db_passwd, $db_type, $command_line, $upcontext, $upgradeurl, $modSettings; |
@@ -4495,7 +4508,7 @@ discard block |
||
| 4495 | 4508 | * @param int $setSize The amount of entries after which to update the database. |
| 4496 | 4509 | * |
| 4497 | 4510 | * newCol needs to be a varbinary(16) null able field |
| 4498 | - * @return bool |
|
| 4511 | + * @return boolean|null |
|
| 4499 | 4512 | */ |
| 4500 | 4513 | function MySQLConvertOldIp($targetTable, $oldCol, $newCol, $limit = 50000, $setSize = 100) |
| 4501 | 4514 | { |
@@ -497,6 +497,7 @@ |
||
| 497 | 497 | * @param string $xml_format The format to use ('atom', 'rss', 'rss2' or empty for plain XML) |
| 498 | 498 | * @param array $forceCdataKeys A list of keys on which to force cdata wrapping (used by mods, maybe) |
| 499 | 499 | * @param array $nsKeys Key-value pairs of namespace prefixes to pass to cdata_parse() (used by mods, maybe) |
| 500 | + * @param string $tag |
|
| 500 | 501 | */ |
| 501 | 502 | function dumpTags($data, $i, $tag = null, $xml_format = '', $forceCdataKeys = array(), $nsKeys = array()) |
| 502 | 503 | { |