Skip to content

Commit f318b9b

Browse files
author
thom
committed
Make help messages menu hideable (#5829)
1 parent 46050ef commit f318b9b

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

install/tpl/system.ini.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
[client]
66

7+
[help]
8+
show_support_messages=n
9+
710
[dns]
811

912
[mail]

interface/web/help/lib/module.conf.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,30 @@
2525

2626

2727
//*** Menu Definition *****************************************
28+
// read web config
29+
$app->uses('getconf');
30+
$global_config = $app->getconf->get_global_config('help');
31+
if($global_config['show_support_messages'] == 'y') {
32+
//* make sure that the items array is empty
33+
$items = array();
2834

29-
//* make sure that the items array is empty
30-
$items = array();
31-
32-
//* Add a menu item with the label 'Send message'
33-
$items[] = array( 'title' => 'Send message',
35+
//* Add a menu item with the label 'Send message'
36+
$items[] = array( 'title' => 'Send message',
3437
'target' => 'content',
3538
'link' => 'help/support_message_edit.php',
3639
'html_id' => 'help_message_send');
3740

38-
//* Add a menu item with the label 'View messages'
39-
$items[] = array( 'title' => 'View messages',
41+
//* Add a menu item with the label 'View messages'
42+
$items[] = array( 'title' => 'View messages',
4043
'target' => 'content',
4144
'link' => 'help/support_message_list.php',
4245
'html_id' => 'help_message_list');
4346

44-
45-
//* Add the menu items defined above to a menu section labeled 'Support'
46-
$module['nav'][] = array( 'title' => 'Support',
47+
//* Add the menu items defined above to a menu section labeled 'Support'
48+
$module['nav'][] = array( 'title' => 'Support',
4749
'open' => 1,
4850
'items' => $items);
51+
}
4952

5053
//* the FAQ menu section
5154
$itemsfaq = array();

0 commit comments

Comments
 (0)