diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php index ada38869d..a842fa8f3 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php @@ -103,9 +103,11 @@ class Smarty_Internal_Config_File_Compiler { $this->template = $template; $this->template->compiled->file_dependency[ $this->template->source->uid ] = - array($this->template->source->filepath, - $this->template->source->getTimeStamp(), - $this->template->source->type); + array( + $this->template->source->filepath, + $this->template->source->getTimeStamp(), + $this->template->source->type + ); if ($this->smarty->debugging) { if (!isset($this->smarty->_debug)) { $this->smarty->_debug = new Smarty_Internal_Debug(); @@ -114,15 +116,22 @@ class Smarty_Internal_Config_File_Compiler } // init the lexer/parser to compile the config file /* @var Smarty_Internal_ConfigFileLexer $this ->lex */ - $this->lex = new $this->lexer_class(str_replace(array("\r\n", - "\r"), "\n", $template->source->getContent()) . "\n", - $this); + $this->lex = new $this->lexer_class( + str_replace( + array( + "\r\n", + "\r" + ), + "\n", + $template->source->getContent() + ) . "\n", + $this + ); /* @var Smarty_Internal_ConfigFileParser $this ->parser */ $this->parser = new $this->parser_class($this->lex, $this); - if (function_exists('mb_internal_encoding') && function_exists('ini_get') - && ((int) ini_get('mbstring.func_overload')) & 2 + && ((int)ini_get('mbstring.func_overload')) & 2 ) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('ASCII'); @@ -141,7 +150,6 @@ class Smarty_Internal_Config_File_Compiler } // finish parsing process $this->parser->doParse(0, 0); - if ($mbEncoding) { mb_internal_encoding($mbEncoding); } @@ -153,7 +161,6 @@ class Smarty_Internal_Config_File_Compiler "<?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_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); |