summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNBrowse.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-11-30 15:00:41 +0100
committerYorhel <git@yorhel.nl>2008-11-30 15:00:41 +0100
commit3f747b5fce24fad0635be727c431e1fb234c3fa6 (patch)
tree0e9e9baf1af0daa103a3b83e82c9113831976865 /lib/VNDB/Handler/VNBrowse.pm
parent29a452e94a5b5a2aabf7d3502c8423deb786dbcb (diff)
Searchbox
It's not the nicest placing for a search box, but I couldn't think of anything else...
Diffstat (limited to 'lib/VNDB/Handler/VNBrowse.pm')
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index 2855a39c..410e5de4 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -20,8 +20,10 @@ sub list {
{ name => 'o', required => 0, default => 'a', enum => [ 'a','d' ] },
{ name => 'p', required => 0, default => 1, template => 'int' },
{ name => 'q', required => 0, default => '' },
+ { name => 'sq', required => 0, default => '' },
);
return 404 if $f->{_err};
+ $f->{q} ||= $f->{sq};
# NOTE: this entire search thingy can also be done using a PgSQL fulltext search,
# which is faster and requires less code. It does require an extra database
@@ -69,7 +71,7 @@ sub list {
$self->resRedirect('/v'.$list->[0]{id}, 'temp')
if $q && @$list == 1;
- $self->htmlHeader(title => 'Browse visual novels');
+ $self->htmlHeader(title => 'Browse visual novels', search => $f->{q});
div class => 'mainbox';
h1 'Browse visual novels';