Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/188115
Change subject: Delay ZeroBanner die requirement after setup
......................................................................
Delay ZeroBanner die requirement after setup
ZeroPortal depends on ZeroBanner which might be included AFTER the
ZeroPortal entry point (ex: loading them from disk in order of
directories creation).
Move the die() to a SetupAfterCache hook.
Bug: T88015
Change-Id: I00ec4fa41d8b6894efe69818f175f8955ab3eeb9
---
M ZeroPortal.php
1 file changed, 10 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal
refs/changes/15/188115/1
diff --git a/ZeroPortal.php b/ZeroPortal.php
index ddd63c7..6fb15d9 100644
--- a/ZeroPortal.php
+++ b/ZeroPortal.php
@@ -1,6 +1,8 @@
<?php
/**
- * Extension ZeroRatedMobileAccess — Zero Rated Mobile Access
+ * Extension ZeroRatedMobileAccess — Zero Rated Mobile Access.
+ *
+ * Require the ZeroBanner extension.
*
* @file
* @ingroup Extensions
@@ -13,11 +15,6 @@
// Needs to be called within MediaWiki; not standalone
if ( !defined( 'MEDIAWIKI' ) ) {
echo( "This is a MediaWiki extension and cannot run standalone.\n" );
- die( -1 );
-}
-
-if ( !defined( 'NS_ZERO' ) ) {
- echo( "ZeroBanner extension has not been added\n" );
die( -1 );
}
@@ -78,3 +75,10 @@
$wgExtensionMessagesFiles['ZeroPortalAlias'] = __DIR__ . DIRECTORY_SEPARATOR .
'ZeroPortal.alias.php';
$wgZeroPortalImpersonateUser = false;
+
+$wgHooks['SetupAfterCache'] = function( ) {
+ if ( !defined( 'NS_ZERO' ) ) {
+ echo( "ZeroBanner extension has not been added\n" );
+ die( -1 );
+ }
+};
--
To view, visit https://gerrit.wikimedia.org/r/188115
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I00ec4fa41d8b6894efe69818f175f8955ab3eeb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits