* @ingroup Deployment
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
/**
* This documentation group collects source code files with deployment functionality.
}
# 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;
$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