Thread:Project:Support desk/Special page access, Purge access, and template storing (2)/reply (4)

function disableSomeSpecialPages { //Init Vars global $wgUser; $chkSO=false; $pInfo=isset($_SERVER["PATH_INFO"])?$_SERVER["PATH_INFO"]:''; $pUri=isset($_SERVER["QUERY_STRING"])?$_SERVER["QUERY_STRING"]:''; //getPath info $pInfo=str_replace("é","e",$pInfo); $pUri=str_replace("é","e",urldecode($pUri)); //Case Special Page if((stripos($pInfo,"/special:")!==false || stripos($pUri,"special:")!==false) && stripos($pInfo,":Connexion")===false && stripos($pUri,"connexion")===false){$chkSO=tru$ //Case Purge if(stripos($pUri,"action=purge")!==false){$chkSO=true;} //Banner case allow for annonymous if(stripos($pInfo,"Special:BannerLoader")!==false){$chkSO=false;} //Do the check if($chkSO && !in_array('sysop',$wgUser->getEffectiveGroups)) {        if(stripos($pUri,"special:")!==false) {header('Location:./?title=Special:connexion');} else   {header('Location:../?title=Special:connexion');} } } $wgHooks['SpecialPage_initList'][]='disableSomeSpecialPages';

updated: fix banner management