Bug 333040: Cannot search based on "Attachment Creator" - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk

git-svn-id: svn://10.0.0.236/trunk@211956 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com
2006-09-18 20:20:11 +00:00
parent f27f88e2e1
commit e6b474924b
2 changed files with 15 additions and 0 deletions

View File

@@ -818,6 +818,20 @@ sub init {
"ON $dtable.id = $atable.attach_id");
$f = "$dtable.thedata";
},
"^attachments\.submitter," => sub {
my $atable = "map_attachment_submitter_$chartid";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
&& !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $atable.isprivate = 0";
}
push(@supptables, "INNER JOIN attachments AS $atable " .
"ON bugs.bug_id = $atable.bug_id $extra");
push(@supptables, "LEFT JOIN profiles AS attachers_$chartid " .
"ON $atable.submitter_id = attachers_$chartid.userid");
$f = "attachers_$chartid.login_name";
},
"^attachments\..*," => sub {
my $table = "attachments_$chartid";
my $extra = "";