summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-02 18:58:04 +0100
committerYorhel <git@yorhel.nl>2011-01-02 18:58:04 +0100
commit7886f2d51173102e544794c2f8c1ef2702a74c48 (patch)
treee7cdaca6e5ace5b497b91ef4b7103481977b5ce5
parenteda527b4f5c73447b1100055b7e6ac3fa10225ab (diff)
Bugfix: Don't show NSFW screenshots on homepage with filters
-rw-r--r--ChangeLog1
-rw-r--r--lib/VNDB/DB/VN.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ab7363b4..c0de3767 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2.17 - ?
- Fixed perl warning on /u+/votes batchedit with nothing selected
- Bugfix: Correctly randomize screenshots on homepage with filters
+ - Bugfix: Don't show NSFW screenshots on homepage with filters
2.16 - 2011-01-02
- VNDBUtil::bb2html(): Fixed bug when the string starts with a VNDBID
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 2a7f2477..b506d94d 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -252,7 +252,7 @@ sub dbScreenshotRandom {
SELECT vs2.scr
FROM vn_screenshots vs2
JOIN vn v2 ON v2.latest = vs2.vid
- WHERE v2.id = v.id
+ WHERE v2.id = v.id AND NOT vs2.nsfw
ORDER BY RANDOM()
LIMIT 1
)|, @vids).' ORDER BY position', @vids);