Skip to content

Instantly share code, notes, and snippets.

@jacob-g
Created March 6, 2018 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacob-g/23f062ab49b4111a5a34a879c5d0e34c to your computer and use it in GitHub Desktop.
Save jacob-g/23f062ab49b4111a5a34a879c5d0e34c to your computer and use it in GitHub Desktop.
Hiding Special:BlockList in MediaWiki
<?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