dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Title: Simplify use of MWNamespace::getCanonicalName()"
[lhc/web/wiklou.git]
/
includes
/
installer
/
Installer.php
diff --git
a/includes/installer/Installer.php
b/includes/installer/Installer.php
index
f22b63d
..
94a5a5a
100644
(file)
--- a/
includes/installer/Installer.php
+++ b/
includes/installer/Installer.php
@@
-24,6
+24,7
@@
* @ingroup Deployment
*/
use MediaWiki\MediaWikiServices;
* @ingroup Deployment
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
/**
* This documentation group collects source code files with deployment functionality.
/**
* This documentation group collects source code files with deployment functionality.
@@
-445,7
+446,6
@@
abstract class Installer {
$this->parserTitle = Title::newFromText( 'Installer' );
$this->parserOptions = new ParserOptions( $wgUser ); // language will be wrong :(
$this->parserTitle = Title::newFromText( 'Installer' );
$this->parserOptions = new ParserOptions( $wgUser ); // language will be wrong :(
- $this->parserOptions->setEditSection( false );
// Don't try to access DB before user language is initialised
$this->setParserLanguage( Language::factory( 'en' ) );
}
// Don't try to access DB before user language is initialised
$this->setParserLanguage( Language::factory( 'en' ) );
}
@@
-991,17
+991,17
@@
abstract class Installer {
}
# Get a list of available locales.
}
# Get a list of available locales.
- $re
t = false;
-
$lines = wfShellExec( '/usr/bin/locale -a', $ret
);
+ $re
sult = Shell::command( '/usr/bin/locale', '-a' )
+
->execute(
);
- if ( $re
t
) {
+ if ( $re
sult->getExitCode() != 0
) {
return true;
}
return true;
}
+ $lines = $result->getStdout();
$lines = array_map( 'trim', explode( "\n", $lines ) );
$candidatesByLocale = [];
$candidatesByLang = [];
$lines = array_map( 'trim', explode( "\n", $lines ) );
$candidatesByLocale = [];
$candidatesByLang = [];
-
foreach ( $lines as $line ) {
if ( $line === '' ) {
continue;
foreach ( $lines as $line ) {
if ( $line === '' ) {
continue;
@@
-1346,6
+1346,10
@@
abstract class Installer {
$exts = $this->getVar( '_Extensions' );
$IP = $this->getVar( 'IP' );
$exts = $this->getVar( '_Extensions' );
$IP = $this->getVar( 'IP' );
+ // Marker for DatabaseUpdater::loadExtensions so we don't
+ // double load extensions
+ define( 'MW_EXTENSIONS_LOADED', true );
+
/**
* We need to include DefaultSettings before including extensions to avoid
* warnings about unset variables. However, the only thing we really
/**
* We need to include DefaultSettings before including extensions to avoid
* warnings about unset variables. However, the only thing we really
@@
-1564,7
+1568,7
@@
abstract class Installer {
$user->saveSettings();
// Update user count
$user->saveSettings();
// Update user count
- $ssUpdate =
new SiteStatsUpdate( 0, 0, 0, 0, 1
);
+ $ssUpdate =
SiteStatsUpdate::factory( [ 'users' => 1 ]
);
$ssUpdate->doUpdate();
}
$status = Status::newGood();
$ssUpdate->doUpdate();
}
$status = Status::newGood();