Hashar has submitted this change and it was merged. Change subject: (bug 42960) extension loader now ignores empty directories ......................................................................
(bug 42960) extension loader now ignores empty directories The /tools/extensions-loader.php is injected in LocalSettings.php for mwext- jobs. It attempts to load a default entry point for each directory under $WORKSPACE/extensions. When submodules are not properly initialized, the directory is empty. We thus skip loading any empty extension. Change-Id: I36b6e1dee68f039b7c08214d5b8e6838d42cdc60 --- M tools/extensions-loader.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/tools/extensions-loader.php b/tools/extensions-loader.php index 955faaa..15ae2af 100644 --- a/tools/extensions-loader.php +++ b/tools/extensions-loader.php @@ -30,6 +30,16 @@ ) { continue; } + + # Bug 42960: ignore empty extensions + $hasContent = array_diff( + scandir( "{$IP}/extensions/${extname}"), + array('.','..') + ); + if( !$hasContent ) { + continue; + } + $extfile = "{$IP}/extensions/{$extname}/{$extname}.php"; if( file_exists($extfile) ) { $ext_to_load[$extname] = $extfile; -- To view, visit https://gerrit.wikimedia.org/r/53331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36b6e1dee68f039b7c08214d5b8e6838d42cdc60 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> Gerrit-Reviewer: Hashar <has...@free.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits