-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
default_disabled.php
74 lines (63 loc) · 1.74 KB
/
default_disabled.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_menu
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Site SubMenu
*/
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_SYSTEM'), null, 'disabled'));
/**
* Users Submenu
*/
if ($user->authorise('core.manage', 'com_users'))
{
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COM_USERS'), null, 'disabled'));
}
/**
* Menus Submenu
*/
if ($user->authorise('core.manage', 'com_menus'))
{
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_MENUS'), null, 'disabled'));
}
/**
* Content Submenu
*/
if ($user->authorise('core.manage', 'com_content'))
{
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COM_CONTENT'), null, 'disabled'));
}
/**
* Components Submenu
*/
// Get the authorised components and sub-menus.
$components = ModMenuHelper::getComponents(true);
// Check if there are any components, otherwise, don't display the components menu item
if ($components)
{
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COMPONENTS'), null, 'disabled'));
}
/**
* Extensions Submenu
*/
$im = $user->authorise('core.manage', 'com_installer');
$mm = $user->authorise('core.manage', 'com_modules');
$pm = $user->authorise('core.manage', 'com_plugins');
$tm = $user->authorise('core.manage', 'com_templates');
$lm = $user->authorise('core.manage', 'com_languages');
if ($im || $mm || $pm || $tm || $lm)
{
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_EXTENSIONS'), null, 'disabled'));
}
/**
* Help Submenu
*/
if ($params->get('showhelp', 1))
{
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_HELP'), null, 'disabled'));
}