summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/ULists.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-19 19:40:29 +0100
committerYorhel <git@yorhel.nl>2010-12-19 19:40:29 +0100
commit34e150d039b0a2421a0d0f489147cdcfbaed6bf0 (patch)
tree8e6377ef229a5851d4f99f2264dbdd6aec9b0dec /lib/VNDB/DB/ULists.pm
parentf69cf868466321ee3ef15948231978f784797bb0 (diff)
ULists::votelist: Added first character selection
Diffstat (limited to 'lib/VNDB/DB/ULists.pm')
-rw-r--r--lib/VNDB/DB/ULists.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VNDB/DB/ULists.pm b/lib/VNDB/DB/ULists.pm
index 934cfe84..27594a91 100644
--- a/lib/VNDB/DB/ULists.pm
+++ b/lib/VNDB/DB/ULists.pm
@@ -186,6 +186,12 @@ sub dbVoteGet {
$o{vid} ? ( 'n.vid = ?' => $o{vid} ) : (),
$o{hide} ? ( 'u.show_list = TRUE' => 1 ) : (),
$o{hide_ign} ? ( '(NOT u.ign_votes OR u.id = ?)' => $self->authInfo->{id}||0 ) : (),
+ $o{vn_char} ? ( 'LOWER(SUBSTR(vr.title, 1, 1)) = ?' => $o{vn_char} ) : (),
+ defined $o{vn_char} && !$o{vn_char} ? (
+ '(ASCII(vr.title) < 97 OR ASCII(vr.title) > 122) AND (ASCII(vr.title) < 65 OR ASCII(vr.title) > 90)' => 1 ) : (),
+ $o{user_char} ? ( 'LOWER(SUBSTR(u.username, 1, 1)) = ?' => $o{user_char} ) : (),
+ defined $o{user_char} && !$o{user_char} ? (
+ '(ASCII(u.username) < 97 OR ASCII(u.username) > 122) AND (ASCII(u.username) < 65 OR ASCII(u.username) > 90)' => 1 ) : (),
);
my @select = (