|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I'm new to this list, and I'm sure if I searched long enough there'd be something in an old message, but there is no obvious search facility, so forgive me and here goes: We're using Smarty 2.6.5-dev at the moment, which I know is quite a way behind the current version, but as it's in use in a bigger system, upgrading it was never felt to be particularly important, until now. We've had a user experiencing template-based errors (invalid arguments being passed to a preg_replace in the compiler), so thought upgrading Smarty would be a good place to start, but it seems that the ! (negation) operator, as in {if !$hasOptions} no longer works, and I wondered why this is, as I don't exactly relish the thought of changing all our code. Perhaps to clarify, it doesn't generate errors about the !, it just evaluates to true. So in summary, what can anyone suggest as the easiest way to get a site that uses ! quite a lot to work with the latest version of smarty? thanks Greg |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Fri, Nov 25, 2005 at 11:26:33AM +0000, Greg Jones wrote:
[...] > So in summary, what can anyone suggest as the easiest way to get a site > that uses ! quite a lot to work with the latest version of smarty? {if !$var} works quite well in Smarty-2.6.10 and in CVS Head and was never removed. > thanks > > Greg |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Remember to delete all the compiled templates(files in templates_c/)
after upgrade! pedro Greg Jones wrote: > Hi, > > I'm new to this list, and I'm sure if I searched long enough there'd be > something in an old message, but there is no obvious search facility, so > forgive me and here goes: > > We're using Smarty 2.6.5-dev at the moment, which I know is quite a way > behind the current version, but as it's in use in a bigger system, > upgrading it was never felt to be particularly important, until now. > We've had a user experiencing template-based errors (invalid arguments > being passed to a preg_replace in the compiler), so thought upgrading > Smarty would be a good place to start, but it seems that the ! > (negation) operator, as in {if !$hasOptions} no longer works, and I > wondered why this is, as I don't exactly relish the thought of changing > all our code. > Perhaps to clarify, it doesn't generate errors about the !, it just > evaluates to true. > > So in summary, what can anyone suggest as the easiest way to get a site > that uses ! quite a lot to work with the latest version of smarty? > > thanks > > Greg |
|
![]() |
| Outils de la discussion | |
|
|