summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/ULists.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-19 17:27:27 +0100
committerYorhel <git@yorhel.nl>2010-12-19 17:27:27 +0100
commit71e0366b287e99a8b6ad2d9aaf7234a2bb707795 (patch)
tree707944c2a7c4f775410947805a9355c24d251245 /lib/VNDB/Handler/ULists.pm
parent6cf3b2a6f7cd3fb12282e823f42a64bcdf57d012 (diff)
RFC-01: Fixed release list selection thing on release pages
Diffstat (limited to 'lib/VNDB/Handler/ULists.pm')
-rw-r--r--lib/VNDB/Handler/ULists.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/VNDB/Handler/ULists.pm b/lib/VNDB/Handler/ULists.pm
index cac1acec..3bcf7b00 100644
--- a/lib/VNDB/Handler/ULists.pm
+++ b/lib/VNDB/Handler/ULists.pm
@@ -73,21 +73,18 @@ sub rlist {
return if !$self->authCheckCode;
my $f = $self->formValidate(
- { name => 'e', required => 1, enum => [ 'del', map("r$_", @{$self->{rlst_rstat}}), map("v$_", @{$self->{rlst_vstat}}) ] },
+ { name => 'e', required => 1, enum => [ -1, @{$self->{rlst_rstat}} ] }
);
return 404 if $f->{_err};
- $self->dbVNListDel($uid, $rid) if $f->{e} eq 'del';
- $self->dbVNListAdd(
- rid => $rid,
- uid => $uid,
- $f->{e} =~ /^([rv])(\d+)$/ && $1 eq 'r' ? (rstat => $2) : (vstat => $2)
- ) if $f->{e} ne 'del';
+ $self->dbRListDel($uid, $rid) if $f->{e} == -1;
+ $self->dbRListAdd($uid, $rid, $f->{e}) if $f->{e} >= 0;
if($id) {
(my $ref = $self->reqHeader('Referer')||"/r$id") =~ s/^\Q$self->{url}//;
$self->resRedirect($ref, 'temp');
} else {
+ # TODO: FIX
$self->resHeader('Content-type' => 'text/xml');
my $st = $self->dbVNListGet(uid => $self->authInfo->{id}, rid => [$rid])->[0];
xml;