From f7e9bab197205e6fa0d2e220902f5eb6573ac1cb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 2 Oct 2001 21:33:10 +0000 Subject: - tidied up some "$status"-es and removed "$rstatus". --- node.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'node.php') diff --git a/node.php b/node.php index 6b3d1ffc2..ac56fafe5 100644 --- a/node.php +++ b/node.php @@ -76,8 +76,7 @@ function node_failure() { } function node_history($node) { - global $status; - if ($node->status == $status[expired] || $node->status == $status[posted]) { + if ($node->status == node_status("expired") || $node->status == node_status("posted")) { $output .= "
". format_date($node->timestamp) ." by ". format_name($node) .":
". check_output($node->log, 1) ."

"; } if ($node->pid) { @@ -86,10 +85,10 @@ function node_history($node) { return $output; } -$number = ($title ? db_num_rows(db_query("SELECT nid FROM node WHERE title = '$title' AND status = $status[posted]")) : 1); +$number = ($title ? db_num_rows(db_query("SELECT nid FROM node WHERE title = '$title' AND status = '". node_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' AND n.status = $status[posted] ORDER BY timestamp DESC"); + $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 = '". node_status("posted") ."' ORDER BY timestamp DESC"); while ($node = db_fetch_object($result)) { if (node_access($node)) { -- cgit v1.2.3