diff options
-rw-r--r-- | perllib/Cobrand.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 9 | ||||
-rwxr-xr-x | t/Cobrand.t | 18 | ||||
-rw-r--r-- | t/Cobrands/Mysite/Util.pm | 4 | ||||
-rw-r--r-- | web/js/map-tilma.js | 4 |
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 |