Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make changes to #11499 issue #11510

Merged
merged 2 commits into from
Oct 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def activity
.page(params[:page])
.group(['title', 'comments.cid']) # ONLY_FULL_GROUP_BY, issue #3120

if logged_in_as(['admin', 'moderator'])
if logged_in_as(%w(moderator admin))
notes = notes.where('(node.status = 1 OR node.status = 3)')
comments = comments.where('comments.status = 1')
elsif current_user
Expand Down Expand Up @@ -140,15 +140,7 @@ def activity
comments = comments.group('DATE(FROM_UNIXTIME(timestamp))') if Rails.env == 'production'
comments = comments.to_a # ensure it can be serialized for caching
activity = (notes + wikis + comments).sort_by(&:created_at).reverse
response = [
activity,
blog,
notes,
wikis,
revisions,
comments
]
response
[activity, blog, notes, wikis, revisions, comments]
end

def trending
Expand Down