deprecate tag subscriptions with warnings

This commit is contained in:
r888888888
2017-04-14 16:00:20 -07:00
parent 8b38e4d39a
commit 97da8f8647
16 changed files with 22 additions and 147 deletions

View File

@@ -13,8 +13,6 @@ module PostSetPresenters
pattern_tags
elsif post_set.is_saved_search?
SavedSearch.labels_for(CurrentUser.user.id).map {|x| "search:#{x}"}
elsif post_set.is_tag_subscription?
post_set.tag_subscription_tags
elsif post_set.is_single_tag?
related_tags_for_single(post_set.tag_string)
elsif post_set.unordered_tag_array.size == 1

View File

@@ -63,20 +63,6 @@ class UserPresenter
end
end
def posts_for_subscription(subscription)
arel = Post.where("id in (?)", subscription.post_id_array.map(&:to_i)).order("id desc").limit(6)
if CurrentUser.user.hide_deleted_posts?
arel = arel.undeleted
end
arel
end
def tag_links_for_subscription(template, subscription)
subscription.tag_query_array.map {|x| template.link_to(x, template.posts_path(:tags => x))}.join(", ").html_safe
end
def upload_limit
if user.can_upload_free?
return "none"
@@ -213,14 +199,6 @@ class UserPresenter
template.link_to("positive:#{positive} neutral:#{neutral} negative:#{negative}", template.user_feedbacks_path(:search => {:user_id => user.id}))
end
def subscriptions
if CurrentUser.user.id == user.id
user.subscriptions
else
user.subscriptions.select {|x| x.is_public?}
end
end
def saved_search_labels
if CurrentUser.user.id == user.id
SavedSearch.labels_for(CurrentUser.user.id)