Хранилища Subversion ant

Редакция

Редакция 2 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 2 Редакция 296
1
<?php
1
<?php
2
/**
2
/**
3
 * Smarty plugin
3
 * Smarty plugin
4
 * @package Smarty
4
 * @package Smarty
5
 * @subpackage plugins
5
 * @subpackage plugins
6
 */
6
 */
7
7
8
/**
8
/**
9
 * Replace nocache-tags by results of the corresponding non-cacheable
9
 * Replace nocache-tags by results of the corresponding non-cacheable
10
 * functions and return it
10
 * functions and return it
11
 *
11
 *
12
 * @param string $compiled_tpl
12
 * @param string $compiled_tpl
13
 * @param string $cached_source
13
 * @param string $cached_source
14
 * @return string
14
 * @return string
15
 */
15
 */
16
16
17
function smarty_core_process_compiled_include($params, &$smarty)
17
function smarty_core_process_compiled_include($params, &$smarty)
18
{
18
{
19
    $_cache_including = $smarty->_cache_including;
19
    $_cache_including = $smarty->_cache_including;
20
    $smarty->_cache_including = true;
20
    $smarty->_cache_including = true;
21
21
22
    $_return = $params['results'];
22
    $_return = $params['results'];
23
23
24
    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
24
    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
25
        $smarty->_include($_include_file_path, true);
25
        $smarty->_include($_include_file_path, true);
26
    }
26
    }
27
27
28
    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
28
    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
29
        $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
29
        $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
30
                                         array(&$smarty, '_process_compiled_include_callback'),
30
                                         array(&$smarty, '_process_compiled_include_callback'),
31
                                         $_return);
31
                                         $_return);
32
    }
32
    }
33
    $smarty->_cache_including = $_cache_including;
33
    $smarty->_cache_including = $_cache_including;
34
    return $_return;
34
    return $_return;
35
}
35
}
36
36
37
?>
37
?>
38
 
38