- reactivated $error_reporting property handling

- fixed typo in compile_continue
- fixed security in {fetch} plugin
- changed back plugin parameters to two. second is template object 
  with transparent access to Smarty object
- fixed {config_load} scoping form compile time to run time
This commit is contained in:
uwe.tews@googlemail.com
2010-11-12 23:42:32 +00:00
parent 86afd1b42a
commit 5e21770fe5
28 changed files with 77 additions and 68 deletions

View File

@@ -34,7 +34,7 @@
* @return string
* @uses smarty_function_escape_special_chars()
*/
function smarty_function_html_image($params, $smarty, $template)
function smarty_function_html_image($params, $template)
{
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
//$smarty->loadPlugin('Smarty_shared_escape_special_chars');
@@ -47,7 +47,7 @@ function smarty_function_html_image($params, $smarty, $template)
$prefix = '';
$suffix = '';
$path_prefix = '';
$server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
$server_vars = ($template->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
$basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
foreach($params as $_key => $_val) {
switch ($_key) {
@@ -108,8 +108,8 @@ function smarty_function_html_image($params, $smarty, $template)
return;
}
}
if ($template->security) {
if (!$smarty->security_handler->isTrustedResourceDir($_image_path)) {
if (isset($template->security_policy)) {
if (!$template->security_policy->isTrustedResourceDir($_image_path)) {
return;
}
}