aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-07-30 13:37:21 +0000
committerfrancis <francis>2008-07-30 13:37:21 +0000
commit5428beda0e12ecebd9317eb6fcaf0d2a67544dcc (patch)
treef08a9ba7efd92166bef285701e5b3ef6ae16f983 /app/controllers/admin_controller.rb
parentebf06a34375ff6014b4bf4ea3697a3472c445051 (diff)
Let adapter compute booleans, so works with sqlite as well as postgresql
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 15bdf2cd8..fdada3839 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.18 2008-07-14 12:07:56 francis Exp $
+# $Id: admin_controller.rb,v 1.19 2008-07-30 13:37:21 francis Exp $
class AdminController < ApplicationController
layout "admin"
@@ -21,7 +21,7 @@ class AdminController < ApplicationController
last_event_time_clause = '(select created_at from info_request_events where info_request_events.info_request_id = info_requests.id order by created_at desc limit 1)'
@requires_admin_requests = InfoRequest.find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', :conditions => ["described_state = 'requires_admin'"], :order => "last_event_time")
@blank_contacts = PublicBody.find(:all, :conditions => ["request_email = ''"], :order => "updated_at")
- @ten_days_old_unclassified = InfoRequest.find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', :conditions => [ "awaiting_description and " + last_event_time_clause + " < ? and prominence != 'backpage'", Time.now() - 10.days ], :order => "last_event_time")
+ @ten_days_old_unclassified = InfoRequest.find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', :conditions => [ "awaiting_description = ? and " + last_event_time_clause + " < ? and prominence != 'backpage'", true, Time.now() - 10.days ], :order => "last_event_time")
@holding_pen_messages = InfoRequest.holding_pen_request.incoming_messages
end