X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmergeMessageFileList.php;h=8d2534eec580fa02a5e24906bc591151ea1d98c4;hb=d6b41380f7a71a0d8115bb45ef700c216322a4ce;hp=a650aa0b0efc51e0e72182b839781afc1a2d6caf;hpb=1e3c2e5904d628c001a8d65909b135ea9bf042aa;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mergeMessageFileList.php b/maintenance/mergeMessageFileList.php index a650aa0b0e..8d2534eec5 100644 --- a/maintenance/mergeMessageFileList.php +++ b/maintenance/mergeMessageFileList.php @@ -36,11 +36,6 @@ $mmfl = false; * @ingroup Maintenance */ class MergeMessageFileList extends Maintenance { - /** - * @var bool - */ - protected $hasError; - function __construct() { parent::__construct(); $this->addOption( @@ -85,30 +80,29 @@ class MergeMessageFileList extends Maintenance { $extdirs = explode( ':', $extdir ); $entries = []; foreach ( $extdirs as $extdir ) { - $entries = array_merge( $entries, scandir( $extdir ) ); - } - foreach ( $entries as $extname ) { - if ( $extname == '.' || $extname == '..' || !is_dir( "$extdir/$extname" ) ) { - continue; - } - $possibilities = [ - "$extdir/$extname/extension.json", - "$extdir/$extname/skin.json", - "$extdir/$extname/$extname.php" - ]; - $found = false; - foreach ( $possibilities as $extfile ) { - if ( file_exists( $extfile ) ) { - $mmfl['setupFiles'][] = $extfile; - $found = true; - break; + $entries = scandir( $extdir ); + foreach ( $entries as $extname ) { + if ( $extname == '.' || $extname == '..' || !is_dir( "$extdir/$extname" ) ) { + continue; + } + $possibilities = [ + "$extdir/$extname/extension.json", + "$extdir/$extname/skin.json", + "$extdir/$extname/$extname.php" + ]; + $found = false; + foreach ( $possibilities as $extfile ) { + if ( file_exists( $extfile ) ) { + $mmfl['setupFiles'][] = $extfile; + $found = true; + break; + } } - } - if ( !$found ) { - $this->hasError = true; - $this->error( "Extension {$extname} in {$extdir} lacks expected entry point: " . - "extension.json, skin.json, or {$extname}.php." ); + if ( !$found ) { + $this->error( "Extension {$extname} in {$extdir} lacks expected entry point: " . + "extension.json, skin.json, or {$extname}.php." ); + } } } } @@ -119,10 +113,6 @@ class MergeMessageFileList extends Maintenance { $mmfl['setupFiles'] = array_merge( $mmfl['setupFiles'], $extensionPaths ); } - if ( $this->hasError ) { - $this->error( "Some files are missing (see above). Giving up.", 1 ); - } - if ( $this->hasOption( 'output' ) ) { $mmfl['output'] = $this->getOption( 'output' ); }