From: garvinhicking <garvinhicking>
Date: Tue, 16 Aug 2005 15:18:43 +0000 (+0000)
Subject: Correct SQL query, thanks to Karotte.
X-Git-Tag: 0.9~205
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8da8a495ec5db826c8309bdd54cf75f80df41633;p=s9y.git

Correct SQL query, thanks to Karotte.
---

diff --git a/index.php b/index.php
index 60f6008..96fc6da 100644
--- a/index.php
+++ b/index.php
@@ -218,7 +218,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     $_GET['serendipity']['action'] = 'read';
     $_GET['serendipity']['id']     = $id;
 
-    $title = serendipity_db_query("SELECT title FROM {$serendipity['dbPrefix']}entries WHERE id=$id WHERE e.isdraft = 'false' " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp <= " . time() : ''), true);
+    $title = serendipity_db_query("SELECT title FROM {$serendipity['dbPrefix']}entries WHERE id=$id AND isdraft = 'false' " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND timestamp <= " . time() : ''), true);
     if (is_array($title)) {
         $serendipity['head_title']    = $title[0];
         $serendipity['head_subtitle'] = $serendipity['blogTitle'];