aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2009-09-09 00:03:08 +0000
committerfrancis <francis>2009-09-09 00:03:08 +0000
commit97ab1c13b28ed0bf03246cf22b68a999981b0b0a (patch)
tree86775b23169bf8be69e2e72b0c21507ca943b9f8 /app/controllers/request_controller.rb
parent18ae8383cf6b315c828eda81e3c35494bcb0b4ac (diff)
Remove some obsolete no_crawl, now in robots.txt.
Make it not go deep into page listings of requests.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 6fa61002b..5d17e4f5c 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/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: request_controller.rb,v 1.177 2009-09-08 22:48:55 francis Exp $
+# $Id: request_controller.rb,v 1.178 2009-09-09 00:03:10 francis Exp $
class RequestController < ApplicationController
@@ -73,11 +73,6 @@ class RequestController < ApplicationController
@xapian_object = ::ActsAsXapian::Similar.new([InfoRequestEvent], @info_request.info_request_events,
:offset => (@page - 1) * @per_page, :limit => @per_page, :collapse_by_prefix => 'request_collapse')
- # Stop robots crawling similar request lists. There is no point them
- # doing so. Google bot was going dozens of pages in, and they are slow
- # pages to generate, having an impact on server load.
- @no_crawl = true
-
if (@page > 1)
@page_desc = " (page " + @page.to_s + ")"
else
@@ -111,6 +106,11 @@ class RequestController < ApplicationController
@feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss] } ]
+ # Don't let robots go more than 20 pages in
+ if @page > 20
+ @no_crawl = true
+ end
+
cache_in_squid
end