diff options
author | natrak <> | 2001-09-26 18:28:09 +0000 |
---|---|---|
committer | natrak <> | 2001-09-26 18:28:09 +0000 |
commit | b146513e07feec607030d078e53f1fa9f6d5e403 (patch) | |
tree | 8557678b2ed5fd2dc9910c954b33f1ecd911867f | |
parent | ff2ae1855d20c7a4a4f4ccc8d93d32cc0abb0d58 (diff) | |
download | brdo-b146513e07feec607030d078e53f1fa9f6d5e403.tar.gz brdo-b146513e07feec607030d078e53f1fa9f6d5e403.tar.bz2 |
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.
-rw-r--r-- | node.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) { |