summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-19 19:27:48 +0100
committerYorhel <git@yorhel.nl>2010-12-19 19:27:48 +0100
commita1db0a213b9f1ea0d4d9f75e4014af6c156b493c (patch)
treeace0054d1984b5da6147ec0a7c0cc6b4f535ee86
parent720ab3e394547b1fa82b42fbefd36bb4abb81cb0 (diff)
ULists::votelist: Don't give a 404 on /u+/votes when no votes found
-rw-r--r--ChangeLog1
-rw-r--r--data/lang.txt7
-rw-r--r--lib/VNDB/Handler/ULists.pm5
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6eeddba7..eba2a414 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
- Don't allow NULL for rr.minage and use -1 for unknown
- Check for editsum = description and give an easier to understand error
- RFC-01: Added vnlists feature and removed rlists.vstat option
+ - ULists::votelist: Don't give a 404 on /u+/votes when no votes found
2.15 - 2010-12-15
- Removed expand/collapse from history browser and /u+/posts and switched to
diff --git a/data/lang.txt b/data/lang.txt
index 4d391fc1..6a74e0a1 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -4822,6 +4822,13 @@ cs*:
hu : Szavazatok [_1]-tól(től)
nl : Stemmen van [_1]
+:_votelist_novotes
+en : No votes to list. :-(
+ru*:
+cs*:
+hu*:
+nl : Geen stemmen om weer te geven. :-(
+
:_votelist_col_date
en : Cast
ru : Дата
diff --git a/lib/VNDB/Handler/ULists.pm b/lib/VNDB/Handler/ULists.pm
index d13c63cb..660ece00 100644
--- a/lib/VNDB/Handler/ULists.pm
+++ b/lib/VNDB/Handler/ULists.pm
@@ -134,16 +134,17 @@ sub votelist {
results => 50,
page => $f->{p}
);
- return 404 if !@$list;
+ return 404 if !@$list && $type eq 'v';
my $title = mt $type eq 'v' ? '_votelist_title_vn' : '_votelist_title_user', $obj->{title} || $obj->{username};
$self->htmlHeader(noindex => 1, title => $title);
$self->htmlMainTabs($type => $obj, 'votes');
div class => 'mainbox';
h1 $title;
+ p mt '_votelist_novotes' if !@$list;
end;
- $self->htmlBrowse(
+ @$list && $self->htmlBrowse(
class => 'votelist',
items => $list,
options => $f,