mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix isset() did not allow multiple parameter
- improvment of some error messages - bugfix html_image did use removed property $request_use_auto_globals
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
14/11/2010
|
||||
- bugfix isset() did not allow multiple parameter
|
||||
- improvment of some error messages
|
||||
- bugfix html_image did use removed property $request_use_auto_globals
|
||||
|
||||
13/11/2010
|
||||
- bugfix overloading problem when $smarty->fetch()/display() have been used in plugins
|
||||
(introduced with 3.0.2)
|
||||
@@ -34,7 +39,7 @@
|
||||
|
||||
09/11/2010
|
||||
-bugfix on complex expressions as start value for {for} tag
|
||||
|
||||
request_use_auto_globals
|
||||
04/11/2010
|
||||
- bugfix do not allow access of dynamic and private object members of assigned objects when
|
||||
security is enabled.
|
||||
|
@@ -45,7 +45,7 @@ function smarty_function_html_image($params, $template)
|
||||
$prefix = '';
|
||||
$suffix = '';
|
||||
$path_prefix = '';
|
||||
$server_vars = ($template->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
|
||||
$server_vars = $_SERVER;
|
||||
$basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
|
||||
foreach($params as $_key => $_val) {
|
||||
switch ($_key) {
|
||||
|
@@ -50,7 +50,8 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
||||
$_ldl = preg_quote($template->smarty->left_delimiter);
|
||||
|
||||
if (0 == preg_match("!({$_ldl}block\s+)(name=)?(\w+|'\w+'|\"\w+\")(\s*?)?((append|prepend|nocache)(=true)?)?(\s*{$_rdl})!", $block_tag, $_match)) {
|
||||
$template->compiler_object->trigger_template_error('Illegal {block} tag syntax');
|
||||
$error_text = 'Syntax Error in template "' . $template->getTemplateFilepath() . '" "' . htmlspecialchars($block_tag) . '" illegal options';
|
||||
throw new SmartyCompilerException($error_text);
|
||||
} else {
|
||||
$_name = trim($_match[3], '\'"');
|
||||
// replace {$smarty.block.child}
|
||||
@@ -101,7 +102,11 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
||||
}
|
||||
}
|
||||
if ($_name == null) {
|
||||
$compiler->trigger_template_error('{$smarty.block.child} used out of context');
|
||||
$compiler->trigger_template_error('{$smarty.block.child} used out of context', $this->compiler->lex->taglineno);
|
||||
}
|
||||
// undefined child?
|
||||
if (!isset($compiler->template->block_data[$_name])) {
|
||||
return '';
|
||||
}
|
||||
$_tpl = new Smarty_Internal_template ('eval:' . $compiler->template->block_data[$_name]['source'], $compiler->smarty, $compiler->template, $compiler->template->cache_id,
|
||||
$compiler->template->compile_id = null, $compiler->template->caching, $compiler->template->cache_lifetime);
|
||||
|
@@ -37,7 +37,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase {
|
||||
$item = $_attr['item'];
|
||||
|
||||
if (substr_compare("\$_smarty_tpl->getVariable($item)", $from,0, strlen("\$_smarty_tpl->getVariable($item)")) == 0) {
|
||||
$this->compiler->trigger_template_error("item parameter {$item} may not be the same parameter at 'from'");
|
||||
$this->compiler->trigger_template_error("item variable {$item} may not be the same variable as at 'from'", $this->compiler->lex->taglineno);
|
||||
}
|
||||
|
||||
if (isset($_attr['key'])) {
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user