summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/VN.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-12-29 16:05:31 +0100
committerYorhel <git@yorhel.nl>2011-12-29 16:05:31 +0100
commitce33c5933d9e83699fa0791d4dae72208d528953 (patch)
treef64d0b35279ad53639e523c3e559efea4675099b /lib/VNDB/DB/VN.pm
parent019f1424945aff4545c3a5083fb6330a942f4a3b (diff)
Added duplicate check when adding VNs
Diffstat (limited to 'lib/VNDB/DB/VN.pm')
-rw-r--r--lib/VNDB/DB/VN.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 1b738ab4..473fa92c 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -11,7 +11,7 @@ our @EXPORT = qw|dbVNGet dbVNRevisionInsert dbVNImageId dbScreenshotAdd dbScreen
# Options: id, rev, char, search, length, lang, olang, plat, tag_inc, tag_exc, tagspoil,
-# hasani, hasshot, ul_notblack, ul_onwish, results, page, what, sort, reverse
+# hasani, hasshot, ul_notblack, ul_onwish, results, page, what, sort, reverse, inc_hidden
# What: extended anime relations screenshots relgraph rating ranking changes
# Sort: id rel pop rating title tagscore rand
sub dbVNGet {
@@ -66,7 +66,7 @@ sub dbVNGet {
$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} ? (
+ !$o{id} && !$o{rev} && !$o{inc_hidden} ? (
'v.hidden = FALSE' => 0 ) : (),
# optimize fetching random entries (only when there are no other filters present, otherwise this won't work well)
$o{sort} eq 'rand' && $o{results} <= 10 && !grep(!/^(?:results|page|what|sort|tagspoil)$/, keys %o) ? (