Re: [SMARTY-DEV] Suggestion: make template commands case insensitive
| From: | Wom.bat | Date: | Wed, 23 Apr 2003 11:10:55 +0000 |
| Subject: | Re: [SMARTY-DEV] Suggestion: make template commands case insensitive | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1256@lists.php.net to get a copy of this message | ||
> hmm, yes sorry. see my private mail. grmpf.
;) you have mail :)
> yes. this idea came up some time before but hasn't been done yet.
> i would definately also vote for making function/plugins-names case-
> insensitive.
goooooooooooooood ;>
> only the filenames for autoloaded-plugins make me headaches: no
> problem on windows, where filenames are not case-sensitive
> (*shudder*). but on other system we can have function.showwhatever.php
> and function.showWhatEver.php in the plugin-dir.
>
> which one should we take?
>
> currently function.showWhatEver.php would be taken, but thats case-
> sensitive behaviour.
>
> if we change it to take function.showwhatever.php this *is* a BC issue
> but i ask, is this a real one?
well... erm... in both files, there would be a function declaration:
function smarty_function_showwhatever()
and
function smarty_function_showWhatEver()
but they are the same, and something like that wouldn't work anyways, as php
would then say:
Fatal error: Cannot redeclare smarty_function_showwhatever() (previously
declared in /home/www/foo/bar/plugins/function.showWhatEver.php:4) in
/home/www/foo/bar/plugins/function.showwhatever.php on line 4
so I guess it wouldn't even break BC, would it?
I would suggest that Smarty, in such a case, only reads the first file and
then aborts with an error message explaining that something like this isn't
allowed!?
Regards,
David