- fixed preg_qoute on delimiters

This commit is contained in:
Uwe.Tews
2009-11-10 16:04:32 +00:00
parent 60601acc25
commit d35746dd26
3 changed files with 42 additions and 35 deletions

View File

@@ -1,3 +1,6 @@
11/10/2009
- fixed preg_qoute on delimiters
11/09/2009
- lexer/parser bugfix
- new SMARTY_SPL_AUTOLOAD constant to control the autoloader option

View File

@@ -68,7 +68,11 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
$compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $prop['file_dependency']);
}
if (isset($prop['function'])) {
if (isset($compiler->template->properties['function'])) {
$compiler->template->properties['function'] = array_merge((array)$compiler->template->properties['function'], $prop['function']);
} else {
$compiler->template->properties['function'] = $prop['function'];
}
}
$has_compiled_template = true;
}

View File

@@ -79,8 +79,8 @@ class Smarty_Internal_Templatelexer
$this->counter = 0;
$this->line = 1;
$this->smarty = $smarty;
$this->ldel = preg_quote($this->smarty->left_delimiter);
$this->rdel = preg_quote($this->smarty->right_delimiter);
$this->ldel = preg_quote($this->smarty->left_delimiter,'/');
$this->rdel = preg_quote($this->smarty->right_delimiter,'/');
$this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter;
$this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter;
}