You are here: Re: [SMARTY] Validate compiled template « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] Validate compiled template

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация