From 2b3909496a797911424eb3c193279b037713410d Mon Sep 17 00:00:00 2001 From: Toks Date: Wed, 30 Jul 2014 16:29:55 -0400 Subject: [PATCH] Fix detection of tag wildcard searches --- app/logical/post_sets/post.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/logical/post_sets/post.rb b/app/logical/post_sets/post.rb index 5fecd22d5..a5aed3cfa 100644 --- a/app/logical/post_sets/post.rb +++ b/app/logical/post_sets/post.rb @@ -63,7 +63,7 @@ module PostSets end def posts - if tag_array.any? {|x| x =~ /^source:.*\*.*pixiv/} && !CurrentUser.user.is_builder? + if tag_array.any? {|x| x =~ /^-?source:.*\*.*pixiv/} && !CurrentUser.user.is_builder? raise SearchError.new("Your search took too long to execute and was canceled") end @@ -87,7 +87,7 @@ module PostSets end def is_pattern_search? - is_single_tag? && tag_string =~ /\*/ + is_single_tag? && tag_string =~ /\*/ && !tag_array.any? {|x| x =~ /^-?source:.+/} end def current_page