From 8e5e05fdeaa5ea3a8825ac730e90442a2304dddf Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 3 Apr 2010 23:05:13 +0100 Subject: [PATCH] Only display template if Page execution was successful --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index c8a82e3..5bf9ccb 100644 --- a/index.php +++ b/index.php @@ -6,9 +6,10 @@ try { $smarty = $main->smarty(); $page = new HandBrakeCluster_Page($smarty, $main->request()); - $page->evaluate(); + if ($page->evaluate()) { + $smarty->display('index.tpl'); + } - $smarty->display('index.tpl'); } catch (HandBrakeCluster_Exception $e) { die("Uncaught Exception: " . $e->getMessage()); }