From 7f7d1d27df8c4010b4d2038a606d26167fcae6c9 Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Thu, 25 Jun 2020 16:40:07 +0200 Subject: [PATCH] Disable FAQ edit functionality in demo mode. --- interface/web/help/faq_delete.php | 3 +++ interface/web/help/faq_edit.php | 3 +++ interface/web/help/faq_sections_delete.php | 3 +++ interface/web/help/faq_sections_edit.php | 3 +++ server/lib/classes/monitor_tools.inc.php | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/interface/web/help/faq_delete.php b/interface/web/help/faq_delete.php index c1faed60d9..161b1ce45b 100644 --- a/interface/web/help/faq_delete.php +++ b/interface/web/help/faq_delete.php @@ -11,6 +11,9 @@ require_once '../../lib/app.inc.php'; // Check module permissions $app->auth->check_module_permissions('admin'); +// Do not allow FAQ editor in DEMO mode +if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.'); + // Load the form $app->uses('tform_actions'); $app->tform_actions->onDelete(); diff --git a/interface/web/help/faq_edit.php b/interface/web/help/faq_edit.php index 397f5cccf4..e0f0380f8c 100644 --- a/interface/web/help/faq_edit.php +++ b/interface/web/help/faq_edit.php @@ -10,6 +10,9 @@ require_once '../../lib/app.inc.php'; // Check the module permissions and redirect if not allowed. $app->auth->check_module_permissions('admin'); +// Do not allow FAQ editor in DEMO mode +if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.'); + // Load the templating and form classes $app->uses('tpl,tform,tform_actions'); $app->load('tform_actions'); diff --git a/interface/web/help/faq_sections_delete.php b/interface/web/help/faq_sections_delete.php index 865071ff25..76ff1c75a1 100644 --- a/interface/web/help/faq_sections_delete.php +++ b/interface/web/help/faq_sections_delete.php @@ -11,6 +11,9 @@ require_once '../../lib/app.inc.php'; // Check module permissions $app->auth->check_module_permissions('admin'); +// Do not allow FAQ editor in DEMO mode +if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.'); + // Load the form $app->uses('tform_actions'); $app->tform_actions->onDelete(); diff --git a/interface/web/help/faq_sections_edit.php b/interface/web/help/faq_sections_edit.php index f146db8605..56b3c77487 100644 --- a/interface/web/help/faq_sections_edit.php +++ b/interface/web/help/faq_sections_edit.php @@ -10,6 +10,9 @@ require_once '../../lib/app.inc.php'; // Check the module permissions and redirect if not allowed. $app->auth->check_module_permissions('admin'); +// Do not allow FAQ editor in DEMO mode +if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.'); + // Load the templating and form classes $app->uses('tpl,tform,tform_actions'); $app->load('tform_actions'); diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index aba19df7a4..75e75c7f30 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -87,6 +87,10 @@ class monitor_tools { $mainver = $ver; } switch ($mainver){ + case "20.04": + $relname = "(Focal Fossa)"; + $distconfid = 'ubuntu2004'; + break; case "18.04": $relname = "(Bionic Beaver)"; $distconfid = 'ubuntu1804'; -- GitLab