Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
000ee5d1
Commit
000ee5d1
authored
May 29, 2002
by
Kjartan
Browse files
- cleaning up the access checks in node.module.
- reverting a taxonomy patch that added $context checking to node/comments.
parent
9a4a9bef
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/comment.module
View file @
000ee5d1
...
...
@@ -145,11 +145,9 @@ function comment_edit($cid) {
}
function
comment_reply
(
$pid
,
$nid
)
{
global
$theme
,
$node
;
global
$theme
;
// we must provide a taxonomy context for user_access()
$context
->
nid
=
$nid
;
if
(
user_access
(
"access comments"
,
$context
))
{
if
(
user_access
(
"access comments"
))
{
if
(
$pid
)
{
$comment
=
db_fetch_object
(
db_query
(
"SELECT c.*, u.uid, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.cid = '%s'"
,
$pid
));
comment_view
(
$comment
,
t
(
"reply to this comment"
));
...
...
modules/comment/comment.module
View file @
000ee5d1
...
...
@@ -145,11 +145,9 @@ function comment_edit($cid) {
}
function
comment_reply
(
$pid
,
$nid
)
{
global
$theme
,
$node
;
global
$theme
;
// we must provide a taxonomy context for user_access()
$context
->
nid
=
$nid
;
if
(
user_access
(
"access comments"
,
$context
))
{
if
(
user_access
(
"access comments"
))
{
if
(
$pid
)
{
$comment
=
db_fetch_object
(
db_query
(
"SELECT c.*, u.uid, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.cid = '%s'"
,
$pid
));
comment_view
(
$comment
,
t
(
"reply to this comment"
));
...
...
modules/node.module
View file @
000ee5d1
...
...
@@ -1007,15 +1007,9 @@ function node_preview($node, $error = NULL) {
}
function
node_submit
(
$node
)
{
global
$theme
,
$user
,
$tid
;
if
(
!
user_access
(
"post content"
))
{
return
message_access
();
}
$context
->
tid
=
$tid
;
if
(
user_access
(
"post content"
,
$context
))
{
global
$user
,
$theme
;
if
(
user_access
(
"post content"
))
{
/*
** Fixup the node when required:
...
...
modules/node/node.module
View file @
000ee5d1
...
...
@@ -1007,15 +1007,9 @@ function node_preview($node, $error = NULL) {
}
function
node_submit
(
$node
)
{
global
$theme
,
$user
,
$tid
;
if
(
!
user_access
(
"post content"
))
{
return
message_access
();
}
$context
->
tid
=
$tid
;
if
(
user_access
(
"post content"
,
$context
))
{
global
$user
,
$theme
;
if
(
user_access
(
"post content"
))
{
/*
** Fixup the node when required:
...
...
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