From 77d52cea323e4aeeee3322b9f1f24ab5e923bbc4 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Tue, 24 Oct 2017 19:07:05 -0700 Subject: [PATCH] Switch Installer to the new execution framework Change-Id: Id04ba0751ff94e9614852e351377405f65b6ea1c --- includes/installer/Installer.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; -- 2.20.1