Re: [SMARTY-DEV] case-insensitive plugins

From: Date: Mon, 28 Apr 2003 17:41:21 +0000
Subject: Re: [SMARTY-DEV] case-insensitive plugins
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1279@lists.php.net to get a copy of this message
On Sun, 27 Apr 2003, messju mohr wrote: > hello smarty-dev, > > i just broke bc to certain smarty-installations recently. :) > > tag-names are case-insensitive now. Grrrr! > 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. Why was this change made in the first place? Was it so broken that it absolutely had to be done? Or was it a case of creeping featurism where Smarty has to acquire more and more things upon the slightest request? -Andrei http://www.gravitonic.com/ When we eliminate the impossible, whatever remains, however improbable, must be true. -- Sherlock Holmes

« previous php.smarty.dev (#1279) next »