summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNBrowse.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-02-03 17:12:47 +0100
committerYorhel <git@yorhel.nl>2011-02-03 17:12:47 +0100
commit7ef623807ff91258743db4d6555150fd38968eea (patch)
tree8e0739ded82d61b40333998e262a8c9e3511af86 /lib/VNDB/Handler/VNBrowse.pm
parent5d7fe06be6a167109b068605e9a60e3cfdfcb8ca (diff)
Cleaner and more efficient method of checking for the &fil= param
With the new TUWF, kv_validate() returns undef when the param isn't present and an empty string if it is, but left empty. This is a more efficient way to differentiate between empty and nonexistent than the previous YAWF-method of grepping all param names.
Diffstat (limited to 'lib/VNDB/Handler/VNBrowse.pm')
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index be3f4d84..97dc4e69 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -21,11 +21,11 @@ sub list {
{ get => 'p', required => 0, default => 1, template => 'int' },
{ get => 'q', required => 0, default => '' },
{ get => 'sq', required => 0, default => '' },
- { get => 'fil',required => 0, default => '' },
+ { get => 'fil',required => 0 },
);
return $self->resNotFound if $f->{_err};
$f->{q} ||= $f->{sq};
- $f->{fil} = $self->authPref('filter_vn') if !grep $_ eq 'fil', $self->reqParam();
+ $f->{fil} //= $self->authPref('filter_vn');
my %compat = _fil_compat($self);
return $self->resRedirect('/'.$1.$2.(!$3 ? '' : $1 eq 'd' ? '#'.$3 : '.'.$3), 'temp')