Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -290,9 +290,9 @@ |
291 | 291 | } |
292 | 292 | |
293 | 293 | /** |
294 | | - * @return String: Database name for messages |
| 294 | + * @return String: Database type for use in messages |
295 | 295 | */ |
296 | | - function getDBtype() { |
| 296 | + function getDBtypeForMsg() { |
297 | 297 | return 'MySQL'; |
298 | 298 | } |
299 | 299 | |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -736,6 +736,13 @@ |
737 | 737 | } |
738 | 738 | |
739 | 739 | /** |
| 740 | + * @return String: Database type for use in messages |
| 741 | + */ |
| 742 | + function getDBtypeForMsg() { |
| 743 | + return 'Oracle'; |
| 744 | + } |
| 745 | + |
| 746 | + /** |
740 | 747 | * @return string Version information from the database |
741 | 748 | */ |
742 | 749 | function getServerVersion() { |
— | — | @@ -743,13 +750,6 @@ |
744 | 751 | } |
745 | 752 | |
746 | 753 | /** |
747 | | - * @return String: Database name for messages |
748 | | - */ |
749 | | - function getDBtype() { |
750 | | - return 'Oracle'; |
751 | | - } |
752 | | - |
753 | | - /** |
754 | 754 | * Query whether a given table exists (in the given schema, or the default mw one if not given) |
755 | 755 | */ |
756 | 756 | function tableExists($table) { |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -1048,9 +1048,9 @@ |
1049 | 1049 | } |
1050 | 1050 | |
1051 | 1051 | /** |
1052 | | - * @return String: Database name for messages |
| 1052 | + * @return String: Database type for use in messages |
1053 | 1053 | */ |
1054 | | - function getDBtype() { |
| 1054 | + function getDBtypeForMsg() { |
1055 | 1055 | return 'PostgreSQL'; |
1056 | 1056 | } |
1057 | 1057 | |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -1454,9 +1454,9 @@ |
1455 | 1455 | } |
1456 | 1456 | |
1457 | 1457 | /** |
1458 | | - * @return String: Database name for messages |
| 1458 | + * @return String: Database type for use in messages |
1459 | 1459 | */ |
1460 | | - function getDBtype() { |
| 1460 | + function getDBtypeForMsg() { |
1461 | 1461 | return 'IBM DB2'; |
1462 | 1462 | } |
1463 | 1463 | |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1943,25 +1943,21 @@ |
1944 | 1944 | /** |
1945 | 1945 | * Returns a wikitext link to the DB's website, e.g., |
1946 | 1946 | * return "[http://www.mysql.com/ MySQL]"; |
1947 | | - * Should probably be overridden to at least contain plain text, if for |
1948 | | - * some reason your database has no website. |
| 1947 | + * Should at least contain plain text, if for some reason |
| 1948 | + * your database has no website. |
1949 | 1949 | * |
1950 | 1950 | * @return String: wikitext of a link to the server software's web site |
1951 | 1951 | */ |
1952 | | - function getSoftwareLink() { |
1953 | | - return '(no software link given)'; |
1954 | | - } |
| 1952 | + abstract function getSoftwareLink(); |
1955 | 1953 | |
1956 | 1954 | /** |
1957 | 1955 | * Returns the database type for user-visible purposes |
1958 | 1956 | * e.g. DB error messages |
1959 | 1957 | * Other uses should just use $wgDBtype |
1960 | 1958 | * |
1961 | | - * @return String: Database name for messages |
| 1959 | + * @return String: Database type for use in messages |
1962 | 1960 | */ |
1963 | | - function getDBtype() { |
1964 | | - return 'Database'; |
1965 | | - } |
| 1961 | + abstract function getDBtypeForMsg(); |
1966 | 1962 | |
1967 | 1963 | /** |
1968 | 1964 | * A string describing the current software version, like from |
— | — | @@ -2560,7 +2556,7 @@ |
2561 | 2557 | if ( $this->useMessageCache() ) { |
2562 | 2558 | return wfMsg( 'dberrortextcl', htmlspecialchars( $this->getSQL() ), |
2563 | 2559 | htmlspecialchars( $this->fname ), $this->errno, htmlspecialchars( $this->error ), |
2564 | | - htmlspecialchars( $this->db->getDBtype() ) ) . "\n"; |
| 2560 | + htmlspecialchars( $this->db->getDBtypeForMsg() ) ) . "\n"; |
2565 | 2561 | } else { |
2566 | 2562 | return $this->getMessage(); |
2567 | 2563 | } |
— | — | @@ -2588,7 +2584,7 @@ |
2589 | 2585 | if ( $this->useMessageCache() ) { |
2590 | 2586 | return wfMsgNoDB( 'dberrortext', htmlspecialchars( $this->getSQL() ), |
2591 | 2587 | htmlspecialchars( $this->fname ), $this->errno, htmlspecialchars( $this->error ), |
2592 | | - htmlspecialchars( $this->db->getDBtype() ) ); |
| 2588 | + htmlspecialchars( $this->db->getDBtypeForMsg() ) ); |
2593 | 2589 | } else { |
2594 | 2590 | return nl2br( htmlspecialchars( $this->getMessage() ) ); |
2595 | 2591 | } |
Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -900,9 +900,9 @@ |
901 | 901 | } |
902 | 902 | |
903 | 903 | /** |
904 | | - * @return String: Database name for messages |
| 904 | + * @return String: Database type for use in messages |
905 | 905 | */ |
906 | | - function getDBtype() { |
| 906 | + function getDBtypeForMsg() { |
907 | 907 | return 'Microsoft SQL Server'; |
908 | 908 | } |
909 | 909 | |
Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -288,9 +288,9 @@ |
289 | 289 | } |
290 | 290 | |
291 | 291 | /** |
292 | | - * @return String: Database name for messages |
| 292 | + * @return String: Database type for use in messages |
293 | 293 | */ |
294 | | - function getDBtype() { |
| 294 | + function getDBtypeForMsg() { |
295 | 295 | return 'SQLite'; |
296 | 296 | } |
297 | 297 | |