Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
310
Merge Requests
310
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
2c2f33e6
Commit
2c2f33e6
authored
Oct 31, 2006
by
drumm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#90614
by asimmonds and hunmonk. Avoid linking to inaccessible admin pages.
parent
bda84648
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
modules/system/system.module
modules/system/system.module
+5
-3
No files found.
modules/system/system.module
View file @
2c2f33e6
...
...
@@ -393,7 +393,7 @@ function system_admin_menu_block($block) {
usort
(
$block
[
'children'
],
'_menu_sort'
);
foreach
(
$block
[
'children'
]
as
$mid
)
{
$item
=
menu_get_item
(
$mid
);
if
(
$item
[
'type'
]
&
MENU_VISIBLE_IN_TREE
)
{
if
(
(
$item
[
'type'
]
&
MENU_VISIBLE_IN_TREE
)
&&
_menu_item_is_accessible
(
$mid
)
)
{
$content
[]
=
$item
;
}
}
...
...
@@ -2204,7 +2204,9 @@ function theme_admin_block_content($content) {
*/
function
system_admin_by_module
()
{
$modules
=
module_rebuild_cache
();
$menu
=
menu_get_menu
();
$menu_items
=
array
();
$admin_access
=
user_access
(
'administer access control'
);
foreach
(
$modules
as
$file
)
{
$module
=
$file
->
name
;
if
(
$module
==
'help'
)
{
...
...
@@ -2213,7 +2215,7 @@ function system_admin_by_module() {
$admin_tasks
=
array
();
// Check for permissions.
if
(
module_hook
(
$module
,
'perm'
))
{
if
(
module_hook
(
$module
,
'perm'
)
&&
$admin_access
)
{
$admin_tasks
[
-
1
]
=
l
(
t
(
'Configure permissions'
),
'admin/user/access'
);
}
...
...
@@ -2222,7 +2224,7 @@ function system_admin_by_module() {
foreach
(
$items
as
$item
)
{
$parts
=
explode
(
'/'
,
$item
[
'path'
]);
$n
=
count
(
$parts
);
if
((
!
isset
(
$item
[
'type'
])
||
(
$item
[
'type'
]
&
MENU_VISIBLE_IN_TREE
))
&&
(
$parts
[
0
]
==
'admin'
)
&&
(
$n
>=
3
))
{
if
((
!
isset
(
$item
[
'type'
])
||
(
$item
[
'type'
]
&
MENU_VISIBLE_IN_TREE
))
&&
(
$parts
[
0
]
==
'admin'
)
&&
(
$n
>=
3
)
&&
_menu_item_is_accessible
(
$menu
[
'path index'
][
$item
[
'path'
]])
)
{
$admin_tasks
[
$item
[
'title'
]]
=
l
(
$item
[
'title'
],
$item
[
'path'
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment