aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-04-17 10:38:38 +0000
committerfrancis <francis>2008-04-17 10:38:38 +0000
commit2ab83d0c9c5b093a3330b475614b891460652d80 (patch)
tree8d074770c33b7e0dcbb759f99123695082ff0c75 /app/controllers/admin_controller.rb
parent99d9132d51441b15cc8fbf66d040fcc9fd50ab17 (diff)
last_updated gets knackered by various track email things etc. so do query
on actual last new event for admin interface.
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r--app/controllers/admin_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index ebd4beab6..a7b2f244f 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_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_controller.rb,v 1.12 2008-04-16 13:23:55 francis Exp $
+# $Id: admin_controller.rb,v 1.13 2008-04-17 10:38:38 francis Exp $
class AdminController < ApplicationController
layout "admin"
@@ -20,7 +20,7 @@ class AdminController < ApplicationController
# Tasks to do
@requires_admin_requests = InfoRequest.find(:all, :conditions => ["described_state = 'requires_admin'"])
@blank_contacts = PublicBody.find(:all, :conditions => ["request_email = ''"])
- @two_week_old_unclassified = InfoRequest.find(:all, :conditions => [ "awaiting_description and info_requests.updated_at < ?", Time.now() - 2.weeks ])
+ @two_week_old_unclassified = InfoRequest.find(:all, :conditions => [ "awaiting_description and (select created_at from info_request_events where info_request_events.info_request_id = info_requests.id order by created_at desc limit 1) < ? and prominence != 'backpage'", Time.now() - 2.weeks ])
end
def timeline