Automatically exported from code.google.com/p/planningalerts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1011 B

  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_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
  21. $smarty->_include($_include_file_path, true);
  22. }
  23. foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
  24. $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
  25. array(&$smarty, '_process_compiled_include_callback'),
  26. $_return);
  27. }
  28. $smarty->_cache_including = $_cache_including;
  29. return $_return;
  30. }
  31. ?>