case-insensitive plugins
| From: | messju mohr | Date: | Sun, 27 Apr 2003 18:43:23 +0000 |
| Subject: | case-insensitive plugins | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-1276@lists.php.net to get a copy of this message | ||
hello smarty-dev,
i just broke bc to certain smarty-installations recently. :)
tag-names are case-insensitive now.
this means:
- {foreach} and {FOREACH} are the same
- $smarty->register_function('FOO', 'func_foo') and
$smarty->register_function('foo', 'func_foo')
do the same (the second overwrites the first)
- {$foo|CAPITALIZE} and {$foo|capitalizE} are the same.
the change affects builtin-functions, custom-function,
block-functions, compiler-functions and modifiers.
the change should not be problematic for most of you, since:
- using {foo} and {FOO} for different things is *really* bad style
- SMARTY_FUNCTION_FOO() and smarty_function_foo habe been the same in
php since long before.
the only thing, that could be problematic, is if you uses mixed case
filenames on a case-sensitive filesystem. before this change.
before the latest commmit: {Foo} in a template would have tried to
autoload "compiler.Foo.php", then "block.Foo.php", then
"function.Foo.php", then raise an error.
now {Foo} will make Smarty look for "compiler.foo.php",
"block.foo.php", "function.foo.php".
windows-systems are not affected, since their filenames are not
case-sensitive. users of all other systems are encouraged to update
their setups to use lower-case filenames in their plugins-dirs.
please tell me, if this change affects you, and if you have any
problems with it.
greetings
messju