Paladox has uploaded a new change for review.
https://gerrit.wikimedia.org/r/265257
Change subject: Delay die when PluggableAuth is missing
......................................................................
Delay die when PluggableAuth is missing
Change-Id: I6fd1d7690bceeaa9397eb4f9984965bfba07b012
---
M OpenIDConnect.php
1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenIDConnect
refs/changes/57/265257/1
diff --git a/OpenIDConnect.php b/OpenIDConnect.php
index 99db120..71f1829 100644
--- a/OpenIDConnect.php
+++ b/OpenIDConnect.php
@@ -22,13 +22,15 @@
* DEALINGS IN THE SOFTWARE.
*/
-if ( !class_exists( 'PluggableAuth' ) ) {
- die( '<b>Error:</b> This extension requires the PluggableAuth extension
to be included first' );
-}
+$wgExtensionFunctions[] = function () {
+ if ( !class_exists( 'PluggableAuth' ) ) {
+ die( '<b>Error:</b> This extension requires the PluggableAuth
extension to be included first' );
+ }
-if ( array_key_exists( 'PluggableAuth_Class', $GLOBALS ) ) {
- die( '<b>Error:</b> A value for $PluggableAuth_Class has already been
set.' );
-}
+ if ( array_key_exists( 'PluggableAuth_Class', $GLOBALS ) ) {
+ die( '<b>Error:</b> A value for $PluggableAuth_Class has
already been set.' );
+ }
+};
$GLOBALS['wgExtensionCredits']['other'][] = array (
'path' => __FILE__,
--
To view, visit https://gerrit.wikimedia.org/r/265257
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fd1d7690bceeaa9397eb4f9984965bfba07b012
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenIDConnect
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits