made $SCRIPT_NAME available again

changes default for request_use_auto_global to prefer autoglobals
This commit is contained in:
messju
2003-12-27 09:41:43 +00:00
parent def552981a
commit 077bb151ad
2 changed files with 6 additions and 1 deletions

3
NEWS
View File

@@ -1,3 +1,6 @@
- change default of request_use_auto_globals to true - $_SERVER is
now preferred over $HTTP_SERVER_VARS (messju)
- re-add support for $SCRIPT_NAME (messju)
- reactivate $smarty->default_modifiers (messju) - reactivate $smarty->default_modifiers (messju)
- add cookie persistance to debug console (Monte) - add cookie persistance to debug console (Monte)
- allow single-digit days and months without smarty_make_timestamp() - allow single-digit days and months without smarty_make_timestamp()

View File

@@ -287,7 +287,7 @@ class Smarty
* *
* @var boolean * @var boolean
*/ */
var $request_use_auto_globals = false; var $request_use_auto_globals = true;
/** /**
* Set this if you want different sets of compiled files for the same * Set this if you want different sets of compiled files for the same
@@ -583,6 +583,8 @@ class Smarty
*/ */
function Smarty() function Smarty()
{ {
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
: @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
} }
/** /**