From 23ca7a2d8832aa16107cf7002c35170ae2b87a1c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 1 Nov 2001 17:04:20 +0000 Subject: - Another batch of updates/improvements: + introduced basic node permissions ("create", "delete", "update" and "view") at the node level: it's up to the "<$node->type>_module" to hide gory details (if any). + made the "blog it"-feature in the blog and import module work with the new node system, in specific with the new centralized forms. + made it possible to update blogs. + made the page module work with the new node system. + various smaller improvements. --- node.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'node.php') diff --git a/node.php b/node.php index 161d7465b..12b052381 100644 --- a/node.php +++ b/node.php @@ -71,7 +71,7 @@ function node_render($node) { function node_failure() { global $theme; $theme->header(); - $theme->box(t("Not found"), t("The node you are looking for does not exist yet or is no longer accessible.") ."\n"); + $theme->box(t("Not found"), t("The node you are looking for does no longer exist or is not accessible without the proper access rights.") ."\n"); $theme->footer(); } @@ -82,7 +82,7 @@ if ($number > 1) { $result = db_query("SELECT n.*, u.name, u.uid FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.title = '$title' AND n.status = 1 ORDER BY created DESC"); while ($node = db_fetch_object($result)) { - if (node_access($node)) { + if (node_access("view", $node)) { $output .= "

nid\">". check_output($node->title) ."
$node->type - ". format_name($node) ." - ". format_date($node->ccreated, "small") ."

"; } } @@ -93,7 +93,7 @@ if ($number > 1) { } elseif ($number) { $node = ($title ? node_load(array("title" => $title, "status" => 1)) : node_load(array("nid" => ($edit[id] ? $edit[id] : $id)))); - if ($node && node_access($node)) { + if (node_access("view", $node)) { node_render($node); } else { -- cgit v1.2.3