* @return bool Whether or not the string looks like a SHA1
*/
public static function isSHA1( $str ) {
- return !!preg_match( '/^[0-9A-F]{40}$/i', $str );
+ return (bool)preg_match( '/^[0-9A-F]{40}$/i', $str );
}
/**
$date = false;
if ( is_file( $wgGitBin ) &&
is_executable( $wgGitBin ) &&
+ !Shell::isDisabled() &&
$this->getHead() !== false
) {
$cmd = [
$config = "{$this->basedir}/config";
$url = false;
if ( is_readable( $config ) ) {
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$configArray = parse_ini_file( $config, true );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
$remote = false;
// Use the "origin" remote repo if available or any other repo if not.