MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/118945
Change subject: Initial attempt to fix capitalization typo ...................................................................... Initial attempt to fix capitalization typo Change-Id: Ife5c7a2d24bf8ef04d6f262e5e0ce943dff84fc3 --- M BanPests.php R BlockAndNuke.body.php R BlockAndNuke.i18n.php A BlockAndNuke.php M BlockandNuke.php M README.md 6 files changed, 53 insertions(+), 51 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlockAndNuke refs/changes/45/118945/1 diff --git a/BanPests.php b/BanPests.php index d00e420..23a46a1 100644 --- a/BanPests.php +++ b/BanPests.php @@ -111,7 +111,7 @@ if( $blk->insert() ) { $log = new LogPage('block'); $log->addEntry('block', Title::makeTitle( NS_USER, $ip ), - 'Blocked through Special:BlockandNuke', array('infinite', $ip, 'nocreate')); + 'Blocked through Special:BlockAndNuke', array('infinite', $ip, 'nocreate')); $ret[] = $ip; if( $sp ) { $sp->getOutput()->addHTML( wfMessage( "blockandnuke-banned-ip", $ip ) ); @@ -138,7 +138,7 @@ if($ret = $blk->insert()) { $log = new LogPage('block'); $log->addEntry('block', Title::makeTitle( NS_USER, $user->getName() ), - 'Blocked through Special:BlockandNuke', array('infinite', $user->getName(), 'nocreate')); + 'Blocked through Special:BlockAndNuke', array('infinite', $user->getName(), 'nocreate')); } } } diff --git a/BlockandNuke.body.php b/BlockAndNuke.body.php similarity index 100% rename from BlockandNuke.body.php rename to BlockAndNuke.body.php diff --git a/BlockandNuke.i18n.php b/BlockAndNuke.i18n.php similarity index 76% rename from BlockandNuke.i18n.php rename to BlockAndNuke.i18n.php index 4e8b9a4..e5a5d9e 100644 --- a/BlockandNuke.i18n.php +++ b/BlockAndNuke.i18n.php @@ -1,6 +1,6 @@ <?php /** - * Internationalisation file for the BlockandNuke extension + * Internationalisation file for the BlockAndNuke extension * @addtogroup Extensions * @author Eliora Stahl */ @@ -11,7 +11,7 @@ * @author Brion Vibber */ $aliases['en'] = array( - 'BlockandNuke' => array( 'BlockandNuke' ), + 'BlockAndNuke' => array( 'BlockAndNuke' ), ); $messages = array(); @@ -23,18 +23,18 @@ 'action-blockandnuke' => "Block and Nuke", 'blockandnuke' => 'Block and Nuke', 'block' => 'Mass delete', - 'blockandnuke-confirm' => 'Click the BlockandNuke button to block the selected users and delete all their contributions.<br/>(Do not uncheck any of the boxes below)', - 'blockandnuke-desc' => 'Gives administrators the ability to [[Special:BlockandNuke]] pages', + 'blockandnuke-confirm' => 'Click the BlockAndNuke button to block the selected users and delete all their contributions.<br/>(Do not uncheck any of the boxes below)', + 'blockandnuke-desc' => 'Gives administrators the ability to [[Special:BlockAndNuke]] pages', 'blockandnuke-nopages' => "No new pages by [[Special:Contributions/$1|$1]] in recent changes.", 'blockandnuke-list' => "The following pages were recently created by [[Special:Contributions/$1|$1]]; put in a comment and hit the button to delete them.", 'blockandnuke-defaultreason' => "Mass removal of pages added by $1", - 'blockandnuke-delete-file' => "BlockandNuke delete spam", - 'blockandnuke-delete-article' => "BlockandNuke delete spam articles.", - 'blockandnuke-tools' => "List of Users who have recently contributed and are not found on the Whitelist: <br>To add a user to the whitelist edit extensions/BlockandNuke/whitelist.txt", + 'blockandnuke-delete-file' => "BlockAndNuke delete spam", + 'blockandnuke-delete-article' => "BlockAndNuke delete spam articles.", + 'blockandnuke-tools' => "List of Users who have recently contributed and are not found on the Whitelist: <br>To add a user to the whitelist edit extensions/BlockAndNuke/whitelist.txt", 'blockandnuke-submit-user' => 'Block Users', - 'blockandnuke-submit-delete' => 'BlockandNuke', + 'blockandnuke-submit-delete' => 'BlockAndNuke', 'blockandnuke-block' => 'Selected users have been blocked and their contributions deleted.', - 'blockandnuke-message' => 'Users blocked by BlockandNuke.', + 'blockandnuke-message' => 'Users blocked by BlockAndNuke.', 'blockandnuke-banhammer' => "To block the selected users and delete all their contributions click the button below.", 'blockandnuke-nothing-to-do' => 'Nothing to do!', 'blockandnuke-banning' => 'Banning...<br>', diff --git a/BlockAndNuke.php b/BlockAndNuke.php new file mode 100644 index 0000000..491ac5f --- /dev/null +++ b/BlockAndNuke.php @@ -0,0 +1,39 @@ +<?php +//user will get this message if the haven't installed the extension +if( !defined( 'MEDIAWIKI' ) ) + die( 'Not an entry point.' ); +//path of the extension +$dir = dirname(__FILE__) . '/'; + +//load internationalization file. +$wgExtensionMessagesFiles['BlockAndNuke'] = $dir . 'BlockAndNuke.i18n.php'; + +//setup instructions +$wgExtensionCredits['specialpage'][] = array( + 'path' => __FILE__, + 'name' => 'BlockAndNuke', + 'description' => 'Gives sysops the ability to mass delete users and their pages', + 'descriptionmsg' => 'block-desc', + 'author' => 'Eliora Stahl', + 'url' => 'http://www.mediawiki.org/wiki/Extension:BlockAndNuke', +); + +//Permissions - not recognised as admin +$wgGroupPermissions['sysop']['blockandnuke'] = true; +$wgAvailableRights[] = 'blockandnuke'; + +$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' +$wgSpecialPages['BlockAndNuke'] = 'SpecialBlock_Nuke'; +//Under heading 'pagetools' on Special Pages +$wgSpecialPageGroups['BlockAndNuke'] = 'pagetools'; + +$wgBaNwhitelist = __DIR__ . "/whitelist.txt"; + +$wgBaNSpamUser = "Spammer"; + +$wgHooks['PerformRetroactiveAutoblock'][] = function ($block, $blockIds) { + return true; +}; diff --git a/BlockandNuke.php b/BlockandNuke.php index fb741a0..5a2ec51 100644 --- a/BlockandNuke.php +++ b/BlockandNuke.php @@ -1,39 +1,2 @@ <?php -//user will get this message if the haven't installed the extension -if( !defined( 'MEDIAWIKI' ) ) - die( 'Not an entry point.' ); -//path of the extension -$dir = dirname(__FILE__) . '/'; - -//load internationalization file. -$wgExtensionMessagesFiles['BlockandNuke'] = $dir . 'BlockandNuke.i18n.php'; - -//setup instructions -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'BlockandNuke', - 'description' => 'Gives sysops the ability to mass delete users and their pages', - 'descriptionmsg' => 'block-desc', - 'author' => 'Eliora Stahl', - 'url' => 'http://www.mediawiki.org/wiki/Extension:BlockandNuke', -); - -//Permissions - not recognised as admin -$wgGroupPermissions['sysop']['blockandnuke'] = true; -$wgAvailableRights[] = 'blockandnuke'; - -$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' -$wgSpecialPages['BlockandNuke'] = 'SpecialBlock_Nuke'; -//Under heading 'pagetools' on Special Pages -$wgSpecialPageGroups['BlockandNuke'] = 'pagetools'; - -$wgBaNwhitelist = __DIR__ . "/whitelist.txt"; - -$wgBaNSpamUser = "Spammer"; - -$wgHooks['PerformRetroactiveAutoblock'][] = function ($block, $blockIds) { - return true; -}; +require(__DIR__ . '/BlockAndNuke.php'); /* Fix old typo */ diff --git a/README.md b/README.md index 072a23e..d1e4983 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -The Block and Nuke extension allows sysops to mass block spam accounts and delete all contributions made by those spam accounts, in just two clicks. See further documenatation at the [BlockandNuke page on MediaWiki.org](http://www.mediawiki.org/wiki/Extension:BlockandNuke). +The Block and Nuke extension allows sysops to mass block spam accounts and delete all contributions made by those spam accounts, in just two clicks. See further documenatation at the [BlockAndNuke page on MediaWiki.org](http://www.mediawiki.org/wiki/Extension:BlockAndNuke). Usage ----- -1. Edit file `extensions/BlockandNuke/whitelist.txt` and add usernames that should be ignored by the extension. This list must be edited manually. +1. Edit file `extensions/BlockAndNuke/whitelist.txt` and add usernames that should be ignored by the extension. This list must be edited manually. One username per line. -- To view, visit https://gerrit.wikimedia.org/r/118945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife5c7a2d24bf8ef04d6f262e5e0ce943dff84fc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlockAndNuke Gerrit-Branch: master Gerrit-Owner: MarkAHershberger <m...@nichework.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits