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

function disableSomeSpecialPages { //Init Vars global $wgContLang; global $wgUser; $connPage=$wgContLang->mExtendedSpecialPageAliases["Userlogin"][0]; $specPage=$wgContLang->getNsText(-1); $chkSO=false; $pInfo=isset($_SERVER["PATH_INFO"])?$_SERVER["PATH_INFO"]:''; $pUri=isset($_SERVER["QUERY_STRING"])?$_SERVER["QUERY_STRING"]:''; //getPath info $pUri=urldecode($pUri); //Case Special Page if(    (stripos($pInfo,"/".$specPage.":")!==false || stripos($pUri,$specPage.":")!==false)         && stripos($pInfo,":".$connPage)===false         && stripos($pUri,$connPage)===false) {$chkSO=true;} //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='.$specPage.':' . $connPage);} else   {header('Location:../?title='.$specPage.':'. $connPage);} } } $wgHooks['SpecialPage_initList'][]='disableSomeSpecialPages';

fixed special page NS & login page Translation