aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Reports.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-08-13 12:21:20 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-08-13 13:38:14 +0100
commitef3a3a789e8f91b62dc562ff69781dc0daa80871 (patch)
tree6045ce7399229bfcb2eca4090f1707d6fc79830b /perllib/FixMyStreet/App/Controller/Reports.pm
parent864fcb6a81b17ec6324598973ff29dd734a7baf8 (diff)
Remove ms_current_timestamp() override function.
This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 6b0d516a6..4582843bd 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -396,20 +396,20 @@ sub load_and_group_problems : Private {
my $not_open = [ FixMyStreet::DB::Result::Problem::fixed_states(), FixMyStreet::DB::Result::Problem::closed_states() ];
if ( $type eq 'new' ) {
- $where->{confirmed} = { '>', \"ms_current_timestamp() - INTERVAL '4 week'" };
+ $where->{confirmed} = { '>', \"current_timestamp - INTERVAL '4 week'" };
$where->{state} = { 'IN', [ FixMyStreet::DB::Result::Problem::open_states() ] };
} elsif ( $type eq 'older' ) {
- $where->{confirmed} = { '<', \"ms_current_timestamp() - INTERVAL '4 week'" };
- $where->{lastupdate} = { '>', \"ms_current_timestamp() - INTERVAL '8 week'" };
+ $where->{confirmed} = { '<', \"current_timestamp - INTERVAL '4 week'" };
+ $where->{lastupdate} = { '>', \"current_timestamp - INTERVAL '8 week'" };
$where->{state} = { 'IN', [ FixMyStreet::DB::Result::Problem::open_states() ] };
} elsif ( $type eq 'unknown' ) {
- $where->{lastupdate} = { '<', \"ms_current_timestamp() - INTERVAL '8 week'" };
+ $where->{lastupdate} = { '<', \"current_timestamp - INTERVAL '8 week'" };
$where->{state} = { 'IN', [ FixMyStreet::DB::Result::Problem::open_states() ] };
} elsif ( $type eq 'fixed' ) {
- $where->{lastupdate} = { '>', \"ms_current_timestamp() - INTERVAL '8 week'" };
+ $where->{lastupdate} = { '>', \"current_timestamp - INTERVAL '8 week'" };
$where->{state} = $not_open;
} elsif ( $type eq 'older_fixed' ) {
- $where->{lastupdate} = { '<', \"ms_current_timestamp() - INTERVAL '8 week'" };
+ $where->{lastupdate} = { '<', \"current_timestamp - INTERVAL '8 week'" };
$where->{state} = $not_open;
}