summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-02-06 17:01:05 +0100
committerYorhel <git@yorhel.nl>2011-02-06 17:01:05 +0100
commitb53d0e8f54ca7e4cc397bb68638a19099f1cb160 (patch)
tree4af99c1d9054dd777ce1840643609b364a2c5213
parente59b9670b930b4a16d3c8e512d1d195c81151730 (diff)
Added new VN filter: on user VN list or not
-rw-r--r--ChangeLog2
-rw-r--r--data/lang.txt21
-rw-r--r--data/script.js3
-rw-r--r--lib/VNDB/DB/VN.pm2
-rw-r--r--lib/VNDB/Util/Misc.pm2
5 files changed, 27 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 16d4fcd8..2fa4628b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,7 +3,7 @@
- Group tags on /v+/tagmod by their category
- Added tag visibility options by category on /v+
- Added filter selector to tag pages (excl. tags tab)
- - Added new VN filters: wish/blacklist, voted
+ - Added new VN filters: wish/blacklist, voted, on VN list
2.17 - 2011-02-04
- Allow moderators to overrule VN tag votes
diff --git a/data/lang.txt b/data/lang.txt
index 062cd375..f69ccfdf 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -6037,6 +6037,27 @@ cs*:
hu*:
nl : Op gestemd
+:_vnbrowse_ul_onlist
+en : VN list
+ru*:
+cs*:
+hu*:
+nl : VN lijst
+
+:_vnbrowse_ul_onlistno
+en : Not on my VN list
+ru*:
+cs*:
+hu*:
+nl : Niet op mijn VN lijst
+
+:_vnbrowse_ul_onlistyes
+en : On my VN list
+ru*:
+cs*:
+hu*:
+nl : Op mijn VN lijst
+
# VN add/edit form (/v+/edit)
diff --git a/data/script.js b/data/script.js
index 9de9eb68..45c42162 100644
--- a/data/script.js
+++ b/data/script.js
@@ -2210,7 +2210,8 @@ function filVN() {
mt('_vnbrowse_ul'),
filFOptions('ul_notblack', mt('_vnbrowse_ul_notblack'), [[1, mt('_vnbrowse_ul_notblackmsg')]]),
filFOptions('ul_onwish', mt('_vnbrowse_ul_onwish'), [[0, mt('_vnbrowse_ul_onwishno')],[1, mt('_vnbrowse_ul_onwishyes')]]),
- filFOptions('ul_voted', mt('_vnbrowse_ul_voted'), [[0, mt('_vnbrowse_ul_votedno')],[1, mt('_vnbrowse_ul_votedyes')]])
+ filFOptions('ul_voted', mt('_vnbrowse_ul_voted'), [[0, mt('_vnbrowse_ul_votedno')], [1, mt('_vnbrowse_ul_votedyes') ]]),
+ filFOptions('ul_onlist', mt('_vnbrowse_ul_onlist'), [[0, mt('_vnbrowse_ul_onlistno')],[1, mt('_vnbrowse_ul_onlistyes')]])
],
];
}
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index bb8611b1..0f6c5731 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -63,6 +63,8 @@ sub dbVNGet {
'v.id !s IN(SELECT vid FROM wlists WHERE uid = ?)' => [ $o{ul_onwish} ? '' : 'NOT', $uid ] ) : (),
$uid && defined $o{ul_voted} ? (
'v.id !s IN(SELECT vid FROM votes WHERE uid = ?)' => [ $o{ul_voted} ? '' : 'NOT', $uid ] ) : (),
+ $uid && defined $o{ul_onlist} ? (
+ 'v.id !s IN(SELECT vid FROM vnlists WHERE uid = ?)' => [ $o{ul_onlist} ? '' : 'NOT', $uid ] ) : (),
# don't fetch hidden items unless we ask for an ID
!$o{id} && !$o{rev} ? (
'v.hidden = FALSE' => 0 ) : (),
diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm
index 9a056b8a..5406fe06 100644
--- a/lib/VNDB/Util/Misc.pm
+++ b/lib/VNDB/Util/Misc.pm
@@ -11,7 +11,7 @@ our @EXPORT = qw|filFetchDB ieCheck|;
my %filfields = (
- vn => [qw|length hasani tag_inc tag_exc taginc tagexc tagspoil lang olang plat ul_notblack ul_onwish ul_voted|],
+ vn => [qw|length hasani tag_inc tag_exc taginc tagexc tagspoil lang olang plat ul_notblack ul_onwish ul_voted ul_onlist|],
release => [qw|type patch freeware doujin date_before date_after released minage lang olang resolution plat med voiced ani_story ani_ero|],
);