From 13918f73377b9b6c3ef16b03a88c39327ed3e6ef Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 16 Feb 2017 11:07:23 +0100 Subject: [PATCH] host/services: do not show tables based on... ...whether they have content or not. It's too late to take this decision in the view, as different tables are to be handled differently - in the controlller. fixes #793 --- application/controllers/HostController.php | 4 +++- application/views/scripts/host/services.phtml | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/HostController.php b/application/controllers/HostController.php index 3cd03fc3..4665c4ba 100644 --- a/application/controllers/HostController.php +++ b/application/controllers/HostController.php @@ -142,7 +142,9 @@ class HostController extends ObjectController ->setTitle($title) ->setConnection($db); - $tables[$title] = $table; + if (count($table)) { + $tables[$title] = $table; + } $this->view->tables = $tables; } diff --git a/application/views/scripts/host/services.phtml b/application/views/scripts/host/services.phtml index f47dd604..62629c39 100644 --- a/application/views/scripts/host/services.phtml +++ b/application/views/scripts/host/services.phtml @@ -10,8 +10,6 @@
form ?> tables as $key => $table): ?> - render() ?> -