Mostly revert r53358 and r53365 per comments on code review. Change message to just...
authorAlex Z <mrzman@users.mediawiki.org>
Sat, 22 Aug 2009 20:17:28 +0000 (20:17 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Sat, 22 Aug 2009 20:17:28 +0000 (20:17 +0000)
includes/db/Database.php
includes/db/DatabaseIbm_db2.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
languages/messages/MessagesEn.php

index 3826222..33c7d04 100644 (file)
@@ -1965,15 +1965,6 @@ abstract class DatabaseBase {
         */
        abstract function getSoftwareLink();
 
         */
        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.
        /**
         * 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() ),
        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();
                }
                } else {
                        return $this->getMessage();
                }
@@ -2629,8 +2619,7 @@ class DBQueryError extends DBError {
        function getHTML() {
                if ( $this->useMessageCache() ) {
                        return wfMsgNoDB( 'dberrortext', htmlspecialchars( $this->getSQL() ),
        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() ) );
                }
                } else {
                        return nl2br( htmlspecialchars( $this->getMessage() ) );
                }
index bce92f9..0d03988 100644 (file)
@@ -1434,13 +1434,6 @@ EOF;
                return "[http://www.ibm.com/software/data/db2/express/?s_cmp=ECDDWW01&s_tact=MediaWiki IBM DB2]";
        }
        
                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.
        /**
         * Get search engine class. All subclasses of this
         * need to implement this if they wish to use searching.
index 9521a1a..533d0cd 100644 (file)
@@ -899,13 +899,6 @@ class DatabaseMssql extends DatabaseBase {
                return "[http://www.microsoft.com/sql/default.mspx Microsoft SQL Server 2005 Home]";
        }
 
                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
         */
        /**
         * @return string Version information from the database
         */
index c2a5093..9727eaf 100644 (file)
@@ -293,13 +293,6 @@ class DatabaseMysql extends DatabaseBase {
                return false;
        }
 
                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" );
        public function setTimeout( $timeout ) {
                $this->query( "SET net_read_timeout=$timeout" );
                $this->query( "SET net_write_timeout=$timeout" );
index 34ab158..dfbc769 100644 (file)
@@ -735,13 +735,6 @@ class DatabaseOracle extends DatabaseBase {
                return "[http://www.oracle.com/ Oracle]";
        }
 
                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
         */
        /**
         * @return string Version information from the database
         */
index db78cf2..fa96efe 100644 (file)
@@ -1047,13 +1047,6 @@ class DatabasePostgres extends DatabaseBase {
                return "[http://www.postgresql.org/ PostgreSQL]";
        }
 
                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
         */
        /**
         * @return string Version information from the database
         */
index 01b6b2b..4514c2b 100644 (file)
@@ -291,13 +291,6 @@ class DatabaseSqlite extends DatabaseBase {
                return "[http://sqlite.org/ SQLite]";
        }
 
                return "[http://sqlite.org/ SQLite]";
        }
 
-       /**
-        * @return String: Database type for use in messages
-       */
-       function getDBtypeForMsg() {
-               return 'SQLite';
-       }
-
        /**
         * @return string Version information from the database
         */
        /**
         * @return string Version information from the database
         */
index f23ba07..7db7be0 100644 (file)
@@ -955,12 +955,12 @@ This may indicate a bug in the software.
 The last attempted database query was:
 <blockquote><tt>$1</tt></blockquote>
 from within function "<tt>$2</tt>".
 The last attempted database query was:
 <blockquote><tt>$1</tt></blockquote>
 from within function "<tt>$2</tt>".
-$5 returned error "<tt>$3: $4</tt>".',
+Database returned error "<tt>$3: $4</tt>".',
 'dberrortextcl'        => 'A database query syntax error has occurred.
 The last attempted database query was:
 "$1"
 from within function "$2".
 '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',
 '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',