PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > Removal of support for !
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Removal of support for !

Réponse
 
LinkBack Outils de la discussion
Vieux 25/11/2005, 11h26   #1
Greg Jones
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Removal of support for !

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
  Réponse avec citation
Vieux 25/11/2005, 11h35   #2
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Removal of support for !

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

  Réponse avec citation
Vieux 25/11/2005, 13h24   #3
Pedro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Removal of support for !

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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h53.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10731 seconds with 11 queries