From: Fabien Potencier Date: Tue, 14 Dec 2010 16:52:54 +0000 (+0100) Subject: simplified code X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=2883127af53ab4699a45ccd73a7f2070bcd2a039;p=web%2Fkonrad%2Ftwig.git simplified code --- diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index f623d25..98d9806 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -102,7 +102,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface protected function findTemplate($name) { // normalize name - $name = preg_replace('#[/\\\\]+#', '/', $name); + $name = preg_replace('#/{2,}#', '/', strtr($name, '\\', '/')); $parts = explode('/', $name); $level = 0;