Source for file core.process_cached_inserts.php
Documentation is available at core.process_cached_inserts.php
* Replace cached inserts with the actual results
preg_match_all('!'. $smarty->_smarty_md5. '{insert_cache (.*)}'. $smarty->_smarty_md5. '!Uis',
$params['results'], $match);
list ($cached_inserts, $insert_args) = $match;
for ($i = 0 , $for_max = count($cached_inserts); $i < $for_max; $i++ ) {
if ($smarty->debugging ) {
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
if (isset ($args['script'])) {
$_params = array ('resource_name' => $smarty->_dequote ($args['script']));
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php');
$resource_type = $_params['resource_type'];
$php_resource = $_params['php_resource'];
if ($resource_type == 'file') {
$smarty->_include ($php_resource, true );
$smarty->_eval ($php_resource);
$function_name = $smarty->_plugins ['insert'][$name][0 ];
if (empty ($args['assign'])) {
$replace = $function_name($args, $smarty);
$smarty->assign ($args['assign'], $function_name($args, $smarty));
$params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']);
if ($smarty->debugging ) {
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
$smarty->_smarty_debug_info [] = array ('type' => 'insert',
'filename' => 'insert_'. $name,
'depth' => $smarty->_inclusion_depth ,
return $params['results'];
/* vim: set expandtab: */
Documentation generated on Mon, 25 Jun 2007 14:02:07 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.
|