summaryrefslogtreecommitdiff
path: root/includes/installer
diff options
context:
space:
mode:
Diffstat (limited to 'includes/installer')
-rw-r--r--includes/installer/DatabaseUpdater.php2
-rw-r--r--includes/installer/Installer.i18n.php1
-rw-r--r--includes/installer/Installer.php17
-rw-r--r--includes/installer/LocalSettingsGenerator.php2
-rw-r--r--includes/installer/OracleUpdater.php16
5 files changed, 31 insertions, 7 deletions
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' ),
);
}
@@ -103,6 +104,21 @@ class OracleUpdater extends DatabaseUpdater {
}
/**
+ * 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
*/
public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) {