mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 333369: Allow for non-recursive directory queries, r=timeless
This commit is contained in:
parent
f9a8a7c8e2
commit
2bca36fe33
@ -33,6 +33,7 @@ sub sillyness {
|
||||
$zz = $::lines_removed;
|
||||
$zz = $::query_begin_tag;
|
||||
$zz = $::query_branchtype;
|
||||
$zz = $::query_dirtype;
|
||||
$zz = $::query_date_max;
|
||||
$zz = $::query_debug;
|
||||
$zz = $::query_end_tag;
|
||||
@ -181,6 +182,8 @@ $::query_branch = $::FORM{'branch'};
|
||||
$::query_branch = 'HEAD' if !defined($::query_branch);
|
||||
$::query_branch = &SanitizeRevision($::query_branch);
|
||||
$::query_branchtype = &ExpectMatchtype($::FORM{'branchtype'});
|
||||
$::query_dirtype = $::FORM{'dirtype'};
|
||||
$::query_dirtype = 'recurse' if !defined ($::query_dirtype);
|
||||
|
||||
if ($::query_branch eq 'HEAD' && $::query_branchtype ne 'notregexp') {
|
||||
$::query_branch_head = 1 ;
|
||||
|
@ -169,8 +169,14 @@ sub query_checkins {
|
||||
if (0 < @::query_dirs) {
|
||||
my @list;
|
||||
foreach my $i (@::query_dirs) {
|
||||
push(@list, "dirs.dir LIKE ?");
|
||||
push(@bind_values, "$i%");
|
||||
if ($::query_dirtype eq 'recurse') {
|
||||
push(@list, "dirs.dir LIKE ?");
|
||||
push(@bind_values, "$i%");
|
||||
}
|
||||
else {
|
||||
push(@list, "dirs.dir = ?");
|
||||
push(@bind_values, "$i");
|
||||
}
|
||||
}
|
||||
$qstring .= "AND (" . join(" OR ", @list) . ")";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user