[PHPTAL] Inconsistency of PHPTAL_FORCE_REPARSE constant ?

Dagfinn Reiersøl reiersol at online.no
Fri Mar 30 08:05:47 CEST 2007


In my experience this is a common way to use constants in PHP. I'm not 
sure I like it, though. ;-)


smoking_birds_on_moon at earthling.net wrote:
> Hello,
>
> I'm not sure if this is an inconsistency, but if I use
>
>   define("PHPTAL_FORCE_REPARSE",1);
>
> in my code, every time I request a page it gets parsed.
> In a natural way I used this to disable this behaviour:
>
>   define("PHPTAL_FORCE_REPARSE",0);
>
> but the page was parsed again, because in PHPTAL.php the condition
> for reparsing a template is:
>
>    if (defined('PHPTAL_FORCE_REPARSE') ...
>
> In my case this is true, because PHPTAL_FORCE_REPARSE is defined with
> the value '0'.
>
> I think it would be clearer to ask for a defined PHPTAL_FORCE_REPARSE and
> a value unequal FALSE.
>
>
> Best regards and thanks for the code,
>
> martin
>
>
>
>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
>
>   




More information about the PHPTAL mailing list