Ver Fonte

Merge pull request #736 from Oldiesmann/release-2.1

More upgrade bugs :/
Michael Eshom há 10 anos atrás
pai
commit
1342c1c682

+ 3 - 0
other/upgrade.php

@@ -1126,6 +1126,9 @@ function checkLogin()
 				// Figure out the password using SMF's encryption - if what they typed is right.
 				if (isset($_REQUEST['hash_passwrd']) && strlen($_REQUEST['hash_passwrd']) == 40)
 				{
+					// This is needed for validateToken, but isn't always included for some reason...
+					include_once($sourcedir . '/Security.php');
+
 					// Challenge passed.
 					$tk = validateToken('login');
 					if ($_REQUEST['hash_passwrd'] == sha1($password . $upcontext['rid'] . $tk))

+ 1 - 1
other/upgrade_2-1_mysql.sql

@@ -448,7 +448,7 @@ $get_questions = upgrade_query("
 
 	while ($row = $smcFunc['db_fetch_assoc']($get_questions))
 	{
-		$questions[] = "($language, $row['question'], serialize(array($row['answer'])))";
+		$questions[] = "($language, $row[question], serialize(array($row[answer])))";
 	}
 
 	$smcFunc['db_free_result']($get_questions);

+ 1 - 1
other/upgrade_2-1_postgresql.sql

@@ -510,7 +510,7 @@ CREATE TABLE {$db_prefix}qanda (
 
 	while ($row = $smcFunc['db_fetch_assoc']($get_questions))
 	{
-		$questions[] = "($language, $row['question'], serialize(array($row['answer'])))";
+		$questions[] = "($language, $row[question], serialize(array($row[answer])))";
 	}
 
 	$smcFunc['db_free_result']($get_questions);

+ 1 - 1
other/upgrade_2-1_sqlite.sql

@@ -500,7 +500,7 @@ CREATE TABLE IF NOT EXISTS {$db_prefix}qanda (
 
 	while ($row = $smcFunc['db_fetch_assoc']($get_questions))
 	{
-		$questions[] = "($language, $row['question'], serialize(array($row['answer'])))";
+		$questions[] = "($language, $row[question], serialize(array($row[answer])))";
 	}
 
 	$smcFunc['db_free_result']($get_questions);