summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Users.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-27 14:48:20 +0100
committerYorhel <git@yorhel.nl>2009-11-27 14:52:20 +0100
commit9613533da2c58af3c64e3bd4ed7b92b22ffd442f (patch)
tree425ee689a98a555638431f92d1bc76cbef22eedd /lib/VNDB/Handler/Users.pm
parent542c1e22daf2648b3babce2ab2050120eec0a9b9 (diff)
DB: Abstracted all ORDER BY clauses in the DB abstraction layer
The ORDER BY was previously specified using an 'order' argument, which would then be directly inserted into the query. The new method is the same as what I used for the public API: two 'sort' and 'reverse' arguments. This should be less error-prone and more readable. This changes quite a lot of code, so I hope I haven't forgotten to update something along the way.
Diffstat (limited to 'lib/VNDB/Handler/Users.pm')
-rw-r--r--lib/VNDB/Handler/Users.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm
index fbbbfc5d..e9c97198 100644
--- a/lib/VNDB/Handler/Users.pm
+++ b/lib/VNDB/Handler/Users.pm
@@ -474,7 +474,7 @@ sub list {
end;
my($list, $np) = $self->dbUserGet(
- order => ($f->{s} eq 'changes' || $f->{s} eq 'tags' ? 'c_' : $f->{s} eq 'votes' ? 'NOT show_list, c_' : '').$f->{s}.($f->{o} eq 'a' ? ' ASC' : ' DESC'),
+ sort => $f->{s}, reverse => $f->{o} eq 'd',
$char ne 'all' ? (
firstchar => $char ) : (),
results => 50,