From 12ae7f4b1e0544a02a299ec5ef7ac998c8c800d0 Mon Sep 17 00:00:00 2001 From: vogelor <vogelor@ispconfig3> Date: Tue, 16 Dec 2008 10:47:28 -0500 Subject: [PATCH] It is now possible to add additional templates to the client (and delete them) --- interface/web/client/client_template_edit.php | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/interface/web/client/client_template_edit.php b/interface/web/client/client_template_edit.php index 6ae4588..7368063 100644 --- a/interface/web/client/client_template_edit.php +++ b/interface/web/client/client_template_edit.php @@ -62,10 +62,16 @@ /* * the template has changed. apply the new data to all clients */ - $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id; + if ($this->dataRecord["template_type"] == 'm'){ + $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id; + } else { + $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . '/%"'; + } $clients = $app->db->queryAllRecords($sql); - foreach ($clients as $client){ - applyClientTemplates($client['client_id']); + if (is_array($clients)){ + foreach ($clients as $client){ + applyClientTemplates($client['client_id']); + } } } } -- Gitblit v1.9.1