From 1ebfd4d0e5d31b4d542d586bbf683fe5552fc0f1 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 1 Dec 2009 19:10:55 -0700 Subject: [PATCH] optimizations --- framework/Block/lib/Horde/Block.php | 8 ++++---- framework/Block/lib/Horde/Block/Collection.php | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/Block/lib/Horde/Block.php b/framework/Block/lib/Horde/Block.php index 9124415b9..fd5bd9402 100644 --- a/framework/Block/lib/Horde/Block.php +++ b/framework/Block/lib/Horde/Block.php @@ -106,7 +106,7 @@ class Horde_Block /* If we changed application context in the course of this * call, undo that change now. */ - if ($app_pushed === true) { + if ($app_pushed) { $GLOBALS['registry']->popApp(); } @@ -136,7 +136,7 @@ class Horde_Block /* If we changed application context in the course of this * call, undo that change now. */ - if ($app_pushed === true) { + if ($app_pushed) { $GLOBALS['registry']->popApp(); } @@ -166,7 +166,7 @@ class Horde_Block /* If we changed application context in the course of this * call, undo that change now. */ - if ($app_pushed === true) { + if ($app_pushed) { $GLOBALS['registry']->popApp(); } @@ -190,7 +190,7 @@ class Horde_Block /* If we changed application context in the course of this * call, undo that change now. */ - if ($app_pushed === true) { + if ($app_pushed) { $GLOBALS['registry']->popApp(); } } diff --git a/framework/Block/lib/Horde/Block/Collection.php b/framework/Block/lib/Horde/Block/Collection.php index 6878e49ba..6c8ec1713 100644 --- a/framework/Block/lib/Horde/Block/Collection.php +++ b/framework/Block/lib/Horde/Block/Collection.php @@ -113,6 +113,7 @@ class Horde_Block_Collection } closedir($dh); } + // Don't pop an application if we didn't have to push one. if ($pushed) { $GLOBALS['registry']->popApp($app); -- 2.11.0