Example #1
0
 /**
  * Initialise the special page list
  * This must be called before accessing SpecialPage::$mList
  */
 static function initList()
 {
     global $wgSpecialPages;
     global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
     if (self::$mListInitialised) {
         return;
     }
     wfProfileIn(__METHOD__);
     # Better to set this now, to avoid infinite recursion in carelessly written hooks
     self::$mListInitialised = true;
     if (!$wgDisableCounters) {
         self::$mList['Popularpages'] = array('SpecialPage', 'Popularpages');
     }
     if (!$wgDisableInternalSearch) {
         self::$mList['Search'] = array('SpecialPage', 'Search');
     }
     if ($wgEmailAuthentication) {
         self::$mList['Confirmemail'] = array('UnlistedSpecialPage', 'Confirmemail');
     }
     # Add extension special pages
     self::$mList = array_merge(self::$mList, $wgSpecialPages);
     # Run hooks
     # This hook can be used to remove undesired built-in special pages
     wfRunHooks('SpecialPage_initList', array(&self::$mList));
     wfProfileOut(__METHOD__);
 }