Skip to content

Commit

Permalink
Update spam2_controller.rb (#11515)
Browse files Browse the repository at this point in the history
* Update spam2_controller.rb

My FTO issue for Public Lab

* Update spam2_controller.rb

* Update spam2_controller.rb
  • Loading branch information
JeffyDave authored Oct 20, 2022
1 parent b69d622 commit ab30588
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/controllers/spam2_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def _spam
@nodes.where(type: 'page', status: 1).order('changed DESC')
when 'unmoderated'
@nodes.where(status: 4).order('changed DESC')
when 'published'
@nodes.where(status: 1).order('changed DESC')
when 'published'
@nodes.where(status: 1).order('changed DESC')
when 'spammed'
@nodes.where(status: 0).order('changed DESC')
when 'created'
Expand Down Expand Up @@ -80,9 +80,7 @@ def _spam_users
@users = case params[:type]
when 'banned'
@users.where('rusers.status = 0')
when 'moderator'
@users.where('rusers.role = ?', params[:type])
when 'admin'
when 'moderator', 'admin'
@users.where('rusers.role = ?', params[:type])
else
@users.where('rusers.status = 1')
Expand Down

0 comments on commit ab30588

Please sign in to comment.