diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-07-06 16:36:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-07-06 16:36:07 +0100 |
commit | c605e5130db58601e2c16b6c2c2ef29b83974dcc (patch) | |
tree | 9eb68080b2df69d2a8cc2d9d8eb5bd673f33696e | |
parent | 967c99a4c5d54d5b8dff0d502115511350c7a87c (diff) |
Factor out hard-coded number into cobrand function.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 10 |
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 |