From bc32ed81d54dce5e66f85787977f9ed28ec982da Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 31 Oct 2013 13:17:35 +0100 Subject: [PATCH] Revert "merged branch Cottser/master (PR #1071)" This reverts commit 2f5c9899a4088fce3bb6325d96232cd1978161e4, reversing changes made to 4e7094f6a3831dc86b4963d805c4567f4076fce3. Conflicts: lib/Twig/Environment.php --- lib/Twig/Environment.php | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index b36af40..c707196 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -44,7 +44,6 @@ class Twig_Environment protected $functionCallbacks; protected $filterCallbacks; protected $staging; - protected $templateClasses; /** * Constructor. @@ -108,7 +107,6 @@ class Twig_Environment $this->setCache($options['cache']); $this->functionCallbacks = array(); $this->filterCallbacks = array(); - $this->templateClasses = array(); $this->addExtension(new Twig_Extension_Core()); $this->addExtension(new Twig_Extension_Escaper($options['autoescape'])); @@ -264,13 +262,7 @@ class Twig_Environment */ public function getTemplateClass($name, $index = null) { - $suffix = null === $index ? '' : '_'.$index; - $cls = $name.$suffix; - if (isset($this->templateClasses[$cls])) { - return $this->templateClasses[$cls]; - } - - return $this->templateClasses[$cls] = $this->templateClassPrefix.hash('sha256', $this->getLoader()->getCacheKey($name)).$suffix; + return $this->templateClassPrefix.hash('sha256', $this->getLoader()->getCacheKey($name)).(null === $index ? '' : '_'.$index); } /** -- 1.7.2.5