jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Reedy: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



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 fcfb36e..b2b46b0 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 7d4bdc4..ced2dbf 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: merged
Gerrit-Change-Id: Ida25aa84f3f18b20aa41323f473e4bfbec9b88a8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to