- cleaning up the access checks in node.module.
- reverting a taxonomy patch that added $context checking to node/comments.4.0.x
parent
9a4a9befac
commit
000ee5d162
|
@ -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"));
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue