From: Fabien Potencier Date: Sat, 14 Aug 2010 11:50:37 +0000 (+0200) Subject: simplified code X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9a9679be771d59202b80f68211a262a472026b62;p=web%2Fkonrad%2Ftwig.git simplified code --- diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index dd8fc68..28e8fe0 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -199,16 +199,10 @@ class Twig_Environment eval('?>'.$this->compileSource($this->loader->getSource($name), $name)); } else { if (!file_exists($cache) || ($this->isAutoReload() && !$this->loader->isFresh($name, filemtime($cache)))) { - $content = $this->compileSource($this->loader->getSource($name), $name); - - if (false === $this->writeCacheFile($cache, $content)) { - eval('?>'.$content); - } else { - require_once $cache; - } - } else { - require_once $cache; + $this->writeCacheFile($cache, $this->compileSource($this->loader->getSource($name), $name)); } + + require_once $cache; } }