From: Chad Horohoe Date: Sun, 22 Aug 2010 20:55:07 +0000 (+0000) Subject: Make getSoftwareLink() static so I can use it without instantiating (and opening... X-Git-Tag: 1.31.0-rc.0~35377 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=e0cb9ef9b6171573c30abec3d30f782b5a2b0baa;p=lhc%2Fweb%2Fwiklou.git Make getSoftwareLink() static so I can use it without instantiating (and opening) a bunch of databases I probably can't support. Can't have an abstract parent now, so throw an exception for anyone who writes a child class without bothering to implement it. All of this to add some helpful text links in an infobox in the installer :) --- diff --git a/includes/db/Database.php b/includes/db/Database.php index ce676e808e..9cb6b90458 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2077,7 +2077,9 @@ abstract class DatabaseBase { * * @return String: wikitext of a link to the server software's web site */ - abstract function getSoftwareLink(); + static function getSoftwareLink() { + throw new MWException( "A child class of DatabaseBase didn't implement getSoftwareLink(), shame on them" ); + } /** * A string describing the current software version, like from diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index f43c61499e..60cd817de9 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -1436,7 +1436,7 @@ EOF; * Returns link to IBM DB2 free download * @return string wikitext of a link to the server software's web site */ - public function getSoftwareLink() { + public static function getSoftwareLink() { return "[http://www.ibm.com/software/data/db2/express/?s_cmp=ECDDWW01&s_tact=MediaWiki IBM DB2]"; } diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index a1245e244f..c25c4d8f46 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -731,7 +731,7 @@ class DatabaseMssql extends DatabaseBase { /** * @return string wikitext of a link to the server software's web site */ - function getSoftwareLink() { + public static function getSoftwareLink() { return "[http://www.microsoft.com/sql/ MS SQL Server]"; } diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index b221893b71..2391c123c4 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -362,7 +362,7 @@ class DatabaseMysql extends DatabaseBase { return 'LOW_PRIORITY'; } - function getSoftwareLink() { + public static function getSoftwareLink() { return '[http://www.mysql.com/ MySQL]'; } diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index eae997c9ef..48e32d4979 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -817,7 +817,7 @@ class DatabaseOracle extends DatabaseBase { /** * @return string wikitext of a link to the server software's web site */ - function getSoftwareLink() { + public static function getSoftwareLink() { return '[http://www.oracle.com/ Oracle]'; } diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index b956a6b79f..e6c1cc2ee7 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -1143,7 +1143,7 @@ class DatabasePostgres extends DatabaseBase { /** * @return string wikitext of a link to the server software's web site */ - function getSoftwareLink() { + public static function getSoftwareLink() { return "[http://www.postgresql.org/ PostgreSQL]"; } diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index cee84d689a..83182cc2d4 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -434,7 +434,7 @@ class DatabaseSqlite extends DatabaseBase { /** * @return string wikitext of a link to the server software's web site */ - function getSoftwareLink() { + public static function getSoftwareLink() { return "[http://sqlite.org/ SQLite]"; } diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index f1af514375..4ca6090f99 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -226,6 +226,11 @@ Consider putting the database somewhere else altogether, for example in /v 'config-type-postgres' => 'PostgreSQL', 'config-type-sqlite' => 'SQLite', 'config-type-oracle' => 'Oracle', + 'config-type-info' => 'Mediawiki supports the following database systems: + +* $1 is the primary target for Mediawiki and is best supported ([http://www.php.net/manual/en/mysql.installation.php how to compile PHP with MySQL support]) +* $2 is a popular open souce database system as an alternative to MySQL ([http://www.php.net/manual/en/pgsql.installation.php how to compile PHP with PostgreSQL support]) +* $3 is a lightweight database system which is very well supported. ([http://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], uses PDO)', 'config-header-mysql' => 'MySQL settings', 'config-header-postgres' => 'PostgreSQL settings', 'config-header-sqlite' => 'SQLite settings', diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 644ba7d178..c075ea0966 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -224,6 +224,13 @@ class WebInstaller_DBConnect extends WebInstallerPage { $types = "