should solve all residual tag_query_limit bugs
This commit is contained in:
@@ -210,7 +210,7 @@ class Tag < ActiveRecord::Base
|
||||
output[:include] << tag[1..-1]
|
||||
|
||||
elsif tag =~ /\*/
|
||||
matches = Tag.name_matches(tag).all(:select => "name", :limit => CurrentUser.user.tag_query_limit, :order => "post_count DESC").map(&:name)
|
||||
matches = Tag.name_matches(tag).all(:select => "name", :limit => Danbooru.config.tag_query_limit, :order => "post_count DESC").map(&:name)
|
||||
matches = ["~no_matches~"] if matches.empty?
|
||||
output[:include] += matches
|
||||
|
||||
|
||||
@@ -416,9 +416,9 @@ class User < ActiveRecord::Base
|
||||
|
||||
def tag_query_limit
|
||||
if is_privileged?
|
||||
Danbooru.config.tag_query_limit
|
||||
Danbooru.config.base_tag_query_limit
|
||||
elsif is_platinum?
|
||||
Danbooru.config.tag_query_limit * 2
|
||||
Danbooru.config.base_tag_query_limit * 2
|
||||
else
|
||||
2
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user