Re: [SMARTY-DEV] Compile {if} tag

From: Date: Mon, 13 Jan 2003 21:55:27 +0000
Subject: Re: [SMARTY-DEV] Compile {if} tag
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-529@lists.php.net to get a copy of this message
got it, these will get into the next cvs commit. On Mon, 2003-01-13 at 06:38, MCM Media Consult Maier & Partner GmbH wrote: > Hi there, > > it seems to me that the latest _compile_if_tag() is missing some stuff :( > > {if substr($theUrl, -4) eq ".pdf"}PDF{else}HTML{/if} > > The regexp group "valid non-word token" matches only pure numbers, so "-4)" > is matched as token instead of "-4" alone. If I'm not wrong, the same should > happen with floating point numbers, too. The regexp could be enhanced to > match any numbers, like "-?\d*.?\d+" does (nope, doesn't match > exponents...). > > In addition to that, binary OR (|) and XOR (^) are(?) supported, whereas AND > (&) and NOT (~) are missing (not sure about that, since the CASEs were > missing for all, and I'm too lazy to test it right now... :) > > Yours, > Stefan -- Monte Ohrt <monte@ispi.net>

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