コード例 #1
0
ファイル: metadata.php プロジェクト: affiliatelk/ecc
 function getCache()
 {
     $metadata = array();
     $cache = Mijosef::getCache();
     $metadata = $cache->load('metadata');
     return $metadata;
 }
コード例 #2
0
ファイル: sefurls.php プロジェクト: affiliatelk/ecc
 function getCache()
 {
     $urls = array();
     $cache = Mijosef::getCache();
     $urls = $cache->load('urls');
     return $urls;
 }
コード例 #3
0
ファイル: utility.php プロジェクト: affiliatelk/ecc
 function getRemoteInfo()
 {
     // Get config object
     if (!isset($this->MijosefConfig)) {
         $this->MijosefConfig = Mijosef::getConfig();
     }
     static $information;
     if ($this->MijosefConfig->cache_versions == 1) {
         $cache = Mijosef::getCache('86400');
         $information = $cache->load('versions');
     }
     if (!is_array($information)) {
         $information = array();
         $information['mijosef'] = '?.?.?';
         $components = self::getRemoteData('http://www.mijosoft.com/index.php?option=com_mijoextensions&view=xml&format=xml&catid=1');
         $extensions = self::getRemoteData('http://www.mijosoft.com/index.php?option=com_mijoextensions&view=xml&format=xml&catid=2');
         if (strstr($components, '<?xml version="1.0" encoding="UTF-8" ?>')) {
             $manifest = JFactory::getXML($components, false);
             if (is_null($manifest)) {
                 return $information;
             }
             $category = $manifest->category;
             if (!is_a($category, 'JXMLElement') || count($category->children()) == 0) {
                 return $information;
             }
             foreach ($category->children() as $component) {
                 $option = $component->getAttribute('option');
                 $compability = $component->getAttribute('compability');
                 if ($option == 'com_mijosef' && ($compability == 'all' || $compability == '1.6' || $compability == '1.5_1.6')) {
                     $information['mijosef'] = trim($component->getAttribute('version'));
                     break;
                 }
             }
         }
         if (strstr($extensions, '<?xml version="1.0" encoding="UTF-8" ?>')) {
             $manifest = JFactory::getXML($extensions, false);
             if (is_null($manifest)) {
                 return $information;
             }
             $category = $manifest->category;
             if (!is_a($category, 'JXMLElement') || count($category->children()) == 0) {
                 return $information;
             }
             foreach ($category->children() as $extension) {
                 $option = $extension->getAttribute('option');
                 $compability = $extension->getAttribute('compability');
                 if ($compability == 'all' || $compability == '1.6' || $compability == '1.5_1.6') {
                     $ext = new stdClass();
                     $ext->version = trim($extension->getAttribute('version'));
                     $ext->link = trim($extension->getAttribute('download'));
                     $ext->description = trim($extension->getAttribute('description'));
                     $information[$option] = $ext;
                 }
             }
         }
         if ($this->MijosefConfig->cache_versions == 1 && !empty($information)) {
             $cache->save($information, 'versions');
         }
     }
     return $information;
 }
コード例 #4
0
ファイル: purgeupdate.php プロジェクト: affiliatelk/ecc
 function getCountCache()
 {
     $cache = Mijosef::getCache();
     $count = array();
     $items = array('versions', 'extensions', 'urls', 'urls_moved', 'metadata', 'sitemap', 'tags', 'ilinks');
     foreach ($items as $item) {
         $contents = $cache->load($item);
         if (!empty($contents)) {
             $count[$item] = count($contents);
         } else {
             $count[$item] = 0;
         }
     }
     return $count;
 }
コード例 #5
0
ファイル: cache.php プロジェクト: affiliatelk/ecc
 function getInternalLinks()
 {
     static $ilinks_db;
     if ($this->MijosefConfig->cache_ilinks == 1) {
         $cache = Mijosef::getCache();
         $ilinks_cached = $cache->load('ilinks');
         if (!empty($ilinks_cached)) {
             return $ilinks_cached;
         }
     }
     if (!isset($ilinks_db)) {
         $ilinks_db = MijoDatabase::loadObjectList("SELECT * FROM #__mijosef_ilinks WHERE published = '1'", "word");
     }
     if (!empty($ilinks_db)) {
         if ($this->MijosefConfig->cache_ilinks == 1) {
             $cache->save($ilinks_db, 'ilinks');
         }
         return $ilinks_db;
     }
     return false;
 }