diff options
-rw-r--r-- | conf/httpd.conf | 3 | ||||
-rw-r--r-- | db/alert_types.sql | 2 | ||||
-rwxr-xr-x | web/rss.cgi | 7 |
3 files changed, 8 insertions, 4 deletions
diff --git a/conf/httpd.conf b/conf/httpd.conf index 5b4d3eea1..c2d97da18 100644 --- a/conf/httpd.conf +++ b/conf/httpd.conf @@ -20,7 +20,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org # -# $Id: httpd.conf,v 1.11 2007-05-14 18:20:41 matthew Exp $ +# $Id: httpd.conf,v 1.12 2007-05-16 17:47:41 matthew Exp $ DirectoryIndex index.cgi @@ -35,6 +35,7 @@ RewriteRule ^/[Qq]/([0-9A-Za-z]{16}).*$ /questionnaire.cgi?token=$1 RewriteRule ^/rss/([0-9]+)$ /rss.cgi?type=new_updates;id=$1 [QSA] RewriteRule ^/rss/([0-9]+),([0-9]+)$ /rss.cgi?type=local_problems;x=$1;y=$2 [QSA] +RewriteRule ^/rss/([0-9]+),([0-9]+)/([0-9]+)$ /rss.cgi?type=local_problems;x=$1;y=$2;d=$3 [QSA] RewriteRule ^/rss/council/([0-9]+)$ /rss.cgi?type=council_problems;id=$1 [QSA] RewriteRule ^/rss/problems$ /rss.cgi?type=new_problems [QSA] diff --git a/db/alert_types.sql b/db/alert_types.sql index 9b0c99a1b..63322f986 100644 --- a/db/alert_types.sql +++ b/db/alert_types.sql @@ -25,7 +25,7 @@ insert into alert_type item_title, item_link, item_description, template) values ('local_problems', '', '', 'New local problems on Neighbourhood Fix-It', '/', 'The latest local problems reported by users', - 'problem_find_nearby(?, ?, 10) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (\'confirmed\', \'fixed\')', 'created desc', + 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (\'confirmed\', \'fixed\')', 'created desc', '{{title}}', '/?id={{id}}', '{{detail}}', 'alert-problem'); insert into alert_type diff --git a/web/rss.cgi b/web/rss.cgi index 650aa7d28..cb526ec75 100755 --- a/web/rss.cgi +++ b/web/rss.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: rss.cgi,v 1.5 2007-05-14 18:20:42 matthew Exp $ +# $Id: rss.cgi,v 1.6 2007-05-16 17:47:42 matthew Exp $ use strict; require 5.8.0; @@ -41,9 +41,12 @@ sub main { my $x = $q->param('x'); my $y = $q->param('y'); my $qs = 'x='.$x.';y='.$y; + my $d = $q->param('d'); + $qs .= ";d=$d" if $d; + $d = 10 unless $d; $x = ($x * 5000 / 31); $y = ($y * 5000 / 31); - mySociety::Alert::generate_rss($type, $qs, $x, $y); + mySociety::Alert::generate_rss($type, $qs, $x, $y, $d); } elsif ($type eq 'new_updates') { my $id = $q->param('id'); my $qs = 'id='.$id; |