diff options
author | Ciro Mattia Gonano <ciromattia@gmail.com> | 2013-09-11 15:56:48 +0200 |
---|---|---|
committer | Ciro Mattia Gonano <ciromattia@gmail.com> | 2013-09-11 15:57:07 +0200 |
commit | 3069eaf35e833ffe4a1c1c7829dd7e168ae27420 (patch) | |
tree | d0c2e4d934cc34ba7d4232f759923b5a257dcb21 /buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php | |
parent | b833247ce597ec26159b46c8dfbea7f1e265950b (diff) |
Merge up to r3319
Diffstat (limited to 'buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php')
-rw-r--r-- | buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php deleted file mode 100644 index 9c6a4919..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.write_compiled_include.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -/** - * Smarty plugin - * @package Smarty - * @subpackage plugins - */ - -/** - * Extract non-cacheable parts out of compiled template and write it - * - * @param string $compile_path - * @param string $template_compiled - * @param integer $template_timestamp - * @return boolean - */ - -function smarty_core_write_compiled_include($params, &$smarty) -{ - $_tag_start = 'if \(\$this->caching\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}'; - $_tag_end = 'if \(\$this->caching\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}'; - - preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', - $params['compiled_content'], $_match_source, PREG_SET_ORDER); - - // no nocache-parts found: done - if (count($_match_source)==0) return; - - // convert the matched php-code to functions - $_include_compiled = "<?php /* funky header here */\n\n"; - - $_compile_path = $params['include_file_path']; - - $smarty->_cache_serials[$_compile_path] = $params['cache_serial']; - $_include_compiled .= "\$this->_cache_serials['".$_compile_path."'] = '".$params['cache_serial']."';\n\n?>"; - - $_include_compiled .= $params['plugins_code']; - $_include_compiled .= "<?php"; - for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) { - $_match =& $_match_source[$_i]; - $_include_compiled .= " -function _smarty_tplfunc_$_match[2]_$_match[3](&\$this) -{ -$_match[4] -} - -"; - } - $_include_compiled .= "\n\n?>\n"; - - $_params = array('filename' => $_compile_path, - 'contents' => $_include_compiled, 'create_dirs' => true); - - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); - smarty_core_write_file($_params, $smarty); - return true; -} - - -?> |