diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-19 12:40:06 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-19 12:40:06 +0000 |
commit | bf66cd1d1d4faa249c692f13543e43f2bd6b0c03 (patch) | |
tree | 22c586b8a20515044b670ae8963cd7a39c5c5aed | |
parent | 64381d5786c883a41fad3b099a3059e97f96445e (diff) |
Forbid very slow-to-load results pages
Another temporary patch to protect the live site.
-rw-r--r-- | app/controllers/request_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 1c7aeedcc..90c1f416d 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -155,6 +155,13 @@ class RequestController < ApplicationController if @view == "recent" return redirect_to request_list_all_path(:action => "list", :view => "all", :page => @page), :status => :moved_permanently end + + # Temporary patch + # Later pages are very expensive to load + if @page > 100 + raise "Sorry. No pages after 100 today." + end + params[:latest_status] = @view query = make_query_from_params @title = _("View and search requests") |