protected function loadExtensions()
 {
     if (is_array($this->extensionsObjects)) {
         return;
     }
     wfProfileIn(__METHOD__);
     global $wgConfigureAdditionalExtensions;
     $coreExtensions = TxtDef::loadFromFile(dirname(__FILE__) . '/Settings-ext.txt', array('key' => 'name'));
     $extensions = array_merge($coreExtensions, $wgConfigureAdditionalExtensions);
     usort($extensions, array(__CLASS__, 'compExt'));
     $list = array();
     foreach ($extensions as $ext) {
         $ext = new WebExtension($ext);
         #if( $ext->isInstalled() ) {
         $list[] = $ext;
         #}
     }
     $this->extensionsObjects = $list;
     wfProfileOut(__METHOD__);
 }
Ejemplo n.º 2
0
 protected function loadConfigureExtensionData()
 {
     if (!$this->useConfigure) {
         return array();
     }
     global $wgAutoloadClasses, $IP, $wgTranslateExtensionDirectory;
     $postfix = 'Configure/load_txt_def/TxtDef.php';
     if (file_exists("{$IP}/extensions/{$postfix}")) {
         $prefix = "{$IP}/extensions";
     } elseif (file_exists("{$wgTranslateExtensionDirectory}/{$postfix}")) {
         $prefix = $wgTranslateExtensionDirectory;
     } else {
         $prefix = false;
     }
     if ($prefix) {
         $wgAutoloadClasses['TxtDef'] = "{$prefix}/{$postfix}";
         $tmp = TxtDef::loadFromFile("{$prefix}/Configure/settings/Settings-ext.txt");
         return array_combine(array_map(array(__CLASS__, 'foldId'), array_keys($tmp)), array_values($tmp));
     }
     return array();
 }
 protected function loadConfigureExtensionData()
 {
     if (!$this->useConfigure) {
         return array();
     }
     global $wgAutoloadClasses;
     $postfix = 'Configure/load_txt_def/TxtDef.php';
     if (!file_exists("{$this->path}/{$postfix}")) {
         return array();
     }
     $wgAutoloadClasses['TxtDef'] = "{$this->path}/{$postfix}";
     $tmp = TxtDef::loadFromFile("{$this->path}/Configure/settings/Settings-ext.txt");
     return array_combine(array_map(array(__CLASS__, 'foldId'), array_keys($tmp)), array_values($tmp));
 }