From: Max Semenik Date: Wed, 25 Oct 2017 02:07:05 +0000 (-0700) Subject: Switch Installer to the new execution framework X-Git-Tag: 1.31.0-rc.0~213^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=77d52cea323e4aeeee3322b9f1f24ab5e923bbc4;p=lhc%2Fweb%2Fwiklou.git Switch Installer to the new execution framework Change-Id: Id04ba0751ff94e9614852e351377405f65b6ea1c --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index f5e12d6477..7cfc617333 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;