aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm10
2 files changed, 11 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 352c47da8..8d7a7acbd 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -430,7 +430,7 @@ sub load_and_group_problems : Private {
my $problems = $c->cobrand->problems->search(
$where,
{
- order_by => { -desc => 'lastupdate' },
+ order_by => $c->cobrand->reports_ordering,
rows => $c->cobrand->reports_per_page,
}
)->page( $page );
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index abf5d4fb5..228865c78 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -340,6 +340,16 @@ sub reports_per_page {
return FixMyStreet->config('ALL_REPORTS_PER_PAGE') || 100;
}
+=head2 reports_ordering
+
+The order_by clause to use for reports on all reports page
+
+=cut
+
+sub reports_ordering {
+ return { -desc => 'lastupdate' };
+}
+
=head2 on_map_list_limit
Return the maximum number of items to be given in the list of reports on the map