aboutsummaryrefslogtreecommitdiffstats
path: root/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
diff options
context:
space:
mode:
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.php26
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);
}
/**