From 6ad93dff69d7c2beb2196e73f641e6484fccbeb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 20 Jan 2015 07:40:39 +0100 Subject: new folders --- locale/tools/fillCache.php | 59 ---------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100755 locale/tools/fillCache.php (limited to 'locale/tools/fillCache.php') diff --git a/locale/tools/fillCache.php b/locale/tools/fillCache.php deleted file mode 100755 index bdd9cc58..00000000 --- a/locale/tools/fillCache.php +++ /dev/null @@ -1,59 +0,0 @@ -isDir() and $tplDir!='.' and $tplDir!='..') { - echo "\n$tplDir\n"; - - $loader = new Twig_Loader_Filesystem($tplDirRoot.$tplDir); - - // force auto-reload to always have the latest version of the template - $twig = new Twig_Environment($loader, array( - 'cache' => $tmpDir, - 'auto_reload' => true - )); - - $twig->addExtension(new Twig_Extensions_Extension_I18n()); - - $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); - $twig->addFilter($filter); - - $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); - $twig->addFilter($filter); - - $filter = new Twig_SimpleFilter('getPrettyFilename', function($string) { return str_replace($siteRoot, '', $string); }); - $twig->addFilter($filter); - -// // iterate over all your templates - foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($tplDirRoot.$tplDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - // force compilation - if ($file->isFile() and pathinfo($file, PATHINFO_EXTENSION)=='twig') { - echo "\t$file\n"; - $twig->loadTemplate(str_replace($tplDirRoot.$tplDir.'/', '', $file)); - } - } - - } - - } - -- cgit v1.2.3