Completed
Pull Request — release-2.1 (#3761)
by Rick
10:12 queued 03:10
created
other/upgrade.php 1 patch
Doc Comments   +22 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,6 +187,9 @@  discard block
 block discarded – undo
187 187
 // MD5 Encryption.
188 188
 if (!function_exists('md5_hmac'))
189 189
 {
190
+	/**
191
+	 * @param string $key
192
+	 */
190 193
 	function md5_hmac($data, $key)
191 194
 	{
192 195
 		if (strlen($key) > 64)
@@ -421,6 +424,9 @@  discard block
 block discarded – undo
421 424
 }
422 425
 
423 426
 // Used to direct the user to another location.
427
+/**
428
+ * @param string $location
429
+ */
424 430
 function redirectLocation($location, $addForm = true)
425 431
 {
426 432
 	global $upgradeurl, $upcontext, $command_line;
@@ -1787,6 +1793,9 @@  discard block
 block discarded – undo
1787 1793
 	return addslashes(preg_replace(array('~^\.([/\\\]|$)~', '~[/]+~', '~[\\\]+~', '~[/\\\]$~'), array($install_path . '$1', '/', '\\', ''), $path));
1788 1794
 }
1789 1795
 
1796
+/**
1797
+ * @param string $filename
1798
+ */
1790 1799
 function parse_sql($filename)
1791 1800
 {
1792 1801
 	global $db_prefix, $db_collation, $boarddir, $boardurl, $command_line, $file_steps, $step_progress, $custom_warning;
@@ -2073,6 +2082,9 @@  discard block
 block discarded – undo
2073 2082
 	return true;
2074 2083
 }
2075 2084
 
2085
+/**
2086
+ * @param string $string
2087
+ */
2076 2088
 function upgrade_query($string, $unbuffered = false)
2077 2089
 {
2078 2090
 	global $db_connection, $db_server, $db_user, $db_passwd, $db_type, $command_line, $upcontext, $upgradeurl, $modSettings;
@@ -2676,6 +2688,9 @@  discard block
 block discarded – undo
2676 2688
 	$upcontext['current_step'] = 1;
2677 2689
 }
2678 2690
 
2691
+/**
2692
+ * @param string $message
2693
+ */
2679 2694
 function print_error($message, $fatal = false)
2680 2695
 {
2681 2696
 	static $fp = null;
@@ -2689,6 +2704,9 @@  discard block
 block discarded – undo
2689 2704
 		exit;
2690 2705
 }
2691 2706
 
2707
+/**
2708
+ * @param string $message
2709
+ */
2692 2710
 function throw_error($message)
2693 2711
 {
2694 2712
 	global $upcontext;
@@ -2700,6 +2718,9 @@  discard block
 block discarded – undo
2700 2718
 }
2701 2719
 
2702 2720
 // Check files are writable - make them writable if necessary...
2721
+/**
2722
+ * @param string[] $files
2723
+ */
2703 2724
 function makeFilesWritable(&$files)
2704 2725
 {
2705 2726
 	global $upcontext, $boarddir;
@@ -5024,7 +5045,7 @@  discard block
 block discarded – undo
5024 5045
  * @param int $setSize The amount of entries after which to update the database.
5025 5046
  *
5026 5047
  * newCol needs to be a varbinary(16) null able field
5027
- * @return bool
5048
+ * @return boolean|null
5028 5049
  */
5029 5050
 function MySQLConvertOldIp($targetTable, $oldCol, $newCol, $limit = 50000, $setSize = 100)
5030 5051
 {
Please login to merge, or discard this patch.