aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-02-07 21:00:53 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-02-07 21:00:53 +0000
commit575bb55184d5ff4304b4a8e9b70e5cec3266b031 (patch)
treeabb5059f372cfb663bc4bbc6e4fdaa5d66dc4119
parentdcb39f3c06da0978e1711086ed992859496b2db3 (diff)
Migrate code that uses problem_find_nearby stored in alert_types table
-rw-r--r--db/alert_types.sql4
-rw-r--r--db/alert_types_eha.sql2
-rwxr-xr-xweb/rss.cgi4
3 files changed, 5 insertions, 5 deletions
diff --git a/db/alert_types.sql b/db/alert_types.sql
index 45c81fdab..82a8c71f8 100644
--- a/db/alert_types.sql
+++ b/db/alert_types.sql
@@ -39,7 +39,7 @@ insert into alert_type
item_title, item_link, item_description, template)
values ('local_problems', '', '',
'New local problems on FixMyStreet', '/', 'The latest local problems reported by users',
- 'problem_find_nearby_easting_northing(?, ?, ?) 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}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby');
-- New problems around a location
@@ -50,7 +50,7 @@ insert into alert_type
item_title, item_link, item_description, template)
values ('local_problems_state', '', '',
'New local problems on FixMyStreet', '/', 'The latest local problems reported by users',
- 'problem_find_nearby_easting_northing(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (?)', 'created desc',
+ 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (?)', 'created desc',
'{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby');
-- New problems sent to a particular council
diff --git a/db/alert_types_eha.sql b/db/alert_types_eha.sql
index 4f16dc5ed..c949ea2f8 100644
--- a/db/alert_types_eha.sql
+++ b/db/alert_types_eha.sql
@@ -39,7 +39,7 @@ insert into alert_type
item_title, item_link, item_description, template)
values ('local_problems', '', '',
'New local reports on reportemptyhomes.com', '/', 'The latest local reports reported by users',
- 'problem_find_nearby_easting_northing(?, ?, ?) 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}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby');
-- New problems sent to a particular council
diff --git a/web/rss.cgi b/web/rss.cgi
index 8885af249..0ac7fa45d 100755
--- a/web/rss.cgi
+++ b/web/rss.cgi
@@ -122,9 +122,9 @@ sub rss_local_problems {
my $xsl = Cobrand::feed_xsl($cobrand);
if ($state eq 'all') {
- return FixMyStreet::Alert::generate_rss('local_problems', $xsl, $qs, [$e, $n, $d], undef, $cobrand, $q);
+ return FixMyStreet::Alert::generate_rss('local_problems', $xsl, $qs, [$lat, $lon, $d], undef, $cobrand, $q);
} else {
- return FixMyStreet::Alert::generate_rss('local_problems_state', $xsl, $qs, [$e, $n, $d, $state], undef, $cobrand, $q);
+ return FixMyStreet::Alert::generate_rss('local_problems_state', $xsl, $qs, [$lat, $lon, $d, $state], undef, $cobrand, $q);
}
}