コード例 #1
0
ファイル: updates.php プロジェクト: proyectoseb/University
 /**
  * Get extension versions
  * @return Array
  */
 public function getVersions()
 {
     $db = JFactory::getDBO();
     $versions = array('joomla' => array(), 'jce' => array());
     // Get Component xml
     $com_xml = WFXMLHelper::parseInstallManifest(JPATH_ADMINISTRATOR . '/components/com_jce/jce.xml');
     // set component version
     $versions['joomla']['com_jce'] = $com_xml['version'];
     // get mediabox version
     $mediabox_xml_file = WF_JOOMLA15 ? JPATH_PLUGINS . '/system/jcemediabox.xml' : JPATH_PLUGINS . '/system/jcemediabox/jcemediabox.xml';
     // set mediabox version
     if (file_exists($mediabox_xml_file)) {
         $mediabox_xml = WFXMLHelper::parseInstallManifest($mediabox_xml_file);
         $versions['joomla']['plg_jcemediabox'] = $mediabox_xml['version'];
     }
     wfimport('admin.models.plugins');
     $model = new WFModelPlugins();
     // get all plugins
     $plugins = $model->getPlugins();
     // get all extensions
     $extensions = $model->getExtensions();
     foreach ($plugins as $plugin) {
         if ($plugin->core == 0) {
             $file = WF_EDITOR_PLUGINS . '/' . $plugin->name . '/' . $plugin->name . '.xml';
             $xml = WFXMLHelper::parseInstallManifest($file);
             $versions['jce']['jce_' . $plugin->name] = $xml['version'];
         }
     }
     foreach ($extensions as $extension) {
         if ($extension->core == 0) {
             $file = WF_EDITOR_EXTENSIONS . '/' . $extension->folder . '/' . $extension->extension . '.xml';
             $xml = WFXMLHelper::parseInstallManifest($file);
             $versions['jce']['jce_' . $extension->folder . '_' . $extension->extension] = $xml['version'];
         }
     }
     return $versions;
 }
コード例 #2
0
 public function getExtensions()
 {
     wfimport('admin.models.plugins');
     $model = new WFModelPlugins();
     // get an array of all installed plugins in plugins folder
     $extensions = $model->getExtensions();
     return $extensions;
 }