123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
-
-
-
- class Smarty_Internal_Nocache_Insert
- {
-
-
- public static function compile($_function, $_attr, $_template, $_script, $_assign = null)
- {
- $_output = '<?php ';
- if ($_script != 'null') {
-
-
- $_output .= "require_once '{$_script}';";
- }
-
- if (isset($_assign)) {
- $_output .= "\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>";
- } else {
- $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>";
- }
- $_tpl = $_template;
- while (isset($_tpl->parent) && $_tpl->parent->_objType == 2) {
- $_tpl = $_tpl->parent;
- }
-
- return "/*%%SmartyNocache:{$_tpl->compiled->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->compiled->nocache_hash}%%*/";
- }
- }
|