From 2883127af53ab4699a45ccd73a7f2070bcd2a039 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 14 Dec 2010 17:52:54 +0100 Subject: [PATCH] simplified code --- lib/Twig/Loader/Filesystem.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.2.5