This commit is contained in:
r888888888
2013-04-21 14:32:25 -07:00
parent 3c20cfb971
commit 879ec0618a

View File

@@ -115,7 +115,12 @@ class Artist < ActiveRecord::Base
Artist.new.tap do |artist|
if params[:name]
artist.name = params[:name]
post = Post.tag_match("source:http #{artist.name}").first
if CurrentUser.user.is_privileged?
# below privileged users are limited to two tags
post = Post.tag_match("source:http #{artist.name} status:any").first
else
post = Post.tag_match("source:http #{artist.name}").first
end
unless post.nil? || post.source.blank?
artist.url_string = post.source
end