aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin_request_controller.rb4
-rw-r--r--app/controllers/application_controller.rb4
-rw-r--r--app/controllers/comment_controller.rb2
-rw-r--r--app/controllers/general_controller.rb6
-rw-r--r--app/controllers/public_body_controller.rb6
-rw-r--r--app/controllers/request_controller.rb8
-rw-r--r--app/controllers/services_controller.rb2
-rw-r--r--app/controllers/track_controller.rb2
-rw-r--r--app/controllers/user_controller.rb10
9 files changed, 22 insertions, 22 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb
index fc291d998..5c45a6e6e 100644
--- a/app/controllers/admin_request_controller.rb
+++ b/app/controllers/admin_request_controller.rb
@@ -199,7 +199,7 @@ class AdminRequestController < AdminController
end
# Bejeeps, look, sometimes a URL is something that belongs in a controller, jesus.
- # XXX hammer this square peg into the round MVC hole
+ # TODO: hammer this square peg into the round MVC hole
post_redirect = PostRedirect.new(
:uri => upload_response_url(:url_title => info_request.url_title),
:user_id => user.id)
@@ -253,7 +253,7 @@ class AdminRequestController < AdminController
end
info_request_event.described_state = 'waiting_clarification'
info_request_event.calculated_state = 'waiting_clarification'
- # XXX deliberately don't update described_at so doesn't reenter search?
+ # TODO: deliberately don't update described_at so doesn't reenter search?
info_request_event.save!
flash[:notice] = "Old response marked as having been a clarification"
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 78a82316a..0c5f5bd02 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -278,10 +278,10 @@ class ApplicationController < ActionController::Base
session[:post_redirect_token] = post_redirect.token
- # XXX what is the built in Ruby URI munging function that can do this
+ # TODO: what is the built in Ruby URI munging function that can do this
# choice of & vs. ? more elegantly than this dumb if statement?
if uri.include?("?")
- # XXX This looks odd. What would a fragment identifier be doing server-side?
+ # TODO: This looks odd. What would a fragment identifier be doing server-side?
# But it also looks harmless, so I’ll leave it just in case.
if uri.include?("#")
uri.sub!("#", "&post_redirect=1#")
diff --git a/app/controllers/comment_controller.rb b/app/controllers/comment_controller.rb
index 5e39c3a2c..2c0037577 100644
--- a/app/controllers/comment_controller.rb
+++ b/app/controllers/comment_controller.rb
@@ -21,7 +21,7 @@ class CommentController < ApplicationController
end
if params[:comment]
- # XXX this check should theoretically be a validation rule in the model
+ # TODO: this check should theoretically be a validation rule in the model
@existing_comment = Comment.find_existing(@info_request.id, params[:comment][:body])
else
# Default to subscribing to request when first viewing form
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index e2a2190b0..28055ddbf 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -59,7 +59,7 @@ class GeneralController < ApplicationController
# Actual search
def search
- # XXX Why is this so complicated with arrays and stuff? Look at the route
+ # TODO: Why is this so complicated with arrays and stuff? Look at the route
# in config/routes.rb for comments.
combined = params[:combined].split("/")
@sortby = nil
@@ -70,7 +70,7 @@ class GeneralController < ApplicationController
else
@advanced = false
end
- # XXX currently /described isn't linked to anywhere, just used in RSS and for /list/successful
+ # TODO: currently /described isn't linked to anywhere, just used in RSS and for /list/successful
# This is because it's confusingly different from /newest - but still useful for power users.
if combined.size > 0 && (['newest', 'described', 'relevant'].include?(combined[-1]))
@sort_postfix = combined.pop
@@ -124,7 +124,7 @@ class GeneralController < ApplicationController
end
end
- # Query each type separately for separate display (XXX we are calling
+ # Query each type separately for separate display (TODO: we are calling
# perform_search multiple times and it clobbers per_page for each one,
# so set as separate var)
requests_per_page = params[:requests_per_page] ? params[:requests_per_page].to_i : 25
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 96e69d333..f909a5989 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -10,7 +10,7 @@ require 'confidence_intervals'
require 'tempfile'
class PublicBodyController < ApplicationController
- # XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL
+ # TODO: tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL
def show
long_cache
if MySociety::Format.simplify_url_part(params[:url_name], 'body') != params[:url_name]
@@ -43,7 +43,7 @@ class PublicBodyController < ApplicationController
query = InfoRequestEvent.make_query_from_params(params.merge(:latest_status => @view))
query += " requested_from:#{@public_body.url_name}"
# Use search query for this so can collapse and paginate easily
- # XXX really should just use SQL query here rather than Xapian.
+ # TODO: really should just use SQL query here rather than Xapian.
sortby = "described"
begin
@xapian_requests = perform_search([InfoRequestEvent], query, sortby, 'request_collapse')
@@ -86,7 +86,7 @@ class PublicBodyController < ApplicationController
def list
long_cache
- # XXX move some of these tag SQL queries into has_tag_string.rb
+ # TODO: move some of these tag SQL queries into has_tag_string.rb
like_query = params[:public_body_query]
like_query = "" if like_query.nil?
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 55a03e7b4..6281959fb 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -310,7 +310,7 @@ class RequestController < ApplicationController
end
# See if the exact same request has already been submitted
- # XXX this check should theoretically be a validation rule in the
+ # TODO: this check should theoretically be a validation rule in the
# model, except we really want to pass @existing_request to the view so
# it can link to it.
@existing_request = InfoRequest.find_existing(params[:info_request][:title], params[:info_request][:public_body_id], params[:outgoing_message][:body])
@@ -365,7 +365,7 @@ class RequestController < ApplicationController
end
# This automatically saves dependent objects, such as @outgoing_message, in the same transaction
@info_request.save!
- # XXX send_message needs the database id, so we send after saving, which isn't ideal if the request broke here.
+ # TODO: send_message needs the database id, so we send after saving, which isn't ideal if the request broke here.
@outgoing_message.send_message
flash[:notice] = _("<p>Your {{law_used_full}} request has been <strong>sent on its way</strong>!</p>
<p><strong>We will email you</strong> when there is a response, or after {{late_number_of_days}} working days if the authority still hasn't
@@ -543,7 +543,7 @@ class RequestController < ApplicationController
elsif @info_request_event.is_outgoing_message?
redirect_to outgoing_message_url(@info_request_event.outgoing_message), :status => :moved_permanently
else
- # XXX maybe there are better URLs for some events than this
+ # TODO: maybe there are better URLs for some events than this
redirect_to request_url(@info_request_event.info_request), :status => :moved_permanently
end
end
@@ -1012,7 +1012,7 @@ class RequestController < ApplicationController
params[:info_request][:public_body] = PublicBody.find(params[:url_name])
else
public_body = PublicBody.find_by_url_name_with_historic(params[:url_name])
- raise ActiveRecord::RecordNotFound.new("None found") if public_body.nil? # XXX proper 404
+ raise ActiveRecord::RecordNotFound.new("None found") if public_body.nil? # TODO: proper 404
params[:info_request][:public_body] = public_body
end
elsif params[:public_body_id]
diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb
index 97c47c448..dc4f783a6 100644
--- a/app/controllers/services_controller.rb
+++ b/app/controllers/services_controller.rb
@@ -31,7 +31,7 @@ class ServicesController < ApplicationController
FastGettext.locale = old_fgt_locale
end
end
- render :text => text, :content_type => "text/plain" # XXX workaround the HTML validation in test suite
+ render :text => text, :content_type => "text/plain" # TODO: workaround the HTML validation in test suite
end
def hidden_user_explanation
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb
index dccc52efc..c15fb573d 100644
--- a/app/controllers/track_controller.rb
+++ b/app/controllers/track_controller.rb
@@ -82,7 +82,7 @@ class TrackController < ApplicationController
def track_search_query
@query = params[:query_array]
- # XXX more hackery to make alternate formats still work with query_array
+ # TODO: more hackery to make alternate formats still work with query_array
if /^(.*)\.json$/.match(@query)
@query = $1
params[:format] = "json"
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 12207362b..fcc500e06 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -46,7 +46,7 @@ class UserController < ApplicationController
@is_you = !@user.nil? && @user.id == @display_user.id
# Use search query for this so can collapse and paginate easily
- # XXX really should just use SQL query here rather than Xapian.
+ # TODO: really should just use SQL query here rather than Xapian.
if @show_requests
begin
requests_query = 'requested_by:' + @display_user.url_name
@@ -102,11 +102,11 @@ class UserController < ApplicationController
@is_you = !@user.nil? && @user.id == @display_user.id
feed_results = Set.new
# Use search query for this so can collapse and paginate easily
- # XXX really should just use SQL query here rather than Xapian.
+ # TODO: really should just use SQL query here rather than Xapian.
begin
requests_query = 'requested_by:' + @display_user.url_name
comments_query = 'commented_by:' + @display_user.url_name
- # XXX combine these as OR query
+ # TODO: combine these as OR query
@xapian_requests = perform_search([InfoRequestEvent], requests_query, 'newest', 'request_collapse')
@xapian_comments = perform_search([InfoRequestEvent], comments_query, 'newest', nil)
rescue
@@ -121,7 +121,7 @@ class UserController < ApplicationController
if @is_you
@track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc')
for track_thing in @track_things
- # XXX factor out of track_mailer.rb
+ # TODO: factor out of track_mailer.rb
xapian_object = ActsAsXapian::Search.new([InfoRequestEvent], track_thing.track_query,
:sort_by_prefix => 'described_at',
:sort_by_ascending => true,
@@ -262,7 +262,7 @@ class UserController < ApplicationController
end
end
- # Change password (XXX and perhaps later email) - requires email authentication
+ # Change password (TODO: and perhaps later email) - requires email authentication
def signchangepassword
if @user and ((not session[:user_circumstance]) or (session[:user_circumstance] != "change_password"))
# Not logged in via email, so send confirmation