Fix missing ) causing some source searches to fail
This commit is contained in:
@@ -171,7 +171,7 @@ class PostQueryBuilder
|
|||||||
if q[:source] == "none%"
|
if q[:source] == "none%"
|
||||||
relation = relation.where("(posts.source = '' OR posts.source IS NULL)")
|
relation = relation.where("(posts.source = '' OR posts.source IS NULL)")
|
||||||
elsif q[:source] == "http%"
|
elsif q[:source] == "http%"
|
||||||
relation = relation.where("(lower(posts.source) like ?", "http%")
|
relation = relation.where("(lower(posts.source) like ?)", "http%")
|
||||||
elsif q[:source] =~ /^%\.?pixiv(?:\.net(?:\/img)?)?(?:%\/|(?=%$))(.+)$/i
|
elsif q[:source] =~ /^%\.?pixiv(?:\.net(?:\/img)?)?(?:%\/|(?=%$))(.+)$/i
|
||||||
relation = relation.where("SourcePattern(lower(posts.source)) LIKE lower(?) ESCAPE E'\\\\'", "pixiv/" + $1)
|
relation = relation.where("SourcePattern(lower(posts.source)) LIKE lower(?) ESCAPE E'\\\\'", "pixiv/" + $1)
|
||||||
has_constraints!
|
has_constraints!
|
||||||
|
|||||||
Reference in New Issue
Block a user