r1278: We need the AS clause in editcomment.php to prevent SQL errors from
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 9 Nov 2006 19:30:10 +0000 (19:30 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 9 Nov 2006 19:30:10 +0000 (19:30 +0000)
occurring

docs/changes.txt
editcomment.php

index 695fc334d08f7b3303d44f11eee5cfc3a55362dd..f55d872809d622f5ceb87303cc680526a8d62084 100644 (file)
@@ -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
 ===============================
index 1a81a5bdaeca6c43cba938bfd2d1db952ae28819..37b9daba1c86e43694893f326d9fac435625dd79 100644 (file)
@@ -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]