From 0806fcc7d477b45d158e8a152b1f927f395d3aa7 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Sun, 3 Jun 2012 14:28:43 +0100 Subject: File.dirname(__FILE__) is not necessarily absolute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s weird that there’s so much code here that implicitly assumes File.dirname(__FILE__) is an absolute path, because really in general it very much is not! This assumption was invalidated by the recent bundler-awareness changes. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e305e90f4..82884f6c3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -202,7 +202,7 @@ class ApplicationController < ActionController::Base # return stub path so admin can expire it first_three_digits = info_request.id.to_s()[0..2] path = "views/request/#{first_three_digits}/#{info_request.id}" - foi_cache_path = File.join(File.dirname(__FILE__), '../../cache') + foi_cache_path = File.expand_path(File.join(File.dirname(__FILE__), '../../cache')) return File.join(foi_cache_path, path) end def foi_fragment_cache_exists?(key_path) -- cgit v1.2.3 From 5d48a55fffd1a75d6e8240bfea9982a43b103741 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Mon, 4 Jun 2012 22:33:49 +0100 Subject: Fix admin debug method > 10) admin debug (https://secure.mysociety.org/admin/foi/debug) - "you > are" - sentence that isn't finished > > 11) admin debug (https://secure.mysociety.org/admin/foi/debug) - > versioning incorrect & URLs to github malformed: > Alaveteli version: 0.5.2-297-g4ec7f6e > Alaveteli branch: (no > Alaveteli commit: 4ec7f6edbf2c00abc8464eafc889047f43533f90 --- app/controllers/application_controller.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 82884f6c3..41adf1848 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -345,9 +345,6 @@ class ApplicationController < ActionController::Base return "*unknown*"; end end - def assign_http_auth_user - @http_auth_user = admin_http_auth_user - end # Convert URL name for sort by order, to Xapian query def order_to_sort_by(sortby) -- cgit v1.2.3