From 3f214c128c8eb8a7ebf44a5a9d37c6a4e0fe5209 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 14 Dec 2011 15:47:59 +0100 Subject: [PATCH] =?utf8?q?Paginating=20Helper:=20Funktion=20um=20paginatin?= =?utf8?q?g=20nachtr=C3=A4glich=20zu=20deaktivieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Wird für pdf/csv Exporte gebraucht. --- SL/DB/Helper/Paginated.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SL/DB/Helper/Paginated.pm b/SL/DB/Helper/Paginated.pm index c490e2ab6..a24d4d7e0 100644 --- a/SL/DB/Helper/Paginated.pm +++ b/SL/DB/Helper/Paginated.pm @@ -4,7 +4,7 @@ use strict; require Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(paginate); +our @EXPORT = qw(paginate disable_paginating); use List::MoreUtils qw(any); @@ -64,6 +64,13 @@ sub calc_visibility { any { abs ($cur - $this) == $_ } 10, 50, 100, 500, 1000, 5000; } +sub disable_paginating { + my ($self, %params) = @_; + + delete $params{args}{page}; + delete $params{args}{per_page}; +} + 1; __END__ -- 2.20.1