From: gerv%gerv.net <> Date: Mon, 22 Jul 2002 04:47:43 +0000 (+0000) Subject: Bug 95426 - remove $onebug cruft. Patch by gerv; 2xr=timeless. X-Git-Tag: bugzilla-2.17.1~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78b4d31f05fb0140d657e30cbce376009678119b;p=thirdparty%2Fbugzilla.git Bug 95426 - remove $onebug cruft. Patch by gerv; 2xr=timeless. --- diff --git a/editkeywords.cgi b/editkeywords.cgi index 51294206dc..1b8d6ef307 100755 --- a/editkeywords.cgi +++ b/editkeywords.cgi @@ -141,22 +141,14 @@ if ($action eq "") { my $max_table_size = 50; SendSQL("SELECT keyworddefs.id, keyworddefs.name, keyworddefs.description, - COUNT(keywords.bug_id), keywords.bug_id + COUNT(keywords.bug_id) FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id = keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { - my ($id, $name, $description, $bugs, $onebug) = FetchSQLData(); + my ($id, $name, $description, $bugs) = FetchSQLData(); $description ||= "missing"; $bugs ||= 'none'; - if (!$onebug) { - # This is silly hackery for old versions of MySQL that seem to - # return a count() of 1 even if there are no matching. So, we - # ask for an actual bug number. If it can't find any bugs that - # match the keyword, then we set the count to be zero, ignoring - # what it had responded. - $bugs = 'none'; - } if ($line_count == $max_table_size) { print "\n$tableheader"; $line_count = 0; diff --git a/queryhelp.cgi b/queryhelp.cgi index 48a4e08552..89db7b5cb3 100755 --- a/queryhelp.cgi +++ b/queryhelp.cgi @@ -575,19 +575,14 @@ my $line_count = 0; my $max_table_size = 50; SendSQL("SELECT keyworddefs.name, keyworddefs.description, - COUNT(keywords.bug_id), keywords.bug_id + COUNT(keywords.bug_id) FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { - my ($name, $description, $bugs, $onebug) = FetchSQLData(); - if ($bugs && $onebug) { - # This 'onebug' stuff is silly hackery for old versions of - # MySQL that seem to return a count() of 1 even if there are - # no matching. So, we ask for an actual bug number. If it - # can't find any bugs that match the keyword, then we set the - # count to be zero, ignoring what it had responded. + my ($name, $description, $bugs) = FetchSQLData(); + if ($bugs) { my $q = url_quote($name); $bugs = qq{$bugs}; } else {