From: fabien Date: Wed, 18 Nov 2009 11:25:24 +0000 (+0000) Subject: fixed typo X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=36416cf2a68c1c34bc26ec666ebd0ec4c9e27591;p=konrad%2Ftwig.git fixed typo git-svn-id: http://svn.twig-project.org/trunk@143 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/doc/03-Twig-for-Developers.markdown b/doc/03-Twig-for-Developers.markdown index be94e34..6df907b 100644 --- a/doc/03-Twig-for-Developers.markdown +++ b/doc/03-Twig-for-Developers.markdown @@ -134,21 +134,21 @@ Here a list of the built-in loaders Twig provides: can find templates in folders on the file system and is the preferred way to load them. - [php] - $loader = new Twig_Loader_Filesystem($templateDir); + [php] + $loader = new Twig_Loader_Filesystem($templateDir); * `Twig_Loader_String`: Loads templates from a string. It's a dummy loader as you pass it the source code directly. - [php] - $loader = new Twig_Loader_String(); + [php] + $loader = new Twig_Loader_String(); * `Twig_Loader_Array`: Loads a template from a PHP array. It's passed an array of strings bound to template names. This loader is useful for unit testing. - [php] - $loader = new Twig_Loader_Array($templates); + [php] + $loader = new Twig_Loader_Array($templates); ### Create your own Loader diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index 3df61dd..8a35ad1 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -100,7 +100,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface */ public function isFresh($name, $time) { - return $time < filemtime($this->findTemplate($name)); + return filemtime($this->findTemplate($name)) < $time; } protected function findTemplate($name)