aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Page.pm4
-rw-r--r--perllib/Problems.pm4
2 files changed, 4 insertions, 4 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 7dae145fc..6cacf18be 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.106 2008-08-27 10:27:47 francis Exp $
+# $Id: Page.pm,v 1.107 2008-09-10 11:37:36 matthew Exp $
#
package Page;
@@ -336,7 +336,7 @@ sub display_map_end {
sub display_pin {
my ($q, $px, $py, $col, $num) = @_;
- $num = '' unless $num;
+ $num = '' if !$num || $num > 9;
my %cols = (red=>'R', green=>'G', blue=>'B', purple=>'P');
my $out = '<img class="pin" src="/i/pin' . $cols{$col}
. $num . '.gif" alt="' . _('Problem') . '" style="top:' . ($py-59)
diff --git a/perllib/Problems.pm b/perllib/Problems.pm
index 548496f63..38dbdef07 100644
--- a/perllib/Problems.pm
+++ b/perllib/Problems.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Problems.pm,v 1.3 2008-05-23 09:53:10 matthew Exp $
+# $Id: Problems.pm,v 1.4 2008-09-10 11:37:36 matthew Exp $
#
package Problems;
@@ -94,7 +94,7 @@ sub current_on_map {
"select id,title,easting,northing from problem where state='confirmed'
and easting>=? and easting<? and northing>=? and northing<?
$site_restriction
- order by created desc limit 9", $min_e, $max_e, $min_n, $max_n);
+ order by created desc", $min_e, $max_e, $min_n, $max_n);
}
sub current_nearby {