From a8df467feb6ec21afac4f4f6be24d2afc85b78ca Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 22 Jan 2001 20:39:49 +0000 Subject: - polished the code by removing some redundant checks --- story.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/story.php b/story.php index 3685cd26d..96cbb23cc 100644 --- a/story.php +++ b/story.php @@ -5,15 +5,10 @@ include "includes/common.inc"; function story_render($id, $cid) { global $theme, $user; - // Compose story query: $result = db_query("SELECT s.*, u.userid FROM stories s LEFT JOIN users u ON s.author = u.id WHERE s.status != 0 AND s.id = $id"); - - // Display story: - if ($story = db_fetch_object($result)) { - if ($story->status == 1) $theme->article($story, "[ hlcolor2\">submission queue | id&pid=0\">hlcolor2\">add a comment ]"); - else $theme->article($story, "[ hlcolor2\">home | id&pid=0\">hlcolor2\">add a comment ]"); - // Display comments: + if ($story = db_fetch_object($result)) { + $theme->article($story, "[ hlcolor2\">submission queue | id&pid=0\">hlcolor2\">add a comment ]"); comment_render($id, $cid); } else { -- cgit v1.2.3