X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=94a5a5a474d6d40b41b6c9989e874ff15df841bb;hp=f5e12d64775a25c9750c37978001c4a3a328ea36;hb=ad136143c5de92257c4ad5459d3c39186fbf800a;hpb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43 diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index f5e12d6477..94a5a5a474 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -24,6 +24,7 @@ * @ingroup Deployment */ use MediaWiki\MediaWikiServices; +use MediaWiki\Shell\Shell; /** * This documentation group collects source code files with deployment functionality. @@ -990,17 +991,17 @@ abstract class Installer { } # Get a list of available locales. - $ret = false; - $lines = wfShellExec( '/usr/bin/locale -a', $ret ); + $result = Shell::command( '/usr/bin/locale', '-a' ) + ->execute(); - if ( $ret ) { + if ( $result->getExitCode() != 0 ) { return true; } + $lines = $result->getStdout(); $lines = array_map( 'trim', explode( "\n", $lines ) ); $candidatesByLocale = []; $candidatesByLang = []; - foreach ( $lines as $line ) { if ( $line === '' ) { continue; @@ -1345,6 +1346,10 @@ abstract class Installer { $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