cvs: smarty /libs Smarty.class.php /libs/plugins function.html_image.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1070537847@cvsserver>
messju		Thu Dec  4 06:37:27 2003 EDT

  Modified files:              
    /smarty/libs	Smarty.class.php 
    /smarty/libs/plugins	function.html_image.php 
  Log:
  fix: check $smarty->request_use_auto_globals at the last occurences of
       HTTP_*_VARS
  
  
  
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.464 smarty/libs/Smarty.class.php:1.465
--- smarty/libs/Smarty.class.php:1.464	Wed Dec  3 04:29:13 2003
+++ smarty/libs/Smarty.class.php	Thu Dec  4 06:37:26 2003
@@ -43,7 +43,7 @@
  * @version 2.6.1-dev
  */
 
-/* $Id: Smarty.class.php,v 1.464 2003/12/03 09:29:13 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.465 2003/12/04 11:37:26 messju Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -1142,7 +1142,7 @@
                ? $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 @@
                         $_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
Index: smarty/libs/plugins/function.html_image.php
diff -u smarty/libs/plugins/function.html_image.php:1.23 smarty/libs/plugins/function.html_image.php:1.24
--- smarty/libs/plugins/function.html_image.php:1.23	Mon Jun 30 11:44:25 2003
+++ smarty/libs/plugins/function.html_image.php	Thu Dec  4 06:37:27 2003
@@ -46,9 +46,9 @@
     $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;

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.