aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin_controller.rb4
-rw-r--r--app/controllers/user_controller.rb6
2 files changed, 5 insertions, 5 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
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 38aa4da1d..7e3b0643d 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_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: user_controller.rb,v 1.50 2008-07-28 19:03:45 francis Exp $
+# $Id: user_controller.rb,v 1.51 2008-07-30 13:37:21 francis Exp $
class UserController < ApplicationController
# Show page about a set of users with same url name
@@ -14,11 +14,11 @@ class UserController < ApplicationController
return
end
- @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed", params[:url_name] ])
+ @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed = ?", params[:url_name], true ])
if not @display_user
raise "user not found, url_name=" + params[:url_name]
end
- @same_name_users = User.find(:all, :conditions => [ "name = ? and email_confirmed and id <> ?", @display_user.name, @display_user.id ], :order => "created_at")
+ @same_name_users = User.find(:all, :conditions => [ "name = ? and email_confirmed = ? and id <> ?", @display_user.name, true, @display_user.id ], :order => "created_at")
@is_you = !@user.nil? && @user.id == @display_user.id