From 224b22a051051f6c2e494c3a2fb4adb42898e2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 14 Jan 2014 19:24:18 +0100 Subject: Update to MediaWiki 1.22.1 --- includes/installer/Installer.i18n.php | 25 ++++++++++++++----------- includes/installer/Installer.php | 2 +- includes/installer/LocalSettingsGenerator.php | 7 ++++++- includes/installer/OracleInstaller.php | 4 ++-- includes/installer/WebInstaller.php | 2 +- includes/installer/WebInstallerPage.php | 17 ++++++++++------- 6 files changed, 34 insertions(+), 23 deletions(-) (limited to 'includes/installer') diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index edf5ff25..16e83e4f 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -100,9 +100,8 @@ You should [//www.mediawiki.org/wiki/Unicode_normalization_considerations upgrad '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 ./configure --with-mysql. -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 ./configure --with-mysqli. +If you installed PHP from a Debian or Ubuntu package, then you also need to install, for example, the php5-mysql 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 [http://php.net/register_globals register_globals] option is enabled.''' @@ -243,7 +242,7 @@ That includes raw user data (email addresses, hashed passwords) as well as delet Consider putting the database somewhere else altogether, for example in /var/lib/mediawiki/yourwiki.", '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 @@ Consider putting the database somewhere else altogether, for example in /v $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 @@ See also: * {{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 "./configure --with-mysql" and "php5-mysql".}} + 'config-no-db' => '{{doc-important|Do not translate "./configure --with-mysqli" and "php5-mysql".}} Parameters: * $1 is comma separated list of database types supported by MediaWiki.', 'config-outdated-sqlite' => 'Used as warning. Parameters: @@ -704,12 +703,12 @@ Message shown when PHP parameter suhosin.get.max_value_length is be * $2 - error message', 'config-sqlite-dir-help' => '{{doc-important|Do not translate .htaccess and /var/lib/mediawiki/yourwiki.}} 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 @@ Used in help box.', * $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/Installer.php b/includes/installer/Installer.php index 36c41910..62bb2ec4 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -1411,7 +1411,7 @@ abstract class Installer { $wgVersion = "1.22"; $wgResourceModules = array(); - require_once( $file ); + require_once $file ; $e = array_values( $wgExtensionCredits ); if( $e ) { $ext = array_values( $e[0] ); diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 5c803d3e..53939826 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -145,7 +145,12 @@ class LocalSettingsGenerator { $ip = $this->installer->getVar( 'IP' ); foreach ( $this->extensions as $ext) { - $path = str_replace( $ip, '$IP', $extensions[$ext]['path'] ); + $path = str_replace( $ip, '', $extensions[$ext]['path'] ); + $prefix = ''; + if ( $path !== $extensions[$ext]['path'] ) { + $prefix = '$IP'; + } + $path = $prefix . self::escapePhpString( $path ); $localSettings .= "require_once \"$path\";\n"; } } diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php index 77575100..8ce74f42 100644 --- a/includes/installer/OracleInstaller.php +++ b/includes/installer/OracleInstaller.php @@ -91,12 +91,12 @@ class OracleInstaller extends DatabaseInstaller { public function submitConnectForm() { // Get variables from the request - $newValues = $this->setVarsFromRequest( + $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBprefix', 'wgDBuser', 'wgDBpassword' - ); + ) ); $this->parent->setVar( 'wgDBname', $this->getVar( 'wgDBuser' ) ); // Validate them diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 95765259..1f8ee00a 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -917,7 +917,7 @@ class WebInstaller extends Installer { } if ( isset( $params['rawtext'] ) ) { $labelText = $params['rawtext']; - } else if ( isset( $params['label'] ) ) { + } elseif ( isset( $params['label'] ) ) { $labelText = $this->parse( wfMessage( $params['label'] )->text() ); } else { $labelText = ""; diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 7e8a3631..ad399133 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -480,12 +480,11 @@ class WebInstaller_DBConnect extends WebInstallerPage { $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() ) ); @@ -951,7 +950,7 @@ class WebInstaller_Options extends WebInstallerPage { /* Force a recache, so we load extensions descriptions */ global $wgLang; $lc = Language::getLocalisationCache(); - $lc->initialisedLangs = array(); + $lc->setInitialisedLanguages( array() ); $lc->getItem( $wgLang->mCode, '' ); LinkCache::singleton()->useDatabase( false ); @@ -1184,10 +1183,14 @@ class WebInstaller_Options extends WebInstallerPage { $this->setVar( 'wgRightsIcon', '' ); } - $extsAvailable = array_map( function($e) { if( isset($e['name']) ) return $e['name']; }, $this->parent->findExtensions() ); + $extsAvailable = array_map( + function( $e ) { + if( isset( $e['name'] ) ) { + return $e['name']; + } + }, $this->parent->findExtensions() ); $extsToInstall = array(); foreach ( $extsAvailable as $key => $ext ) { - var_dump("config_ext-$ext"); if ( $this->parent->request->getCheck( 'config_ext-' . $ext ) ) { $extsToInstall[] = $extsAvailable[ $key ]; } -- cgit v1.2.2