function fn_check_cache($params) { $regenerated = true; $dir_root = Registry::get('config.dir.root') . '/'; if (isset($params['ct']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || defined('DEVELOPMENT'))) { Storage::instance('images')->deleteDir('thumbnails'); } // Clean up cache if (isset($params['cc']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || defined('DEVELOPMENT'))) { fn_clear_cache(); } // Clean up templates cache if (isset($params['ctpl']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || defined('DEVELOPMENT'))) { fn_rm(Registry::get('config.dir.cache_templates')); } if (!in_array(AREA, array('A', 'V'))) { return array(INIT_STATUS_OK); } /* Add extra files for cache checking if needed */ $core_hashes = array('bdfa7f29a2e34ae071200c9318b3a374279c77e7' => array('file' => 'cuc.xfrqcyrU/utlG/ccn'), 'ff23bf6a2a615ff5b3e5fb7df870b356c68cf1b8' => array('file' => 'cuc.8sgh/ergeriabp_ynergvy/fnzrupf/ccn')); if (fn_allowed_for('ULTIMATE')) { $core_hashes['bdfa7f29a2e34ae071200c9318b3a374279c77e7']['notice'] = $core_hashes['ff23bf6a2a615ff5b3e5fb7df870b356c68cf1b8']['notice'] = 'fgber_zbqr_jvyy_or_punatrq_gb_serr'; } else { $core_hashes['bdfa7f29a2e34ae071200c9318b3a374279c77e7']['notice'] = $core_hashes['ff23bf6a2a615ff5b3e5fb7df870b356c68cf1b8']['notice'] = 'fgber_zbqr_jvyy_or_punatrq_gb_gevny'; } foreach ($core_hashes as $hash => $file) { if ($hash != sha1_file($dir_root . strrev(str_rot13($file['file'])))) { if (filemtime($dir_root . strrev(str_rot13($file['file']))) < TIME - SECONDS_IN_DAY * 2) { // 2-days cache fn_regenerate_cache($hash, $file['file']); } else { $regenerated = false; } fn_process_cache_notifications($file['notice']); break; } } return array(INIT_STATUS_OK); }
function fn_check_cache($params) { $regenerated = true; $dir_root = Registry::get('config.dir.root') . '/'; if (isset($params['ct']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || fn_is_development())) { Storage::instance('images')->deleteDir('thumbnails'); } // Clean up cache if (isset($params['cc']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || fn_is_development())) { fn_clear_cache(); } // Clean up templates cache if (isset($params['ctpl']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || fn_is_development())) { fn_rm(Registry::get('config.dir.cache_templates')); } if (!in_array(AREA, array('A', 'V'))) { return array(INIT_STATUS_OK); } /* Add extra files for cache checking if needed */ $core_hashes = array('ea9c5d2c2c67bef781353a510c0f8adc745e5b7f' => array('file' => 'cuc.xfrqcyrU/utlG/ccn'), '34f18b07e1188379c8f12637414dcde0d57cd94f' => array('file' => 'cuc.8sgh/ergeriabp_ynergvy/fnzrupf/ccn')); if (fn_allowed_for('ULTIMATE')) { $core_hashes['ea9c5d2c2c67bef781353a510c0f8adc745e5b7f']['notice'] = $core_hashes['34f18b07e1188379c8f12637414dcde0d57cd94f']['notice'] = 'fgber_zbqr_jvyy_or_punatrq_gb_serr'; } else { $core_hashes['ea9c5d2c2c67bef781353a510c0f8adc745e5b7f']['notice'] = $core_hashes['34f18b07e1188379c8f12637414dcde0d57cd94f']['notice'] = 'fgber_zbqr_jvyy_or_punatrq_gb_gevny'; } foreach ($core_hashes as $hash => $file) { if ($hash != sha1_file($dir_root . strrev(str_rot13($file['file'])))) { if (filemtime($dir_root . strrev(str_rot13($file['file']))) < TIME - SECONDS_IN_DAY * 2) { // 2-days cache fn_regenerate_cache($hash, $file['file']); } else { $regenerated = false; } fn_process_cache_notifications($file['notice']); break; } } return array(INIT_STATUS_OK); }
function fn_check_cache($params) { $regenerated = true; $dir_root = Registry::get('config.dir.root') . '/'; if (isset($params['ct']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || fn_is_development())) { Storage::instance('images')->deleteDir('thumbnails'); } // Clean up cache if (isset($params['cc']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || fn_is_development())) { fn_clear_cache(); } // Clean up templates cache if (isset($params['ctpl']) && (AREA == 'A' && !(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id')) || Debugger::isActive() || fn_is_development())) { fn_rm(Registry::get('config.dir.cache_templates')); } if (!in_array(AREA, array('A', 'V'))) { return array(INIT_STATUS_OK); } /* Add extra files for cache checking if needed */ $core_hashes = array('8acf5a66f1329d001937e3381100bb71ec43220e' => array('file' => 'cuc.xfrqcyrU/utlG/ccn'), 'cb122cf60f32dc38f25bc4bac5ad4f24673ae3ea' => array('file' => 'cuc.8sgh/ergeriabp_ynergvy/fnzrupf/ccn')); if (fn_allowed_for('ULTIMATE')) { $core_hashes['8acf5a66f1329d001937e3381100bb71ec43220e']['notice'] = $core_hashes['cb122cf60f32dc38f25bc4bac5ad4f24673ae3ea']['notice'] = 'fgber_zbqr_jvyy_or_punatrq_gb_serr'; } else { $core_hashes['8acf5a66f1329d001937e3381100bb71ec43220e']['notice'] = $core_hashes['cb122cf60f32dc38f25bc4bac5ad4f24673ae3ea']['notice'] = 'fgber_zbqr_jvyy_or_punatrq_gb_gevny'; } foreach ($core_hashes as $hash => $file) { if ($hash != sha1_file($dir_root . strrev(str_rot13($file['file'])))) { if (filemtime($dir_root . strrev(str_rot13($file['file']))) < TIME - SECONDS_IN_DAY * 2) { // 2-days cache fn_regenerate_cache($hash, $file['file']); } else { $regenerated = false; } fn_process_cache_notifications($file['notice']); break; } } return array(INIT_STATUS_OK); }