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

Change subject: Provide some minor tweaks
......................................................................


Provide some minor tweaks

* Extend and rephrase general file documentation
* Consistently switch to use __DIR__
* Extend author's array to appreciate others
* Provide license label to show on "Special:Version"
* Go https for link

Bug: T123943
Change-Id: Ie2a42b54b9894e8cab3f13506eb3858ded7d68ab
---
M BlockAndNuke.php
1 file changed, 22 insertions(+), 18 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/BlockAndNuke.php b/BlockAndNuke.php
index 3879787..315845c 100644
--- a/BlockAndNuke.php
+++ b/BlockAndNuke.php
@@ -1,42 +1,46 @@
 <?php
+/**
+ * BlockAndNuke extension by Eliora Stahl
+ */
 
-//user will get this message if the haven't installed the extension
-
+// Entry point protection
 if( !defined( 'MEDIAWIKI' ) ) {
        die( 'Not an entry point.' );
 }
 
-//path of the extension
-$dir = __DIR__ . '/';
-
-//load internationalization file.
+// Load internationalization files
 $wgMessagesDirs['BlockAndNuke'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['BlockAndNuke'] = $dir . 'BlockandNuke.i18n.php';
+$wgExtensionMessagesFiles['BlockAndNuke'] = __DIR__ . '/BlockandNuke.i18n.php';
 
-//setup instructions
+// Register extension
 $wgExtensionCredits['specialpage'][] = array(
-       'path'           => __FILE__,
-       'name'           => 'BlockAndNuke',
-       'description'    => 'Gives sysops the ability to mass delete users and 
their pages',
+       'path' => __FILE__,
+       'name' => 'BlockAndNuke',
        'descriptionmsg' => 'blockandnuke-desc',
-       'author'         => 'Eliora Stahl',
-       'url'            => 
'http://www.mediawiki.org/wiki/Extension:BlockAndNuke',
+       'author' => array(
+               'Eliora Stahl',
+               '...'
+               ),
+       'url' => 'https://www.mediawiki.org/wiki/Extension:BlockAndNuke',
+       'license-name' => 'GPL-3.0+'
 );
 
-//Permissions - not recognised as admin
+// Setup permissions - not recognised as admin
 $wgGroupPermissions['sysop']['blockandnuke'] = true;
 $wgAvailableRights[] = 'blockandnuke';
 
-$wgAutoloadClasses['SpecialBlock_Nuke'] = $dir . 'BlockandNuke.body.php';
-$wgAutoloadClasses['BanPests'] = $dir . 'BanPests.php';
+// Load classes
+$wgAutoloadClasses['SpecialBlock_Nuke'] = __DIR__ . '/BlockandNuke.body.php';
+$wgAutoloadClasses['BanPests'] = __DIR__ . '/BanPests.php';
 
-//Tell MediaWiki about the new special page and its class name 'Block_Nuke'
+// Setup special page and its class name 'Block_Nuke'
 $wgSpecialPages['BlockandNuke'] = 'SpecialBlock_Nuke';
 
+// Extension parameters
 $wgBaNwhitelist = __DIR__ . "/whitelist.txt";
-
 $wgBaNSpamUser = "Spammer";
 
+// Register hooks
 $wgHooks['PerformRetroactiveAutoblock'][] = function ($block, $blockIds) {
        return true;
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/283618
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2a42b54b9894e8cab3f13506eb3858ded7d68ab
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: master
Gerrit-Owner: Kghbln <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MarkAHershberger <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to