From 3a99023c1ddd8f6b46d7479776d9db31470012c4 Mon Sep 17 00:00:00 2001 From: franck Date: Fri, 2 Aug 2013 13:58:59 +0200 Subject: [PATCH] Fixed empty loop wich execute contents problem --- core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php | 4 ++++ templates/admin/default/assets/css/admin.less | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php index 49b622330..e1eefedb0 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php @@ -120,8 +120,12 @@ class TheliaLoop extends AbstractSmartyPlugin self::$pagination[$name] = null; $loopResults = $loop->exec(self::$pagination[$name]); + $this->loopstack[$name] = $loopResults; + // Pas de résultat ? la boucle est terminée, ne pas évaluer le contenu. + if ($loopResults->isEmpty()) $repeat = false; + } else { $loopResults = $this->loopstack[$name]; diff --git a/templates/admin/default/assets/css/admin.less b/templates/admin/default/assets/css/admin.less index 5ef82a8a6..f93a1cdd6 100755 --- a/templates/admin/default/assets/css/admin.less +++ b/templates/admin/default/assets/css/admin.less @@ -22,6 +22,11 @@ .background-clip(padding-box); } +.background-clip(@argument: padding-box) { + -moz-background-clip: @argument; + -webkit-background-clip: @argument; + background-clip: @argument; +} .box-shadow(@shadow: 0 1px 2px rgba(0,0,0,.05)) { -webkit-box-shadow: @shadow;