mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fix: check $smarty->request_use_auto_globals at the last occurences of
HTTP_*_VARS
This commit is contained in:
@@ -1142,7 +1142,7 @@ class Smarty
|
||||
? $this->tpl_error_reporting : error_reporting() & ~E_NOTICE);
|
||||
|
||||
if (!$this->debugging && $this->debugging_ctrl == 'URL'
|
||||
&& @strstr($GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'], $this->_smarty_debug_id)) {
|
||||
&& @strstr(($this->request_use_auto_globals) ? $_SERVER['QUERY_STRING'] : $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'], $this->_smarty_debug_id)) {
|
||||
// enable debugging from URL
|
||||
$this->debugging = true;
|
||||
}
|
||||
@@ -1204,7 +1204,8 @@ class Smarty
|
||||
$_smarty_results .= smarty_core_display_debug_console($_params, $this);
|
||||
}
|
||||
if ($this->cache_modified_check) {
|
||||
$_last_modified_date = @substr($GLOBALS['HTTP_SERVER_VARS']['HTTP_IF_MODIFIED_SINCE'], 0, strpos($GLOBALS['HTTP_SERVER_VARS']['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
|
||||
$_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
|
||||
$_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
|
||||
$_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
|
||||
if (@count($this->_cache_info['insert_tags']) == 0
|
||||
&& !$this->_cache_serials
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user