jenkins-bot has submitted this change and it was merged. Change subject: WebInstaller: Don't call getSoftwareLink() ......................................................................
WebInstaller: Don't call getSoftwareLink() This gets the web installer working without the mysql or mysqli PHP extension, which is not needed for other database systems. * Avoid "lego" construction: put link text directly in the messages, which because the messages are parsed as wikitext, is easy to do. * Put URLs in separate, ignored messages to avoid duplication in Database*::getSoftwareLink(). * Because I had to touch a MySQL-related i18n message, I figured this would be a good time to address bug 28281 (regarding MySQL forks and Special:Version). * Other miscellaneous message changes, such as recommending the mysqli PHP extension over the old, deprecated mysql extension. Bug: 28281 Bug: 58167 Manually cherry picked from Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea Change-Id: I6296a106ffaf5f24fca29eacadc7721d9b83340c --- M RELEASE-NOTES-1.22 M includes/db/DatabaseMssql.php M includes/db/DatabaseMysqlBase.php M includes/db/DatabaseOracle.php M includes/db/DatabasePostgres.php M includes/db/DatabaseSqlite.php M includes/installer/Installer.i18n.php M includes/installer/WebInstallerPage.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messageTypes.inc M maintenance/language/messages.inc 12 files changed, 69 insertions(+), 20 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 6bff5b1..1fac0e4 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -9,6 +9,7 @@ * Breaking Changes in 1.22.0 * New features in 1.22.0 * Configuration changes in 1.22.0 +* Bug fixes in 1.22.1 * Bug fixes in 1.22.0 * API changes in 1.22.0 * Languages updated in 1.22.1 @@ -325,6 +326,10 @@ script they were added for. * Default value of $wgMaxShellMemory has been tripled (it's now 300 MB). +=== Bug fixes in 1.22.1 === +* (bug 58167) The web installer no longer throws an exception when PHP is + compiled without support for MySQL yet with support for another DBMS. + === Bug fixes in 1.22.0 === * (bug 47271) $wgContentHandlerUseDB should be set to false during the upgrade * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 240a097..37f5372 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -655,7 +655,7 @@ * @return string wikitext of a link to the server software's web site */ public function getSoftwareLink() { - return "[http://www.microsoft.com/sql/ MS SQL Server]"; + return "[{{int:version-db-mssql-url}} MS SQL Server]"; } /** diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index 26c9d24..8f12b92 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -681,7 +681,14 @@ * @return string */ public function getSoftwareLink() { - return '[http://www.mysql.com/ MySQL]'; + $version = $this->getServerVersion(); + if ( strpos( $version, 'MariaDB' ) !== false ) { + return '[{{int:version-db-mariadb-url}} MariaDB]'; + } elseif ( strpos( $version, 'percona' ) !== false ) { + return '[{{int:version-db-percona-url}} Percona Server]'; + } else { + return '[{{int:version-db-mysql-url}} MySQL]'; + } } /** diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index fbaa4da..32d4d98 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -846,7 +846,7 @@ * @return string wikitext of a link to the server software's web site */ public function getSoftwareLink() { - return '[http://www.oracle.com/ Oracle]'; + return '[{{int:version-db-oracle-url}} Oracle]'; } /** diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index e564a16..576bbd9 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -1060,7 +1060,7 @@ * @return string wikitext of a link to the server software's web site */ public function getSoftwareLink() { - return '[http://www.postgresql.org/ PostgreSQL]'; + return '[{{int:version-db-postgres-url}} PostgreSQL]'; } /** diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 4a51226..3e03464 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -614,7 +614,7 @@ * @return string wikitext of a link to the server software's web site */ public function getSoftwareLink() { - return "[http://sqlite.org/ SQLite]"; + return "[{{int:version-db-sqlite-url}} SQLite]"; } /** diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index edf5ff2..16e83e4 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -100,9 +100,8 @@ 'config-no-db' => 'Could not find a suitable database driver! You need to install a database driver for PHP. The following database types are supported: $1. -If you are on shared hosting, ask your hosting provider to install a suitable database driver. -If you compiled PHP yourself, reconfigure it with a database client enabled, for example using <code>./configure --with-mysql</code>. -If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.', +If you compiled PHP yourself, reconfigure it with a database client enabled, for example, using <code>./configure --with-mysqli</code>. +If you installed PHP from a Debian or Ubuntu package, then you also need to install, for example, the <code>php5-mysql</code> package.', 'config-outdated-sqlite' => "'''Warning:''' you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable.", 'config-no-fts3' => "'''Warning:''' SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.", 'config-register-globals' => "'''Warning: PHP's <code>[http://php.net/register_globals register_globals]</code> option is enabled.''' @@ -243,7 +242,7 @@ Consider putting the database somewhere else altogether, for example in <code>/var/lib/mediawiki/yourwiki</code>.", 'config-oracle-def-ts' => 'Default tablespace:', 'config-oracle-temp-ts' => 'Temporary tablespace:', - 'config-type-mysql' => 'MySQL', + 'config-type-mysql' => 'MySQL (or compatible)', 'config-type-postgres' => 'PostgreSQL', 'config-type-sqlite' => 'SQLite', 'config-type-oracle' => 'Oracle', @@ -252,10 +251,10 @@ $1 If you do not see the database system you are trying to use listed below, then follow the instructions linked above to enable support.', - 'config-support-mysql' => '* $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])', - 'config-support-postgres' => '* $1 is a popular open source database system as an alternative to MySQL ([http://www.php.net/manual/en/pgsql.installation.php how to compile PHP with PostgreSQL support]). There may be some minor outstanding bugs, and it is not recommended for use in a production environment.', - 'config-support-sqlite' => '* $1 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-support-oracle' => '* $1 is a commercial enterprise database. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])', + 'config-dbsupport-mysql' => '* [{{int:version-db-mysql-url}} MySQL] is the primary target for MediaWiki and is best supported. MediaWiki also works with [{{int:version-db-mariadb-url}} MariaDB] and [{{int:version-db-percona-url}} Percona Server], which are MySQL compatible. ([http://www.php.net/manual/en/mysqli.installation.php How to compile PHP with MySQL support])', + 'config-dbsupport-postgres' => '* [{{int:version-db-postgres-url}} PostgreSQL] is a popular open source database system as an alternative to MySQL. There may be some minor outstanding bugs, and it is not recommended for use in a production environment. ([http://www.php.net/manual/en/pgsql.installation.php How to compile PHP with PostgreSQL support])', + 'config-dbsupport-sqlite' => '* [{{int:version-db-sqlite-url}} SQLite] is a lightweight database system that is very well supported. ([http://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], uses PDO)', + 'config-dbsupport-oracle' => '* [{{int:version-db-oracle-url}} Oracle] is a commercial enterprise database. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])', 'config-header-mysql' => 'MySQL settings', 'config-header-postgres' => 'PostgreSQL settings', 'config-header-sqlite' => 'SQLite settings', @@ -640,7 +639,7 @@ * {{msg-mw|config-env-php}}', 'config-unicode-pure-php-warning' => 'PECL is the name of a group producing standard pieces of software for PHP, and intl is the name of their library handling some aspects of internationalization.', 'config-unicode-update-warning' => "ICU is a body producing standard software tools for support of Unicode and other internationalization aspects. This message warns the system administrator installing MediaWiki that the server's software is not up-to-date and MediaWiki will have problems handling some characters.", - 'config-no-db' => '{{doc-important|Do not translate "<code>./configure --with-mysql</code>" and "<code>php5-mysql</code>".}} + 'config-no-db' => '{{doc-important|Do not translate "<code>./configure --with-mysqli</code>" and "<code>php5-mysql</code>".}} Parameters: * $1 is comma separated list of database types supported by MediaWiki.', 'config-outdated-sqlite' => 'Used as warning. Parameters: @@ -704,12 +703,12 @@ * $2 - error message', 'config-sqlite-dir-help' => '{{doc-important|Do not translate <code>.htaccess</code> and <code>/var/lib/mediawiki/yourwiki</code>.}} Used in help box.', - 'config-type-mysql' => '{{optional}}', + 'config-type-mysql' => '"Or compatible" refers to several database systems that are compatible with MySQL, as explained in {{msg-mw|config-dbsupport-mysql}}, and thus also work with this choice of database type.', 'config-type-postgres' => '{{optional}}', 'config-type-sqlite' => '{{optional}}', 'config-type-oracle' => '{{optional}}', 'config-support-info' => 'Parameters: -* $1 - a list of DBMSs that MediaWiki supports, composed with other config-type-* and config-support-* messages.', +* $1 - a list of DBMSs that MediaWiki supports, composed with config-dbsupport-* messages.', 'config-support-mysql' => 'Parameters: * $1 - a link to the MySQL home page having the anchor text "MySQL".', 'config-support-postgres' => 'Parameters: @@ -718,6 +717,10 @@ * $1 - a link to the SQLite home page having the anchor text "SQLite".', 'config-support-oracle' => 'Parameters: * $1 - a link to the Oracle home page, the anchor text of which is "Oracle".', + 'config-dbsupport-mysql' => 'Used in {{msg-mw|config-support-info}}.', + 'config-dbsupport-postgres' => 'Used in {{msg-mw|config-support-info}}.', + 'config-dbsupport-sqlite' => 'Used in {{msg-mw|config-support-info}}.', + 'config-dbsupport-oracle' => 'Used in {{msg-mw|config-support-info}}.', 'config-invalid-db-server-oracle' => 'Used as error message. Parameters: * $1 - database server name See also: diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 7e8a363..398bb6f 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -480,12 +480,11 @@ $settings = ''; $defaultType = $this->getVar( 'wgDBtype' ); - // Messages: config-support-mysql, config-support-postgres, config-support-oracle, - // config-support-sqlite + // Messages: config-dbsupport-mysql, config-dbsupport-postgres, config-dbsupport-oracle, + // config-dbsupport-sqlite $dbSupport = ''; foreach ( $this->parent->getDBTypes() as $type ) { - $link = DatabaseBase::factory( $type )->getSoftwareLink(); - $dbSupport .= wfMessage( "config-support-$type", $link )->plain() . "\n"; + $dbSupport .= wfMessage( "config-dbsupport-$type" )->plain() . "\n"; } $this->addHTML( $this->parent->getInfoBox( wfMessage( 'config-support-info', trim( $dbSupport ) )->text() ) ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index ffbc88a..0c104de 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4857,6 +4857,13 @@ 'version-software' => 'Installed software', 'version-software-product' => 'Product', 'version-software-version' => 'Version', +'version-db-mysql-url' => 'http://www.mysql.com/', # do not translate or duplicate this message to other languages +'version-db-mariadb-url' => 'http://mariadb.org/', # do not translate or duplicate this message to other languages +'version-db-percona-url' => 'http://www.percona.com/software/percona-server', # do not translate or duplicate this message to other languages +'version-db-postgres-url' => 'http://www.postgresql.org/', # do not translate or duplicate this message to other languages +'version-db-oracle-url' => 'http://www.oracle.com/database/', # do not translate or duplicate this message to other languages +'version-db-sqlite-url' => 'http://www.sqlite.org/', # do not translate or duplicate this message to other languages +'version-db-mssql-url' => 'http://www.microsoft.com/sql/', # do not translate or duplicate this message to other languages 'version-entrypoints' => 'Entry point URLs', 'version-entrypoints-header-entrypoint' => 'Entry point', 'version-entrypoints-header-url' => 'URL', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index cdb8a91..5cf19d6 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -9922,6 +9922,20 @@ This message is followed by the list of installed software (MediaWiki, PHP and MySQL).', 'version-software-product' => 'Shown in [[Special:Version]]', 'version-software-version' => '{{Identical|Version}}', +'version-db-mysql-url' => '{{notranslate}} +URL of the website for [[wikipedia:MySQL|MySQL]].', +'version-db-mariadb-url' => '{{notranslate}} +URL of the website for [[wikipedia:MariaDB|MariaDB]].', +'version-db-percona-url' => '{{notranslate}} +URL of the website for Percona Server.', +'version-db-postgres-url' => '{{notranslate}} +URL of the website for [[wikipedia:PostgreSQL|PostgreSQL]].', +'version-db-oracle-url' => '{{notranslate}} +URL of the website for [[wikipedia:Oracle Database|Oracle Database]].', +'version-db-sqlite-url' => '{{notranslate}} +URL of the website for [[wikipedia:SQLite|SQLite]].', +'version-db-mssql-url' => '{{notranslate}} +URL of the website for [[wikipedia:Microsoft SQL Server|Microsoft SQL Server]].', 'version-entrypoints' => 'Header on [[Special:Version]] above a table that lists the URLs of various entry points in this MediaWiki installation. Entry points are the "places" where the wiki\'s content and information can be accessed in various ways, for instance the standard index.php which shows normal pages, histories etc.', 'version-entrypoints-header-entrypoint' => 'Header for the first column in the entry points table on [[Special:Version]]. See also {{msg-mw|Version-entrypoints}}', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 8676d74..0b9b7cb 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -245,6 +245,13 @@ 'tags-summary', 'comparepages-summary', 'resettokens-summary', + 'version-db-mysql-url', + 'version-db-mariadb-url', + 'version-db-percona-url', + 'version-db-postgres-url', + 'version-db-oracle-url', + 'version-db-sqlite-url', + 'version-db-mssql-url', 'version-entrypoints-index-php', 'version-entrypoints-api-php', 'version-entrypoints-load-php', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 5e8e974..de163a6 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -3706,6 +3706,13 @@ 'version-software', 'version-software-product', 'version-software-version', + 'version-db-mysql-url', + 'version-db-mariadb-url', + 'version-db-percona-url', + 'version-db-postgres-url', + 'version-db-oracle-url', + 'version-db-sqlite-url', + 'version-db-mssql-url', 'version-entrypoints', 'version-entrypoints-header-entrypoint', 'version-entrypoints-header-url', -- To view, visit https://gerrit.wikimedia.org/r/106953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6296a106ffaf5f24fca29eacadc7721d9b83340c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: MarkAHershberger <mhershber...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: MarkAHershberger <mhershber...@wikimedia.org> Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits