浏览代码

Merge pull request #629 from Oldiesmann/release-2.1

Don't complain about the database version when there's a DB error (as per #507)...
Michael Eshom 11 年之前
父节点
当前提交
8a963902f5

+ 0 - 4
Sources/Subs-Db-mysql.php

@@ -636,10 +636,6 @@ function smf_db_error($db_string, $connection = null)
 	else
 		$context['error_message'] = $txt['try_again'];
 
-	// A database error is often the sign of a database in need of upgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
-	if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
-		$context['error_message'] .= '<br /><br />' . sprintf($txt['database_error_versions'], $forum_version, $modSettings['smfVersion']);
-
 	if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
 	{
 		$context['error_message'] .= '<br /><br />' . nl2br($db_string);

+ 0 - 4
Sources/Subs-Db-mysqli.php

@@ -686,10 +686,6 @@ function smf_db_error($db_string, $connection = null)
 	else
 		$context['error_message'] = $txt['try_again'];
 
-	// A database error is often the sign of a database in need of upgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
-	if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
-		$context['error_message'] .= '<br /><br />' . sprintf($txt['database_error_versions'], $forum_version, $modSettings['smfVersion']);
-
 	if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
 	{
 		$context['error_message'] .= '<br /><br />' . nl2br($db_string);

+ 0 - 4
Sources/Subs-Db-postgresql.php

@@ -585,10 +585,6 @@ function smf_db_error($db_string, $connection = null)
 	else
 		$context['error_message'] = $txt['try_again'];
 
-	// A database error is often the sign of a database in need of updgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
-	if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
-		$context['error_message'] .= '<br /><br />' . sprintf($txt['database_error_versions'], $forum_version, $modSettings['smfVersion']);
-
 	if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
 	{
 		$context['error_message'] .= '<br /><br />' . nl2br($db_string);

+ 0 - 4
Sources/Subs-Db-sqlite.php

@@ -545,10 +545,6 @@ function smf_db_error($db_string, $connection = null)
 	else
 		$context['error_message'] = $txt['try_again'];
 
-	// A database error is often the sign of a database in need of updgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
-	if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
-		$context['error_message'] .= '<br /><br />' . sprintf($txt['database_error_versions'], $forum_version, $modSettings['smfVersion']);
-
 	if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
 	{
 		$context['error_message'] .= '<br /><br />' . nl2br($db_string);

+ 0 - 4
Sources/Subs-Db-sqlite3.php

@@ -650,10 +650,6 @@ function smf_db_error($db_string, $connection = null)
 	else
 		$context['error_message'] = $txt['try_again'];
 
-	// A database error is often the sign of a database in need of updgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
-	if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
-		$context['error_message'] .= '<br /><br />' . sprintf($txt['database_error_versions'], $forum_version, $modSettings['smfVersion']);
-
 	if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
 	{
 		$context['error_message'] .= '<br /><br />' . nl2br($db_string);