зеркало из https://github.com/mozilla/pjs.git
Bug 333369: Allow for non-recursive directory queries, r=timeless
This commit is contained in:
Родитель
f1e91aa48b
Коммит
a045a5572e
|
@ -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) . ")";
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче