Exemplo n.º 1
0
 private function download_list2()
 {
     if (!isset($this->download_list2)) {
         $cache = new fs_cache();
         /**
          * Download_list2 es la lista de plugins de la comunidad, se descarga de Internet.
          */
         $this->download_list2 = $cache->get('download_list');
         if (!$this->download_list2) {
             $json = @$this->curl_get_contents('https://www.facturascripts.com/comm3/index.php?page=community_plugins&json2=TRUE', 5);
             if ($json) {
                 $this->download_list2 = json_decode($json);
                 $cache->set('download_list', $this->download_list2);
             } else {
                 $this->download_list2 = array();
             }
         }
     }
     return $this->download_list2;
 }