diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin_general_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/admin_request_controller.rb | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index 3d2bf74df..cbb381e21 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: admin_general_controller.rb,v 1.3 2009-03-10 12:04:55 tony Exp $ +# $Id: admin_general_controller.rb,v 1.4 2009-04-08 10:45:33 louise Exp $ class AdminGeneralController < AdminController def index @@ -19,7 +19,7 @@ class AdminGeneralController < AdminController @requires_admin_requests = InfoRequest.find(:all, :select => '*, ' + InfoRequest.last_event_time_clause + ' as last_event_time', :conditions => ["described_state = 'requires_admin'"], :order => "last_event_time") @error_message_requests = InfoRequest.find(:all, :select => '*, ' + InfoRequest.last_event_time_clause + ' as last_event_time', :conditions => ["described_state = 'error_message'"], :order => "last_event_time") @blank_contacts = PublicBody.find(:all, :conditions => ["request_email = ''"], :order => "updated_at") - @ten_days_old_unclassified = InfoRequest.find(:all, :select => '*, ' + InfoRequest.last_event_time_clause + ' as last_event_time', :conditions => [ "awaiting_description = ? and " + InfoRequest.last_event_time_clause + " < ? and prominence != 'backpage'", true, Time.now() - 10.days ], :order => "last_event_time", :limit => 50) + @ten_days_old_unclassified = InfoRequest.find_old_unclassified(limit=50) @holding_pen_messages = InfoRequest.holding_pen_request.incoming_messages end diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index 18a577443..15faacac2 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: admin_request_controller.rb,v 1.32 2009-04-08 04:51:37 francis Exp $ +# $Id: admin_request_controller.rb,v 1.33 2009-04-08 10:45:33 louise Exp $ class AdminRequestController < AdminController def index @@ -19,15 +19,7 @@ class AdminRequestController < AdminController end def list_old_unclassified - @info_requests = InfoRequest.find( - :all, - :select => '*, ' + InfoRequest.last_event_time_clause + ' as last_event_time', - :conditions => [ - "awaiting_description = ? and " + InfoRequest.last_event_time_clause + " < ? and prominence != 'backpage'", - true, Time.now() - 10.days - ], - :order => "last_event_time" - ) + @info_requests = InfoRequest.find_old_unclassified end def show |