diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-05-29 17:16:27 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-05-29 17:16:27 +0000 |
commit | 000ee5d162b36d5cb5c74ef452c96882e749c3a4 (patch) | |
tree | 0349a0105a11cf4d08785fea97ebdcd026646b01 | |
parent | 9a4a9befac732cc0810707126385fab46f09abdc (diff) | |
download | brdo-000ee5d162b36d5cb5c74ef452c96882e749c3a4.tar.gz brdo-000ee5d162b36d5cb5c74ef452c96882e749c3a4.tar.bz2 |
- cleaning up the access checks in node.module.
- reverting a taxonomy patch that added $context checking to node/comments.
-rw-r--r-- | modules/comment.module | 6 | ||||
-rw-r--r-- | modules/comment/comment.module | 6 | ||||
-rw-r--r-- | modules/node.module | 12 | ||||
-rw-r--r-- | modules/node/node.module | 12 |
4 files changed, 10 insertions, 26 deletions
diff --git a/modules/comment.module b/modules/comment.module index bd3e036d8..4fce79492 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -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")); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index bd3e036d8..4fce79492 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -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")); diff --git a/modules/node.module b/modules/node.module index e75660f55..cc9f63e98 100644 --- a/modules/node.module +++ b/modules/node.module @@ -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: diff --git a/modules/node/node.module b/modules/node/node.module index e75660f55..cc9f63e98 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -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: |