fix: check $smarty->request_use_auto_globals at the last occurences of

HTTP_*_VARS
This commit is contained in:
messju
2003-12-04 11:37:27 +00:00
parent 2cd1bcdfe6
commit 45e02b5033
2 changed files with 6 additions and 5 deletions

View File

@@ -46,9 +46,9 @@ function smarty_function_html_image($params, &$smarty)
$extra = '';
$prefix = '';
$suffix = '';
$basedir = isset($GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'])
? $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'] : '';
if(strstr($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'], 'Mac')) {
$server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
$basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
if(strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {
$dpi_default = 72;
} else {
$dpi_default = 96;