This commit is contained in:
2018-03-12 23:35:55 +03:00
parent 2edae28a58
commit 4e4a58d40a
94 changed files with 8988 additions and 7890 deletions

@ -29,6 +29,10 @@ function parse_block($id)
{
$cache_file = BASE_DIR . '/cache/sql/block/' . $id . '.cache';
// Если включен DEV MODE, то отключаем кеширование запросов
if (defined('DEV_MODE') AND DEV_MODE)
$cache_file = null;
if (! file_exists(dirname($cache_file)))
mkdir(dirname($cache_file), 0766, true);
@ -48,7 +52,8 @@ function parse_block($id)
LIMIT 1
")->GetCell();
file_put_contents($cache_file,$return);
if ($cache_file)
file_put_contents($cache_file, $return);
}
//-- парсим теги
@ -84,9 +89,9 @@ function parse_block($id)
$gen_time = Debug::endTime('BLOCK_' . $id);
$GLOBALS['block_generate'][] = array('BLOCK_'. $id => $gen_time);
$GLOBALS['block_generate']['BLOCKS'][$id] = $gen_time;
return $return;
}
}
?>
?>