core.process_compiled_include.php 856 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Smarty plugin
  4. * @package Smarty
  5. * @subpackage plugins
  6. */
  7. /**
  8. * Replace nocache-tags by results of the corresponding non-cacheable
  9. * functions and return it
  10. *
  11. * @param string $compiled_tpl
  12. * @param string $cached_source
  13. * @return string
  14. */
  15. function smarty_core_process_compiled_include($params, &$smarty)
  16. {
  17. $_cache_including = $smarty->_cache_including;
  18. $smarty->_cache_including = true;
  19. $_return = $params['results'];
  20. foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
  21. $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
  22. array(&$smarty, '_process_compiled_include_callback'),
  23. $_return);
  24. }
  25. $smarty->_cache_including = $_cache_including;
  26. return $_return;
  27. }
  28. ?>