Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/227352
Change subject: Move !defined( 'MEDIAWIKI' ) to the entry point ...................................................................... Move !defined( 'MEDIAWIKI' ) to the entry point it's not needed in each class file, but can be added in the entry point. Change-Id: Ida25aa84f3f18b20aa41323f473e4bfbec9b88a8 --- M SiteMatrix.php M SiteMatrixApi.php M SiteMatrix_body.php 3 files changed, 4 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteMatrix refs/changes/52/227352/1 diff --git a/SiteMatrix.php b/SiteMatrix.php index c652fd5..3e758e6 100644 --- a/SiteMatrix.php +++ b/SiteMatrix.php @@ -1,4 +1,8 @@ <?php +if ( !defined( 'MEDIAWIKI' ) ) { + die( 'Not an entry point.' ); +} + if ( function_exists( 'wfLoadExtension' ) ) { wfLoadExtension( 'SiteMatrix' ); // Keep i18n globals so mergeMessageFileList.php doesn't break diff --git a/SiteMatrixApi.php b/SiteMatrixApi.php index 50114e7..50b30ad 100644 --- a/SiteMatrixApi.php +++ b/SiteMatrixApi.php @@ -1,10 +1,5 @@ <?php -if ( !defined( 'MEDIAWIKI' ) ) { - echo "SiteMatrix extension\n"; - exit( 1 ); -} - /** * Query module to get site matrix * @ingroup API diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php index e794812..d82d1e2 100644 --- a/SiteMatrix_body.php +++ b/SiteMatrix_body.php @@ -1,10 +1,5 @@ <?php -if ( !defined( 'MEDIAWIKI' ) ) { - echo "SiteMatrix extension\n"; - exit( 1 ); -} - class SiteMatrix { protected $langlist, $sites, $names, $hosts; -- To view, visit https://gerrit.wikimedia.org/r/227352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida25aa84f3f18b20aa41323f473e4bfbec9b88a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SiteMatrix Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits