From baf703b92b4644f132db15987346a893a0a00702 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 15 Oct 2018 14:56:35 +0200 Subject: [PATCH] Do not show db or site quota when the sites module is not active --- interface/web/dashboard/dashlets/databasequota.php | 5 +++++ interface/web/dashboard/dashlets/quota.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index b126d95a50..a3f6f905dc 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -8,6 +8,11 @@ class dashlet_databasequota { //* Loading Template $app->uses('tpl,quota_lib'); + $modules = $_SESSION['s']['user']['modules']; + if (!in_array($modules, 'sites')) { + return ''; + } + $tpl = new tpl; $tpl->newTemplate("dashlets/templates/databasequota.htm"); diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index 6ff975b623..f94150a0ff 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -8,6 +8,11 @@ class dashlet_quota { //* Loading Template $app->uses('tpl,quota_lib'); + $modules = $_SESSION['s']['user']['modules']; + if (!in_array($modules, 'sites')) { + return ''; + } + $tpl = new tpl; $tpl->newTemplate("dashlets/templates/quota.htm"); -- GitLab