diff options
Diffstat (limited to 'lib/VNDB/DB/VN.pm')
-rw-r--r-- | lib/VNDB/DB/VN.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm index 474066ce..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) ? ( @@ -107,7 +107,7 @@ sub dbVNGet { my $order = sprintf { id => 'id %s', - rel => 'c_released %s', + rel => 'c_released %s, title ASC', pop => 'c_popularity %s NULLS LAST', rating => 'c_rating %s NULLS LAST', title => 'title %s', |