Example #1
0
 protected function ajax_resetCacheAction()
 {
     $dir = PACZKOMATY_PATH . 'inpost/data/';
     inpost_download_machines();
     inpost_download_pricelist();
     $this->simpleJson(true, "Lista paczkomatów oraz cennik zostały zaktualizowane");
 }
Example #2
0
function inpost_get_pricelist()
{
    global $inpost_data_dir;
    if (inpost_cache_is_valid(2) == 0) {
        inpost_download_pricelist();
    }
    if ($cache = @file_get_contents("{$inpost_data_dir}/cache2.dat")) {
        return unserialize($cache);
    }
    return 0;
}