From ab305889ff757e163c6b811503214c09bc63574b Mon Sep 17 00:00:00 2001 From: Jephthah David <106249556+JeffyDave@users.noreply.github.com> Date: Thu, 20 Oct 2022 08:34:54 +0100 Subject: [PATCH] Update spam2_controller.rb (#11515) * Update spam2_controller.rb My FTO issue for Public Lab * Update spam2_controller.rb * Update spam2_controller.rb --- app/controllers/spam2_controller.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/controllers/spam2_controller.rb b/app/controllers/spam2_controller.rb index 172ab3150c..7949af2ecd 100644 --- a/app/controllers/spam2_controller.rb +++ b/app/controllers/spam2_controller.rb @@ -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' @@ -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')