From f201895b4af99673a95470e4715ee8afa80a4494 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 9 Nov 2006 19:30:10 +0000 Subject: [PATCH] r1278: We need the AS clause in editcomment.php to prevent SQL errors from occurring --- docs/changes.txt | 1 + editcomment.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 695fc33..f55d872 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -11,6 +11,7 @@ - Fixed a scrollpane bug in IE7 (http://www.bluestatic.org/bugs/showreport.php?bugid=48) - In the "My Controls" tab, change the name of the email and password fields to prevent autocomplete from working on them - Include the Gettext mimic functions into the installer so people without the PHP extension can install Bugdar (http://www.bluestatic.org/bugs/showreport.php?bugid=51) +- Fixed a SQL error that would occur when editing or deleting comments (http://www.bluestatic.org/bugs/showreport.php?bugid=52) 1.1.3 =============================== diff --git a/editcomment.php b/editcomment.php index 1a81a5b..37b9dab 100644 --- a/editcomment.php +++ b/editcomment.php @@ -2,7 +2,7 @@ /*=====================================================================*\ || ################################################################### || # Bugdar [#]version[#] -|| # Copyright ©2002-[#]year[#] Blue Static +|| # Copyright 2002-[#]year[#] Blue Static || # || # This program is free software; you can redistribute it and/or modify || # it under the terms of the GNU General Public License as published by @@ -73,7 +73,7 @@ if ($_POST['do'] == 'kill') { $lastgoodpublic = $db->query_first(" SELECT comment.* AS comment, user.displayname AS username - FROM " . TABLE_PREFIX . "comment + FROM " . TABLE_PREFIX . "comment AS comment LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = comment.userid) WHERE bugid = $bug[bugid] @@ -81,7 +81,7 @@ if ($_POST['do'] == 'kill') "); $lastgoodprivate = $db->query_first(" SELECT comment.* AS comment, user.displayname AS username - FROM " . TABLE_PREFIX . "comment + FROM " . TABLE_PREFIX . "comment AS comment LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = comment.userid) WHERE bugid = $bug[bugid] @@ -151,7 +151,7 @@ if ($_POST['do'] == 'update') $lastgood = $db->query_first(" SELECT comment.* AS comment, user.displayname AS username - FROM " . TABLE_PREFIX . "comment + FROM " . TABLE_PREFIX . "comment AS comment LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = comment.userid) WHERE bugid = $bug[bugid] -- 2.22.5