|
Posted by "messju mohr" on 09/30/34 11:19
On Wed, Jun 22, 2005 at 02:00:59PM -0500, Monte Ohrt wrote:
> Alexandre Cognard wrote:
>
> >Hi,
> >
> >In smarty, when $smarty->compile_check is set to true, smarty check if the
> >smarty compiled template is the lastest.
> >
> >But, does this function check if the compiled template change after the
> >compilation ? (In case of direct modification on the compiled template,
> >user
> >or others ?)
> >
> >
>
> Yes, that is what compile_check is for. If the compiled file doesn't
> exist, it gets compiled regardless of compile_check. After compilation
> is done, it is only compared to the original template file time if
> compile_check is on.
not really. the question was what happens if somebody modifies the
*compiled* template.
the compile_check is mainly the file's modification time compared of
the source template vs. the modification time of the compiled
template. if the compiled exists and is "newer" everythings fine for
smarty and it doesn't attempt any recompilation. an edit of a compiled
template very likely even raises the modifications so it doesn't make
a change to smarty's (little naive) comparason.
> >And if not, does someone made something to test this and recompile
> >correctly
> >the generated template ?
no. you can enables force_compile to be sure, or rely on
compile_check, but there is nothing easy in between (AFAIK).
> >Regards,
> >Alexandre
Navigation:
[Reply to this message]
|