aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/public_body_controller.rb4
-rw-r--r--app/controllers/request_controller.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index ce70e1ab0..1a46cb62f 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -112,7 +112,9 @@ class PublicBodyController < ApplicationController
and has_tag_string_tags.model = \'PublicBody\'
and has_tag_string_tags.name = ?) > 0', @query, @query, @locale, @tag]
end
- if @tag.size == 1
+ if @tag == "all"
+ @description = ""
+ elsif @tag.size == 1
@description = _("beginning with") + " '" + @tag + "'"
else
@description = PublicBodyCategories::CATEGORIES_BY_TAG[@tag]
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index a76418e4e..10c0917c8 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -134,7 +134,6 @@ class RequestController < ApplicationController
@title = "View and search requests"
sortby = "newest"
@page = get_search_page_from_params if !@page # used in cache case, as perform_search sets @page as side effect
-
behavior_cache :tag => [@view, @page] do
xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_collapse')
@list_results = xapian_object.results.map { |r| r[:model] }
@@ -142,9 +141,8 @@ class RequestController < ApplicationController
end
@title = @title + " (page " + @page.to_s + ")" if (@page > 1)
-
- # XXX need to reinstate the following; @track_thing had previously been set to "TrackThing.create_track_for_all_new_requests" and "TrackThing.create_track_for_all_successful_requests"
- # @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ]
+ @track_thing = TrackThing.create_track_for_search_query(query)
+ @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ]
# Don't let robots go more than 20 pages in
if @page > 20