diff options
Diffstat (limited to 'web/ajax.cgi')
-rwxr-xr-x | web/ajax.cgi | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/web/ajax.cgi b/web/ajax.cgi index e00fe7100..e33c210cc 100755 --- a/web/ajax.cgi +++ b/web/ajax.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: ajax.cgi,v 1.13 2009-10-07 08:18:42 louise Exp $ +# $Id: ajax.cgi,v 1.14 2009-10-15 16:51:55 louise Exp $ use strict; use Standard; @@ -36,20 +36,21 @@ sub main { $interval = '6 months'; } my ($pins, $on_map, $around_map, $dist) = Page::map_pins($q, $x, $y, $sx, $sy, $interval); - my $limit = Cobrand::on_map_list_limit(Page::get_cobrand($q)); + my $cobrand = Page::get_cobrand($q); + my $limit = Cobrand::on_map_list_limit($cobrand); ($on_map, $around_map) = Page::apply_on_map_list_limit($on_map, $around_map, $limit); my $list = ''; my $link = ''; foreach (@$on_map) { - $link = NewURL($q, -retain => 1, - -url => '/report/' . $_->{id}, - pc => undef, - x => undef, - y => undef, - sx => undef, - sy => undef, - all_pins => undef, - no_pins => undef); + $link = Cobrand::url($cobrand, NewURL($q, -retain => 1, + -url => '/report/' . $_->{id}, + pc => undef, + x => undef, + y => undef, + sx => undef, + sy => undef, + all_pins => undef, + no_pins => undef)); $list .= '<li><a href="' . $link . '">'; $list .= $_->{title}; $list .= '</a>'; @@ -60,15 +61,15 @@ sub main { $list = ''; foreach (@$around_map) { - $link = NewURL($q, -retain => 1, - -url => '/report/' . $_->{id}, - pc => undef, - x => undef, - y => undef, - sx => undef, - sy => undef, - all_pins => undef, - no_pins => undef); + $link = Cobrand::url($cobrand, NewURL($q, -retain => 1, + -url => '/report/' . $_->{id}, + pc => undef, + x => undef, + y => undef, + sx => undef, + sy => undef, + all_pins => undef, + no_pins => undef)); $list .= '<li><a href="' . $link . '">'; $list .= $_->{title} . ' <small>(' . int($_->{distance}/100+.5)/10 . 'km)</small>'; $list .= '</a>'; |