aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-06 18:20:10 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-06 18:20:10 +0100
commita201def5a054e06f612067879ca05351848f2b79 (patch)
tree391c390f81b1e68ae34d2d60eea6b573194117dd
parent54f8fbc34c7842d8e31775e99997cc291c20f310 (diff)
Remove extra_params cobrand call.
-rw-r--r--perllib/Cobrand.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm9
-rwxr-xr-xt/Cobrand.t18
-rw-r--r--t/Cobrands/Mysite/Util.pm4
-rw-r--r--web/js/map-tilma.js4
5 files changed, 1 insertions, 37 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index b1ec6ba75..7d4382583 100644
--- a/perllib/Cobrand.pm
+++ b/perllib/Cobrand.pm
@@ -72,9 +72,6 @@ my %fns = (
'extra_alert_data' => { default => "''" },
# Given a QUERY, extract any extra data required by the cobrand
'extra_data' => { default => "''" },
- # Given a QUERY, return a hash of extra params to be included in
- # any URLs in links produced on the page returned by that query.
- 'extra_params' => { default => "''" },
# Returns any extra text to be displayed with a PROBLEM.
'extra_problem_meta_text' => { default => "''" },
# Returns any extra text to be displayed with an UPDATE.
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 0613d0d6e..2fc6690b0 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -344,15 +344,6 @@ Given a QUERY, extract any extra data required by the cobrand
sub extra_data { '' }
-=head2 extra_params
-
-Given a QUERY, return a hash of extra params to be included in any URLs in links
-produced on the page returned by that query.
-
-=cut
-
-sub extra_params { return {} }
-
=head2 extra_problem_meta_text
Returns any extra text to be displayed with a PROBLEM.
diff --git a/t/Cobrand.t b/t/Cobrand.t
index 1f38ec605..d3857e523 100755
--- a/t/Cobrand.t
+++ b/t/Cobrand.t
@@ -11,7 +11,7 @@
use strict;
use warnings;
-use Test::More tests => 59;
+use Test::More tests => 56;
use Test::Exception;
use Error qw(:try);
@@ -135,21 +135,6 @@ sub test_base_url_for_emails {
}
-sub test_extra_params {
- my $cobrand = 'mysite';
- my $q = new MockQuery($cobrand);
-
- # should get the results of the extra_params function in the cobrand module if one exists
- my $extra_params = Cobrand::extra_params($cobrand, $q);
- is($extra_params, 'key=value', 'extra_params returns output from cobrand module') ;
-
- # should return an empty string otherwise
- $cobrand = 'nosite';
- $extra_params = Cobrand::extra_params($cobrand, $q);
- is($extra_params, '', 'extra_params returns an empty string if no cobrand module');
-
-}
-
sub test_header_params {
my $cobrand = 'mysite';
my $q = new MockQuery($cobrand);
@@ -270,7 +255,6 @@ ok(test_base_url_for_emails() == 1, 'Ran all tests for base_url_for_emails');
ok(test_extra_problem_data() == 1, 'Ran all tests for extra_problem_data');
ok(test_extra_update_data() == 1, 'Ran all tests for extra_update_data');
ok(test_extra_alert_data() == 1, 'Ran all tests for extra_alert_data');
-ok(test_extra_params() == 1, 'Ran all tests for extra_params');
ok(test_header_params() == 1, 'Ran all tests for header_params');
ok(test_root_path_js() == 1, 'Ran all tests for root_js');
ok(test_site_title() == 1, 'Ran all tests for site_title');
diff --git a/t/Cobrands/Mysite/Util.pm b/t/Cobrands/Mysite/Util.pm
index c1a8023c1..65591528f 100644
--- a/t/Cobrands/Mysite/Util.pm
+++ b/t/Cobrands/Mysite/Util.pm
@@ -61,10 +61,6 @@ sub extra_alert_data {
return "Cobrand alert data";
}
-sub extra_params {
- return 'key=value';
-}
-
sub header_params {
my %params = ('key' => 'value');
return \%params;
diff --git a/web/js/map-tilma.js b/web/js/map-tilma.js
index 1b8cc6450..3c5f546e5 100644
--- a/web/js/map-tilma.js
+++ b/web/js/map-tilma.js
@@ -146,10 +146,6 @@ function load_pins(x, y) {
'y=' + (y+3),
'all_pins=' + all_pins ];
- if (document.getElementById('extra_param')) {
- ajax_params.push(document.getElementById('extra_param').name + '=' + document.getElementById('extra_param').value);
- }
-
var url = [ root_path , '/ajax?', ajax_params.join(';')].join('');
YAHOO.util.Connect.asyncRequest('GET', url, {
success: pins_loaded