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 "Special:Preference: Check for changes before enabling Save button"
[lhc/web/wiklou.git]
/
maintenance
/
Maintenance.php
diff --git
a/maintenance/Maintenance.php
b/maintenance/Maintenance.php
index
0c79bd5
..
4d0af5f
100644
(file)
--- a/
maintenance/Maintenance.php
+++ b/
maintenance/Maintenance.php
@@
-25,6
+25,7
@@
require_once __DIR__ . '/../includes/PHPVersionCheck.php';
wfEntryPointCheck( 'cli' );
require_once __DIR__ . '/../includes/PHPVersionCheck.php';
wfEntryPointCheck( 'cli' );
+use MediaWiki\Shell\Shell;
use Wikimedia\Rdbms\DBReplicationWaitError;
/**
use Wikimedia\Rdbms\DBReplicationWaitError;
/**
@@
-1592,12
+1593,12
@@
abstract class Maintenance {
// something that can do the relevant syscalls. There are a few
// options. Linux and Mac OS X both have "stty size" which does the
// job directly.
// something that can do the relevant syscalls. There are a few
// options. Linux and Mac OS X both have "stty size" which does the
// job directly.
- $re
tval = false;
-
$size = wfShellExec( 'stty size', $retval
);
- if ( $re
tval
!== 0 ) {
+ $re
sult = Shell::command( 'stty', 'size' )
+
->execute(
);
+ if ( $re
sult->getExitCode()
!== 0 ) {
return $default;
}
return $default;
}
- if ( !preg_match( '/^(\d+) (\d+)$/', $
size
, $m ) ) {
+ if ( !preg_match( '/^(\d+) (\d+)$/', $
result->getStdout()
, $m ) ) {
return $default;
}
return [ intval( $m[2] ), intval( $m[1] ) ];
return $default;
}
return [ intval( $m[2] ), intval( $m[1] ) ];