diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-12-06 21:09:58 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-12-06 21:09:58 +0100 |
commit | 26c465ad0c1d5b6801507ed190430f44ac92c672 (patch) | |
tree | 9e80c34da1235e6dd55942c23bf9511fac31344d /library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php | |
parent | f2d70831838b0738e6895296f3e8ce02f86fec2f (diff) | |
download | volse-hubzilla-26c465ad0c1d5b6801507ed190430f44ac92c672.tar.gz volse-hubzilla-26c465ad0c1d5b6801507ed190430f44ac92c672.tar.bz2 volse-hubzilla-26c465ad0c1d5b6801507ed190430f44ac92c672.zip |
update smarty to 3.1.28-dev which fixes a bug where changes in a template are only visible on the second pageload which is annoying for developing
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php b/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php index 50779c7b5..56d3b0665 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php +++ b/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php @@ -30,6 +30,7 @@ class Smarty_Internal_Config_File_Compiler * @var string */ public $parser_class; + /** * Lexer object * @@ -100,16 +101,17 @@ class Smarty_Internal_Config_File_Compiler public function compileTemplate(Smarty_Internal_Template $template) { $this->template = $template; - $this->template->properties['file_dependency'][$this->template->source->uid] = array($this->template->source->name, $this->template->source->timestamp, $this->template->source->type); - // on empty config just return - if ($template->source->content == '') { - return true; - } + $this->template->compiled->file_dependency[$this->template->source->uid] = array($this->template->source->filepath, + $this->template->source->getTimeStamp(), + $this->template->source->type); if ($this->smarty->debugging) { - Smarty_Internal_Debug::start_compile($this->template); + $this->smarty->_debug->start_compile($this->template); } // init the lexer/parser to compile the config file - $lex = new $this->lexer_class(str_replace(array("\r\n", "\r"), "\n", $template->source->content) . "\n", $this); + /* @var Smarty_Internal_ConfigFileLexer $lex */ + $lex = new $this->lexer_class(str_replace(array("\r\n", "\r"), "\n", $template->source->getContent()) . + "\n", $this); + /* @var Smarty_Internal_ConfigFileParser $parser */ $parser = new $this->parser_class($lex, $this); if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { @@ -136,14 +138,16 @@ class Smarty_Internal_Config_File_Compiler mb_internal_encoding($mbEncoding); } if ($this->smarty->debugging) { - Smarty_Internal_Debug::end_compile($this->template); + $this->smarty->_debug->end_compile($this->template); } // template header code - $template_header = "<?php /* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") . "\n"; + $template_header = "<?php /* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . + strftime("%Y-%m-%d %H:%M:%S") . "\n"; $template_header .= " compiled from \"" . $this->template->source->filepath . "\" */ ?>\n"; - $code = '<?php Smarty_Internal_Extension_Config::loadConfigVars($_smarty_tpl, ' . var_export($this->config_data, true) . '); ?>'; - return $template_header . Smarty_Internal_Extension_CodeFrame::create($this->template, $code); + $code = '<?php $_smarty_tpl->smarty->ext->configLoad->_loadConfigVars($_smarty_tpl, ' . + var_export($this->config_data, true) . '); ?>'; + return $template_header . $this->template->smarty->ext->_codeFrame->create($this->template, $code); } /** |