aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Problems.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-02-07 19:19:07 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-02-07 19:19:07 +0000
commit3562fcd4dcd37db197f3fc448b7d2be408d1072b (patch)
tree5f183a91da79942141a61745fafd95af84fa3b61 /perllib/Problems.pm
parentf49a896d6e8f1b83d055fa7f19f709ccdfacbfc6 (diff)
Change the problem_find_nearby function.
rename old occurences to help when changing code later.
Diffstat (limited to 'perllib/Problems.pm')
-rw-r--r--perllib/Problems.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/Problems.pm b/perllib/Problems.pm
index 1556b7724..263d58bc9 100644
--- a/perllib/Problems.pm
+++ b/perllib/Problems.pm
@@ -94,7 +94,7 @@ sub recent_photos {
$probs = Memcached::get($key);
unless ($probs) {
$probs = select_all("select id, title
- from problem_find_nearby(?, ?, ?) as nearby, problem
+ from problem_find_nearby_easting_northing(?, ?, ?) as nearby, problem
where nearby.problem_id = problem.id
and state in ('confirmed', 'fixed') and photo is not null
$site_restriction
@@ -193,7 +193,7 @@ sub nearby {
mySociety::Locale::in_gb_locale { select_all(
"select id, title, easting, northing, distance, state,
extract(epoch from confirmed) as time
- from problem_find_nearby(?, ?, $dist) as nearby, problem
+ from problem_find_nearby_easting_northing(?, ?, $dist) as nearby, problem
where nearby.problem_id = problem.id " .
($interval ? " and ms_current_timestamp()-lastupdate < '$interval'::interval" : '') .
" and state in ('confirmed', 'fixed')" . ($ids ? ' and id not in (' . $ids . ')' : '') . "
@@ -206,7 +206,7 @@ sub fixed_nearby {
my ($dist, $mid_e, $mid_n) = @_;
mySociety::Locale::in_gb_locale { select_all(
"select id, title, easting, northing, distance
- from problem_find_nearby(?, ?, $dist) as nearby, problem
+ from problem_find_nearby_easting_northing(?, ?, $dist) as nearby, problem
where nearby.problem_id = problem.id and state='fixed'
$site_restriction
order by lastupdate desc", $mid_e, $mid_n);