From: endico%mozilla.org <> Date: Tue, 13 Mar 2001 06:35:50 +0000 (+0000) Subject: Checking in Jake's interim patches from bug 30694. Bugzilla was... X-Git-Tag: bugzilla-2.12~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9ad36979ee316009fe69972da97702ec14110ce;p=thirdparty%2Fbugzilla.git Checking in Jake's interim patches from bug 30694. Bugzilla was showing bug summaries to everyone, even if they didn't have permission to view the bug. Jake's quick solution is to not display the bug at all if it is in a group no matter who is viewing it. The correct solution would be display the summary if the viewer had the proper permissions. --- diff --git a/duplicates.cgi b/duplicates.cgi index c9c692ca3c..6bb4e20ab9 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -139,9 +139,10 @@ my $i = 0; foreach (@sortedcount) { my $id = $_; - SendSQL("SELECT component, bug_severity, op_sys, target_milestone, short_desc FROM " . - "bugs WHERE bug_id = $id"); - my ($component, $severity, $op_sys, $milestone, $summary) = FetchSQLData(); + SendSQL("SELECT component, bug_severity, op_sys, target_milestone, short_desc, groupset " . + " FROM bugs WHERE bug_id = $id"); + my ($component, $severity, $op_sys, $milestone, $summary, $groupset) = FetchSQLData(); + next unless $groupset == 0; $summary = html_quote($summary); print ""; print '
'; diff --git a/globals.pl b/globals.pl index 4ba85ed90b..d112b0c8fb 100644 --- a/globals.pl +++ b/globals.pl @@ -775,9 +775,9 @@ sub GetBugLink { PushGlobalSQLState(); # Get this bug's info from the SQL Database - SendSQL("select bugs.bug_status, resolution, short_desc + SendSQL("select bugs.bug_status, resolution, short_desc, groupset from bugs where bugs.bug_id = $bug_num"); - my ($bug_stat, $bug_res, $bug_desc) = (FetchSQLData()); + my ($bug_stat, $bug_res, $bug_desc, $bug_grp) = (FetchSQLData()); # Format the retrieved information into a link if ($bug_stat eq "UNCONFIRMED") { $link_return .= "" } @@ -786,7 +786,8 @@ sub GetBugLink { $link_text = value_quote($link_text); $link_return .= qq{$link_text}; + if ($bug_grp == 0) { $link_return .= " - $bug_desc" } + $link_return .= qq{">$link_text}; if ($bug_res ne "") { $link_return .= "" } if ($bug_stat eq "UNCONFIRMED") { $link_return .= ""} diff --git a/show_bug.cgi b/show_bug.cgi index 1dd1f88201..83baa42b50 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -47,9 +47,9 @@ if (!defined $::FORM{'id'} || $::FORM{'id'} !~ /^\s*\d+\s*$/) { GetVersionTable(); -SendSQL("select short_desc from bugs where bug_id = $::FORM{'id'}"); -my $summary = FetchOneColumn(); -if( $summary ) { +SendSQL("select short_desc, groupset from bugs where bug_id = $::FORM{'id'}"); +my ($summary, $groupset) = FetchSQLData(); +if( $summary && $groupset == 0) { $summary = html_quote($summary); PutHeader("Bug $::FORM{'id'} - $summary", "Bugzilla Bug $::FORM{'id'}", $summary ); }else {