jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/391554 )
Change subject: Convert BatchUserRights to use extension registration ...................................................................... Convert BatchUserRights to use extension registration Bug: T174879 Change-Id: I22f6b5e09701f2892ec8a5c6add44978fe5366df --- M BatchUserRights.php A extension.json 2 files changed, 50 insertions(+), 26 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/BatchUserRights.php b/BatchUserRights.php index 77203e6..5995da3 100644 --- a/BatchUserRights.php +++ b/BatchUserRights.php @@ -9,30 +9,18 @@ * @author Sean Colombo * @link http://www.mediawiki.org/wiki/Extension:BatchUserRights Documentation */ -if ( !defined( 'MEDIAWIKI' ) ) { - die(); + +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'BatchUserRights' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['BatchUserRights'] = __DIR__ . '/i18n'; + $wgExtensionMessagesFiles['BatchUserRightsAlias'] = __DIR__ . '/BatchUserRights.alias.php'; + wfWarn( + 'Deprecated PHP entry point used for the BatchUserRights extension. ' . + 'Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); + return; +} else { + die( 'This version of the BatchUserRights extension requires MediaWiki 1.29+' ); } - -// Extension credits that will show up on Special:Version -$wgExtensionCredits['specialpage'][] = [ - 'path' => __FILE__, - 'name' => 'BatchUserRights', - 'version' => '1.2.0', - 'author' => '[http://www.seancolombo.com Sean Colombo]', - 'descriptionmsg' => 'batchuserrights-desc', - 'url' => 'https://www.mediawiki.org/wiki/Extension:BatchUserRights', -]; - -set_time_limit( 0 ); -// New user right, required to access Special:BatchUserRights -$wgAvailableRights[] = 'batchuserrights'; -$wgGroupPermissions['bureaucrat']['batchuserrights'] = true; - -// User groups which can be added through Special:BatchUserRights -$wgBatchUserRightsGrantableGroups = []; - -// Set up the new special page -$wgMessagesDirs['BatchUserRights'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['BatchUserRightsAliases'] = __DIR__ . '/BatchUserRights.alias.php'; -$wgAutoloadClasses['SpecialBatchUserRights'] = __DIR__ . '/BatchUserRights_body.php'; -$wgSpecialPages['BatchUserRights'] = 'SpecialBatchUserRights'; diff --git a/extension.json b/extension.json new file mode 100644 index 0000000..d960f7b --- /dev/null +++ b/extension.json @@ -0,0 +1,36 @@ +{ + "name": "BatchUserRights", + "version": "1.2.0", + "author": "[http://www.seancolombo.com Sean Colombo]", + "url": "https://www.mediawiki.org/wiki/Extension:BatchUserRights", + "descriptionmsg": "batchuserrights-desc", + "type": "specialpage", + "AvailableRights": [ + "batchuserrights" + ], + "GroupPermissions": { + "bureaucrat": { + "batchuserrights": true + } + }, + "SpecialPages": { + "BatchUserRights": "SpecialBatchUserRights" + }, + "MessagesDirs": { + "BatchUserRights": [ + "i18n" + ] + }, + "ExtensionMessagesFiles": { + "BatchUserRightsAliases": "BatchUserRights.alias.php" + }, + "AutoloadClasses": { + "SpecialBatchUserRights": "BatchUserRights_body.php" + }, + "config": { + "BatchUserRightsGrantableGroups": { + "value": [] + } + }, + "manifest_version": 2 +} -- To view, visit https://gerrit.wikimedia.org/r/391554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22f6b5e09701f2892ec8a5c6add44978fe5366df Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/BatchUserRights Gerrit-Branch: master Gerrit-Owner: MarcoAurelio <[email protected]> Gerrit-Reviewer: Jforrester <[email protected]> Gerrit-Reviewer: Legoktm <[email protected]> Gerrit-Reviewer: Mainframe98 <[email protected]> Gerrit-Reviewer: MarcoAurelio <[email protected]> Gerrit-Reviewer: Reception123 <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
