aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-06 16:36:07 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-06 16:36:07 +0100
commitc605e5130db58601e2c16b6c2c2ef29b83974dcc (patch)
tree9eb68080b2df69d2a8cc2d9d8eb5bd673f33696e
parent967c99a4c5d54d5b8dff0d502115511350c7a87c (diff)
Factor out hard-coded number into cobrand function.
-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 9fb72121e..9a7bb6192 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -349,7 +349,7 @@ sub load_and_group_problems : Private {
{ photo => 'photo is not null' },
],
order_by => { -desc => 'lastupdate' },
- rows => 100,
+ rows => $c->cobrand->reports_per_page,
}
)->page( $page );
$c->stash->{pager} = $problems->pager;
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index e08e3c514..5eee5f731 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -364,6 +364,16 @@ sub map_type {
return;
}
+=head2 reports_per_page
+
+The number of reports to show per page on all reports page.
+
+=cut
+
+sub reports_per_page {
+ return 100;
+}
+
=head2 on_map_list_limit
Return the maximum number of items to be given in the list of reports on the map