From: Alex Z Date: Sat, 22 Aug 2009 20:17:28 +0000 (+0000) Subject: Mostly revert r53358 and r53365 per comments on code review. Change message to just... X-Git-Tag: 1.31.0-rc.0~40107 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;ds=sidebyside;h=374b9e4af14c9ee3321017970baf2a682e0037ff;p=lhc%2Fweb%2Fwiklou.git Mostly revert r53358 and r53365 per comments on code review. Change message to just say "Database" and remove the getDBtypeForMsg function (since I can't think of any other use for it) --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 3826222338..33c7d04eb0 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1965,15 +1965,6 @@ abstract class DatabaseBase { */ abstract function getSoftwareLink(); - /** - * Returns the database type for user-visible purposes - * e.g. DB error messages - * Other uses should just use $wgDBtype - * - * @return String: Database type for use in messages - */ - abstract function getDBtypeForMsg(); - /** * A string describing the current software version, like from * mysql_get_server_info(). Will be listed on Special:Version, etc. @@ -2601,8 +2592,7 @@ class DBQueryError extends DBError { function getText() { if ( $this->useMessageCache() ) { return wfMsg( 'dberrortextcl', htmlspecialchars( $this->getSQL() ), - htmlspecialchars( $this->fname ), $this->errno, htmlspecialchars( $this->error ), - htmlspecialchars( $this->db->getDBtypeForMsg() ) ) . "\n"; + htmlspecialchars( $this->fname ), $this->errno, htmlspecialchars( $this->error ) ) . "\n"; } else { return $this->getMessage(); } @@ -2629,8 +2619,7 @@ class DBQueryError extends DBError { function getHTML() { if ( $this->useMessageCache() ) { return wfMsgNoDB( 'dberrortext', htmlspecialchars( $this->getSQL() ), - htmlspecialchars( $this->fname ), $this->errno, htmlspecialchars( $this->error ), - htmlspecialchars( $this->db->getDBtypeForMsg() ) ); + htmlspecialchars( $this->fname ), $this->errno, htmlspecialchars( $this->error ) ); } else { return nl2br( htmlspecialchars( $this->getMessage() ) ); } diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index bce92f9640..0d039885cb 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -1434,13 +1434,6 @@ EOF; return "[http://www.ibm.com/software/data/db2/express/?s_cmp=ECDDWW01&s_tact=MediaWiki IBM DB2]"; } - /** - * @return String: Database type for use in messages - */ - function getDBtypeForMsg() { - return 'IBM DB2'; - } - /** * Get search engine class. All subclasses of this * need to implement this if they wish to use searching. diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 9521a1ae0b..533d0cd7a0 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -899,13 +899,6 @@ class DatabaseMssql extends DatabaseBase { return "[http://www.microsoft.com/sql/default.mspx Microsoft SQL Server 2005 Home]"; } - /** - * @return String: Database type for use in messages - */ - function getDBtypeForMsg() { - return 'Microsoft SQL Server'; - } - /** * @return string Version information from the database */ diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index c2a5093cfe..9727eaf1b3 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -293,13 +293,6 @@ class DatabaseMysql extends DatabaseBase { return false; } - /** - * @return String: Database type for use in messages - */ - function getDBtypeForMsg() { - return 'MySQL'; - } - public function setTimeout( $timeout ) { $this->query( "SET net_read_timeout=$timeout" ); $this->query( "SET net_write_timeout=$timeout" ); diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 34ab158532..dfbc769c93 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -735,13 +735,6 @@ class DatabaseOracle extends DatabaseBase { return "[http://www.oracle.com/ Oracle]"; } - /** - * @return String: Database type for use in messages - */ - function getDBtypeForMsg() { - return 'Oracle'; - } - /** * @return string Version information from the database */ diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index db78cf2f85..fa96efe156 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -1047,13 +1047,6 @@ class DatabasePostgres extends DatabaseBase { return "[http://www.postgresql.org/ PostgreSQL]"; } - /** - * @return String: Database type for use in messages - */ - function getDBtypeForMsg() { - return 'PostgreSQL'; - } - /** * @return string Version information from the database */ diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 01b6b2bbbe..4514c2b6f0 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -291,13 +291,6 @@ class DatabaseSqlite extends DatabaseBase { return "[http://sqlite.org/ SQLite]"; } - /** - * @return String: Database type for use in messages - */ - function getDBtypeForMsg() { - return 'SQLite'; - } - /** * @return string Version information from the database */ diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index f23ba07770..7db7be0587 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -955,12 +955,12 @@ This may indicate a bug in the software. The last attempted database query was:
$1
from within function "$2". -$5 returned error "$3: $4".', +Database returned error "$3: $4".', 'dberrortextcl' => 'A database query syntax error has occurred. The last attempted database query was: "$1" from within function "$2". -$5 returned error "$3: $4"', +Database returned error "$3: $4"', 'laggedslavemode' => "'''Warning:''' Page may not contain recent updates.", 'readonly' => 'Database locked', 'enterlockreason' => 'Enter a reason for the lock, including an estimate of when the lock will be released',