fixes #2859: search:uncategorized should search for uncategorized saved searches

This commit is contained in:
r888888888
2017-02-14 11:58:43 -08:00
parent 1c2804f4d5
commit ed8a8001f4

View File

@@ -48,11 +48,7 @@ class UserPresenter
return Post.where("false")
end
if category == SavedSearch::UNCATEGORIZED_NAME
ids = SavedSearch.post_ids(CurrentUser.user.id)
else
ids = SavedSearch.post_ids(CurrentUser.user.id, category)
end
ids = SavedSearch.post_ids(CurrentUser.user.id, category)
if ids.any?
arel = Post.where("id in (?)", ids.map(&:to_i)).order("id desc").limit(10)