Created
March 6, 2018 23:01
-
-
Save jacob-g/23f062ab49b4111a5a34a879c5d0e34c to your computer and use it in GitHub Desktop.
Hiding Special:BlockList in MediaWiki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//See https://lists.wikimedia.org/pipermail/mediawiki-l/2009-June/031231.html for what I modeled this after | |
//add the following code to the end of your LocalSettings.php file | |
function restrictBlockList(&$list) { | |
global $wgUser; | |
if (!$wgUser->isAllowed('block')) { | |
unset($list['BlockList']); | |
} | |
} | |
$wgHooks['SpecialPage_initList'][]='restrictBlockList'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment