diff options
author | terry%mozilla.org <> | 2000-01-31 04:21:42 +0100 |
---|---|---|
committer | terry%mozilla.org <> | 2000-01-31 04:21:42 +0100 |
commit | 2966b6c086d892599d3640f3f91b0bc794986e82 (patch) | |
tree | 535122fa3bb751bb6d25f507f985d12fb76388d9 /buglist.cgi | |
parent | 475f0ceac00b78df21120ced11322f287abe78bb (diff) | |
download | bugzilla-2966b6c086d892599d3640f3f91b0bc794986e82.tar.gz bugzilla-2966b6c086d892599d3640f3f91b0bc794986e82.tar.xz |
Allow searching of attachment stuff using boolean charts.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/buglist.cgi b/buglist.cgi index 3bc6a036d..4c0505bc3 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -368,6 +368,34 @@ sub GenerateSQL { push(@wherepart, "$table.bug_id = bugs.bug_id"); $f = "$table.thetext"; }, + "^attachments\..*," => sub { + my $table = "attachments_$chartid"; + push(@supptables, "LEFT JOIN attachments $table ON bugs.bug_id = $table.bug_id"); + $f =~ m/^attachments\.(.*)$/; + my $field = $1; + if ($t eq "changedby") { + $v = DBNameToIdAndCheck($v); + $q = SqlQuote($v); + $field = "submitter_id"; + $t = "equals"; + } elsif ($t eq "changedbefore") { + $v = SqlifyDate($v); + $q = SqlQuote($v); + $field = "creation_ts"; + $t = "lessthan"; + } elsif ($t eq "changedafter") { + $v = SqlifyDate($v); + $q = SqlQuote($v); + $field = "creation_ts"; + $t = "greaterthan"; + } + if ($field eq "ispatch") { + if ($v ne "0" && $v ne "1") { + return Error("The only legal values for the 'Attachment is patch' field is 0 or 1."); + } + } + $f = "$table.$field"; + }, "^changedin," => sub { $f = "(to_days(now()) - to_days(bugs.delta_ts))"; }, @@ -826,7 +854,6 @@ query. You will have to start over at the <A HREF="query.cgi">query page</A>. exit; } my @list = split(/:/, $::COOKIE{'BUGLIST'}); - $::MFORM{'bug_id'} = \@list; $::FORM{'bug_id'} = join(',', @list); if (!$::FORM{'order'}) { $::FORM{'order'} = 'reuse last sort'; |