Skip to content

Commit 7f7d1d2

Browse files
author
Till Brehm
committed
Disable FAQ edit functionality in demo mode.
1 parent 77356ce commit 7f7d1d2

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

interface/web/help/faq_delete.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// Check module permissions
1212
$app->auth->check_module_permissions('admin');
1313

14+
// Do not allow FAQ editor in DEMO mode
15+
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
16+
1417
// Load the form
1518
$app->uses('tform_actions');
1619
$app->tform_actions->onDelete();

interface/web/help/faq_edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
// Check the module permissions and redirect if not allowed.
1111
$app->auth->check_module_permissions('admin');
1212

13+
// Do not allow FAQ editor in DEMO mode
14+
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
15+
1316
// Load the templating and form classes
1417
$app->uses('tpl,tform,tform_actions');
1518
$app->load('tform_actions');

interface/web/help/faq_sections_delete.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// Check module permissions
1212
$app->auth->check_module_permissions('admin');
1313

14+
// Do not allow FAQ editor in DEMO mode
15+
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
16+
1417
// Load the form
1518
$app->uses('tform_actions');
1619
$app->tform_actions->onDelete();

interface/web/help/faq_sections_edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
// Check the module permissions and redirect if not allowed.
1111
$app->auth->check_module_permissions('admin');
1212

13+
// Do not allow FAQ editor in DEMO mode
14+
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
15+
1316
// Load the templating and form classes
1417
$app->uses('tpl,tform,tform_actions');
1518
$app->load('tform_actions');

server/lib/classes/monitor_tools.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function get_distname() {
8787
$mainver = $ver;
8888
}
8989
switch ($mainver){
90+
case "20.04":
91+
$relname = "(Focal Fossa)";
92+
$distconfid = 'ubuntu2004';
93+
break;
9094
case "18.04":
9195
$relname = "(Bionic Beaver)";
9296
$distconfid = 'ubuntu1804';

0 commit comments

Comments
 (0)