Re: [SMARTY] Smarty_Compiler.class.php small fix?
| From: | Monte Ohrt | Date: | Mon, 06 Jan 2003 14:49:16 +0000 |
| Subject: | Re: [SMARTY] Smarty_Compiler.class.php small fix? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7031@lists.php.net to get a copy of this message | ||
That depends, should Smarty respect the settings of variables_order? If
so, ENV variables will not be accessible from the template if GPCS is
the setting (the way it works now)
On Mon, 2003-01-06 at 06:12, Wojciech Jukowski wrote:
> hello,
>
> php.ini-recommended suggests setting variables_order to GPCS (no
> variables from $HTTP_ENV_VARS). IMHO the $HTTP_ENV_VARS[..] pointer can
> be changed to getenv().
>
>
>
> $ diff Smarty_Compiler.class.php Smarty_Compiler.class.php2
>
> 1323,1325c1323,1325
> < $compiled_ref = "\$GLOBALS['HTTP_ENV_VARS']";
> < if ($name = substr($indexes[0], 1))
> < $compiled_ref .= "['$name']";
> ---
> > $compiled_ref = "";
> > if ($name = substr($indexes[0], 1))
> > $compiled_ref = "getenv('$name')";
>
>
> --
> "For a word to be spoken," Ged answered slowly,
> "there must be silence. Before, and after." [ uk le guin ]
--
Monte Ohrt <monte@ispi.net>