Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c9feee50
Commit
c9feee50
authored
May 29, 2002
by
Kjartan Mannes
Browse files
- added missing access check for links
parent
000ee5d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/page.module
View file @
c9feee50
...
...
@@ -58,7 +58,7 @@ function page_load($node) {
}
function
page_link
(
$type
)
{
if
(
$type
==
"page"
)
{
if
(
$type
==
"page"
&&
user_access
(
"access content"
)
)
{
$result
=
db_query
(
"SELECT n.nid, p.link FROM page p LEFT JOIN node n ON p.nid = n.nid WHERE n.status = '1' AND p.link != '' ORDER BY p.link"
);
while
(
$page
=
db_fetch_object
(
$result
))
{
$links
[]
=
l
(
$page
->
link
,
array
(
"id"
=>
$page
->
nid
));
...
...
modules/page/page.module
View file @
c9feee50
...
...
@@ -58,7 +58,7 @@ function page_load($node) {
}
function
page_link
(
$type
)
{
if
(
$type
==
"page"
)
{
if
(
$type
==
"page"
&&
user_access
(
"access content"
)
)
{
$result
=
db_query
(
"SELECT n.nid, p.link FROM page p LEFT JOIN node n ON p.nid = n.nid WHERE n.status = '1' AND p.link != '' ORDER BY p.link"
);
while
(
$page
=
db_fetch_object
(
$result
))
{
$links
[]
=
l
(
$page
->
link
,
array
(
"id"
=>
$page
->
nid
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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