Browse code

Fixed deprecated mysql_* call in installer

Rainer Volkrodt authored on 2016/09/25 06:21:05
Showing 1 changed files
... ...
@@ -158,9 +158,9 @@ switch($_GET['step']) {
158 158
 			else $fail =  write_message(_PASSWORDTWICE);
159 159
 			if(!isset($fail)) {
160 160
 				$result = dbquery("INSERT INTO ".$tableprefix."fanfiction_authors(`penname`, `email`, `password`, `date`) VALUES('$penname', '".$_POST['email']."', '$encryptpassword', now( ))");
161
+				define("USERUID", dbinsertid( ));
161 162
 				$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
162 163
 				list($skin) = dbrow($skinquery);
163
-				define("USERUID", dbinsertid( ));
164 164
 				$result2 = dbquery("INSERT INTO ".$tableprefix."fanfiction_authorprefs(`uid`, `userskin`, `level`) VALUES('".USERUID."', '$skin', '1')");
165 165
 				if($result && $result2) $output .= write_message(_ACTIONSUCCESSFUL."<br /><br />Installation complete!  <a href='../user.php?action=login'>Log in</a> to your site and go to the Admin area to configure your archive. <strong>Note:</strong> Please delete the install/ folder!");
166 166
 			}
... ...
@@ -901,7 +901,7 @@ else $output .= write_message(_SETTINGSTABLEAUTOFAIL."<br /><br /> <a href='inst
901 901
 			$language = $_POST['language'];
902 902
 			$sitekey = descript($_POST['sitekey']);
903 903
 			$settingsprefix = descript($_POST['settingsprefix']);
904
-			$mysql_access = mysql_connect($dbhost, $dbuser, $dbpass);
904
+			$mysql_access = mysqli_connect($dbhost, $dbuser, $dbpass);
905 905
 			if(!$mysql_access) {
906 906
 				$output .= write_message(_CONFIGFAILED);
907 907
 			}