From 9c43e8fc7a192dfe768c76a539373915bddaa0aa Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 29 Jun 2001 22:08:57 +0000 Subject: Extremely large commit: - Fixed tiny quote problem in account.php. - Fixed tiny bug in comment.inc. - Fixed tiny bug in comment.module. - Fixed tiny bug in meta.module. - Simplified user_access() API. - Rewrote link system: still needs fine-tuning and testing so don't upgrade if you are running a production site. ;) Updated all modules and themes to reflect this change. All other themes and modules need updating too! --- includes/node.inc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'includes/node.inc') diff --git a/includes/node.inc b/includes/node.inc index affb44371..47a317547 100644 --- a/includes/node.inc +++ b/includes/node.inc @@ -236,20 +236,11 @@ function node_index($node) { function node_visible($node) { global $user, $status; - return ($node->status == $status[posted]) || ($node->status == $status[queued] && $user->id) || user_access($user, $node->type) || user_access($user, "add and edit nodes"); + return ($node->status == $status[posted]) || ($node->status == $status[queued] && $user->id) || user_access("administer nodes"); } function node_access($account, $node) { return strstr($node->moderate, $account->userid); } -function node_links(&$links, &$node, $main = 0) { - if ($main) { - if ($node->body) $_links[] = array("node.php?id=$node->nid", t("read more")); - if ($node->comment) $_links[] = array("node.php?id=$node->nid", format_plural(node_get_comments($node->nid), "comment", "comments")); - } - $links = ($links ? array_merge($_links, $links) : $_links); - return count($links) ? $links : 0; -} - ?> \ No newline at end of file -- cgit v1.2.3