sexo?
This commit is contained in:
@@ -613,7 +613,13 @@ export default {
|
||||
const tmp = { user, tag: isTitleSearch ? _decodedTag : tag, hall, mime, itemid: rawIdOrSlug, strict: strict, userHall: userHallObj || userHallSlug, userHallOwner };
|
||||
|
||||
const effMode = Number(mode ?? 0);
|
||||
const modequery = computeBaseMode(mode, ratings, session);
|
||||
const nsflId = parseInt(cfg.nsfl_tag_id, 10) || 3;
|
||||
const itemModeQuery = session
|
||||
? computeBaseMode(mode, ratings, session)
|
||||
: (cfg.websrv.public_nsfw
|
||||
? `not exists (select 1 from tags_assign where item_id = items.id and tag_id = ${nsflId})`
|
||||
: `not exists (select 1 from tags_assign where item_id = items.id and tag_id in (2, ${nsflId}))`
|
||||
);
|
||||
|
||||
let tagFilter = db``;
|
||||
let titleFilter = db``;
|
||||
@@ -659,7 +665,7 @@ export default {
|
||||
: db`and coalesce(items.visibility, 0) = 0`);
|
||||
|
||||
return db`
|
||||
${db.unsafe(modequery)}
|
||||
${db.unsafe(itemModeQuery)}
|
||||
and items.active = true
|
||||
${visibilityFilter}
|
||||
and (items.expires_at IS NULL OR items.expires_at > ${Math.floor(Date.now() / 1000)})
|
||||
|
||||
Reference in New Issue
Block a user