Ejemplo n.º 1
0
 /**
  * Example hook (Special:Version page)
  */
 public function hook_SpecialVersionExtensionTypes(&$sp, &$extensionTypes)
 {
     $this->addToCreditDescription(" Using real cache: " . ExtensionLoader::realCacheStatus() . '. ');
     // Is the PEAR::Validate package available?
     if (!class_exists('Validate')) {
         $this->addToCreditDescription(" PEAR::Validate package not available. ");
     }
     // Per-Extension 'decorator'
     foreach (self::$_registeredExtensionsList as &$classe) {
         wfRunHooks('ExtensionManager_Credits', array($classe, &$name, &$replaceName, &$desc, &$replaceDesc));
         $this->updateCreditField($name, $classe, 'name', $replaceName);
         $this->updateCreditField($desc, $classe, 'description', $replaceDesc);
     }
     // required for all hooks
     return true;
     #continue hook-chain
 }
Ejemplo n.º 2
0
 /**
  * Returns the list of extensions to load
  * This list does not include the ones disabled.
  */
 static function getList()
 {
     self::init();
     self::$exts = self::getExtensions();
     $liste = array();
     if (!empty(self::$exts)) {
         foreach (self::$exts as $ext => &$e) {
             if (!$e['disabled']) {
                 $liste[$ext] = $e['file'];
             }
         }
     }
     return $liste;
 }