Merge pull request #780 from knl/remove-dead-method

Remove dead method from Nix.pm
This commit is contained in:
Eelco Dolstra 2020-06-05 17:21:15 +02:00 committed by GitHub
commit c0b4686b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,27 +93,6 @@ sub registerRoot {
} }
sub attrsToSQL {
my ($attrs, $id) = @_;
my @attrs = split / /, $attrs;
my $query = "1 = 1";
foreach my $attr (@attrs) {
$attr =~ /^([\w-]+)=([\w-]*)$/ or die "invalid attribute in view: $attr";
my $name = $1;
my $value = $2;
# !!! Yes, this is horribly injection-prone... (though
# name/value are filtered above). Should use SQL::Abstract,
# but it can't deal with subqueries. At least we should use
# placeholders.
$query .= " and exists (select 1 from buildinputs where build = $id and name = '$name' and value = '$value')";
}
return $query;
}
sub jobsetOverview_ { sub jobsetOverview_ {
my ($c, $jobsets) = @_; my ($c, $jobsets) = @_;
return $jobsets->search({}, return $jobsets->search({},