| version 1.49, 2011/11/22 16:06:59 |
version 1.50, 2012/05/02 12:58:15 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/subst.inc.php,v 1.48 2011-01-24 16:44:48 igor Exp $ */ |
/* $Platon: Metafox/subst.inc.php,v 1.49 2011-11-22 16:06:59 igor Exp $ */ |
| |
|
| require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
| require_once 'error.inc.php'; |
require_once 'error.inc.php'; |
| Line 369 if ($ezin_tmpl_main->isVar('article_item |
|
| Line 369 if ($ezin_tmpl_main->isVar('article_item |
|
| $section_id = $ezin_db_section != '' && (strpos($ezin_db_section['section_type2'], 'global') === false) ? $ezin_db_section['section_id'] : 0; |
$section_id = $ezin_db_section != '' && (strpos($ezin_db_section['section_type2'], 'global') === false) ? $ezin_db_section['section_id'] : 0; |
| $author_id = $ezin_db_author != '' ? $ezin_db_author['search'] : ''; |
$author_id = $ezin_db_author != '' ? $ezin_db_author['search'] : ''; |
| $limit = $ezin_db_section != '' ? intval($ezin_db_section['section_limit']) : 0; |
$limit = $ezin_db_section != '' ? intval($ezin_db_section['section_limit']) : 0; |
| |
|
| |
// check sources in section |
| |
$sources = ezin_get_sources($section_id); |
| |
if (count($sources) > 0) { |
| |
$min_time = $sources[0]['normal_refresh_time']; // minutes |
| |
foreach($sources as $source) { |
| |
$cache_rss_xml = ezin_cache_load('Source'.intval($source['id'])); |
| |
$refresh_time = ($cache_rss_xml['var_var'] == 1) ? $source['fail_refresh_time'] : $source['normal_refresh_time']; |
| |
$min_time = ($min_time > $refresh_time) ? $refresh_time : $min_time; |
| |
} |
| |
$min_time *= 60; // seconds |
| |
// compare time of update for section update |
| |
if (($cache_ar['timestamp'] + $min_time) < Time()) { |
| |
ezin_cache_clear($cache_id); |
| |
$cache_ar = array(); |
| |
} |
| |
} |
| |
|
| if (intval($cache_ar['timestamp']) <= 0) { |
if (intval($cache_ar['timestamp']) <= 0) { |
| $item = new HTML_Template_Platon($ezin_sys['tmpl']['article_item'].$ezin_tmpl_key, |
$item = new HTML_Template_Platon($ezin_sys['tmpl']['article_item'].$ezin_tmpl_key, |
| /* article_items on article page? strange, but it *should* work, |
/* article_items on article page? strange, but it *should* work, |