summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-05-31 11:04:21 +0200
committerYorhel <git@yorhel.nl>2009-05-31 11:14:03 +0200
commit98e289f53ee3e2c6da7e03c9265c1781c2d5f9da (patch)
tree0fc378ec934177447d14bb964d8ccd0fd69421a0
parentb3df3d4432841ac57c4667ac008cec73522b892d (diff)
Correctly handle zero results and display friendly message on /r
-rw-r--r--lib/VNDB/Handler/Releases.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm
index 0390b40e..e816b080 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -494,7 +494,7 @@ sub browse {
$f->{fw} ? (freeware => $f->{fw}) : (),
$f->{do} ? (doujin => $f->{do}) : (),
);
- my($list, $np) = !@filters ? (undef, 0) : $self->dbReleaseGet(
+ my($list, $np) = !@filters ? ([], 0) : $self->dbReleaseGet(
order => $f->{s}.($f->{o}eq'd'?' DESC':' ASC'),
page => $f->{p},
results => 50,
@@ -509,7 +509,7 @@ sub browse {
$_&&($url .= ";me=$_") for @{$f->{me}};
$self->htmlHeader(title => 'Browse releases');
- _filters($self, $f, !@filters || !$list);
+ _filters($self, $f, !@filters || !@$list);
$self->htmlBrowse(
class => 'relbrowse',
items => $list,
@@ -541,7 +541,17 @@ sub browse {
end;
end;
},
- ) if $list;
+ ) if @$list;
+ if(@filters && !@$list) {
+ div class => 'mainbox';
+ h1 'No results found';
+ div class => 'notice';
+ p qq|Sorry, couldn't find anything that comes through your filters. You might want to disable a few filters to get more results.\n\n|
+ .qq|Also, keep in mind that we don't have all information about all releases. So e.g. filtering on screen resolution will exclude |
+ .qq|all releases of which we don't know it's resolution, even though it might in fact be in the resolution you're looking for.|;
+ end;
+ end;
+ }
$self->htmlFooter;
}