From b146513e07feec607030d078e53f1fa9f6d5e403 Mon Sep 17 00:00:00 2001 From: natrak <> Date: Wed, 26 Sep 2001 18:28:09 +0000 Subject: Bug fixes mostly - fixed book.module not generating next/prev links properly - re-added default node options to the admin page - fixed a potential bug in node.php. Nodes with same titles were confusing it at times, should fix the bug reported by Gerhard Killesreiter. --- node.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'node.php') diff --git a/node.php b/node.php index bb195ce2f..fa066e6b8 100644 --- a/node.php +++ b/node.php @@ -85,10 +85,10 @@ function node_history($node) { return $output; } -$number = ($title ? db_result(db_query("SELECT COUNT(nid) FROM node WHERE title = '$title' AND status = $status[posted]")) : 1); +$number = ($title ? db_num_row(db_query("SELECT nid FROM node WHERE title = '$title' AND status = $status[posted]")) : 1); if ($number > 1) { - $result = db_query("SELECT n.*, u.name, u.uid FROM node n LEFT JOIN user u ON n.author = u.uid WHERE n.title = '$title'"); + $result = db_query("SELECT n.*, u.name, u.uid FROM node n LEFT JOIN user u ON n.author = u.uid WHERE n.title = '$title' AND n.status = $status[posted] ORDER BY timestamp DESC"); while ($node = db_fetch_object($result)) { if (node_access($node)) { -- cgit v1.2.3