From a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 09:20:55 +0100 Subject: Update to MediaWiki 1.17.1 --- includes/installer/DatabaseUpdater.php | 2 +- includes/installer/Installer.i18n.php | 1 + includes/installer/Installer.php | 17 ++++++++++++----- includes/installer/LocalSettingsGenerator.php | 2 +- includes/installer/OracleUpdater.php | 16 ++++++++++++++++ 5 files changed, 31 insertions(+), 7 deletions(-) (limited to 'includes/installer') diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 79928d1f..57d82ea3 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -99,7 +99,7 @@ abstract class DatabaseUpdater { if ( !$vars ) { return; // no LocalSettings found } - if ( !isset( $vars['wgHooks'] ) && !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { + if ( !isset( $vars['wgHooks'] ) || !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { return; } global $wgHooks, $wgAutoloadClasses; diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index d6a8a757..dc3147a7 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -503,6 +503,7 @@ Skipping default list.", 'config-insecure-keys' => "'''Warning:''' {{PLURAL:$2|A secure key|Secure keys}} ($1) generated during installation {{PLURAL:$2|is|are}} not completely safe. Consider changing {{PLURAL:$2|it|them}} manually.", 'config-install-sysop' => 'Creating administrator user account', 'config-install-subscribe-fail' => 'Unable to subscribe to mediawiki-announce: $1', + 'config-install-subscribe-notpossible' => 'cURL is not installed and allow_url_fopen is not available.', 'config-install-mainpage' => 'Creating main page with default content', 'config-install-extension-tables' => 'Creating tables for enabled extensions', 'config-install-mainpage-failed' => 'Could not insert main page: $1', diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 6da4f100..9ae5e3f3 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -643,7 +643,7 @@ abstract class Installer { * Environment check for register_globals. */ protected function envCheckRegisterGlobals() { - if( wfIniGetBool( "magic_quotes_runtime" ) ) { + if( wfIniGetBool( 'register_globals' ) ) { $this->showMessage( 'config-register-globals' ); } } @@ -782,6 +782,9 @@ abstract class Installer { $caches = array(); foreach ( $this->objectCaches as $name => $function ) { if ( function_exists( $function ) ) { + if ( $name == 'xcache' && !wfIniGetBool( 'xcache.var_size' ) ) { + continue; + } $caches[$name] = true; } } @@ -1441,10 +1444,14 @@ abstract class Installer { $params['language'] = $myLang; } - $res = MWHttpRequest::factory( $this->mediaWikiAnnounceUrl, - array( 'method' => 'POST', 'postData' => $params ) )->execute(); - if( !$res->isOK() ) { - $s->warning( 'config-install-subscribe-fail', $res->getMessage() ); + if( MWHttpRequest::canMakeRequests() ) { + $res = MWHttpRequest::factory( $this->mediaWikiAnnounceUrl, + array( 'method' => 'POST', 'postData' => $params ) )->execute(); + if( !$res->isOK() ) { + $s->warning( 'config-install-subscribe-fail', $res->getMessage() ); + } + } else { + $s->warning( 'config-install-subscribe-notpossible' ); } } diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 04926c9b..2d7fd252 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -129,7 +129,7 @@ class LocalSettingsGenerator { foreach( $this->extensions as $extName ) { $encExtName = self::escapePhpString( $extName ); - $localSettings .= "require( \"extensions/$encExtName/$encExtName.php\" );\n"; + $localSettings .= "require_once( \"extensions/$encExtName/$encExtName.php\" );\n"; } } diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index 4d85924e..7664a418 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -21,6 +21,7 @@ class OracleUpdater extends DatabaseUpdater { array( 'doFunctions17' ), array( 'doSchemaUpgrade17' ), array( 'doInsertPage0' ), + array( 'doRemoveNotNullEmptyDefaults' ), ); } @@ -102,6 +103,21 @@ class OracleUpdater extends DatabaseUpdater { $this->output( "ok\n" ); } + /** + * Remove DEFAULT '' NOT NULL constraints from fields as '' is internally + * converted to NULL in Oracle + */ + protected function doRemoveNotNullEmptyDefaults() { + $this->output( "Removing not null empty constraints ... " ); + $meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' ); + if ( $meta->isNullable() ) { + $this->output( "constraints seem to be removed\n" ); + return; + } + $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false ); + $this->output( "ok\n" ); + } + /** * Overload: after this action field info table has to be rebuilt */ -- cgit v1.2.2