aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_request_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin_request_controller.rb')
-rw-r--r--app/controllers/admin_request_controller.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb
index 6bba0bc88..33b04e7fe 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.29 2009-01-29 12:10:10 francis Exp $
+# $Id: admin_request_controller.rb,v 1.30 2009-03-10 12:04:55 tony Exp $
class AdminRequestController < AdminController
def index
@@ -18,6 +18,18 @@ class AdminRequestController < AdminController
:conditions => @query.nil? ? nil : ["lower(title) like lower('%'||?||'%')", @query]
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"
+ )
+ end
+
def show
@info_request = InfoRequest.find(params[:id])
end