Bug 23166: Call the methods from the .inc
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 5 May 2020 13:51:25 +0000 (15:51 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 Aug 2020 09:31:49 +0000 (11:31 +0200)
commit50f3d267c15d1c0ea18fad092d61c157689d7403
treef65ce6929bcaba2d137d175106b7e39eb4155569
parentc3bab9f414819f31f37f1f12943126a7e8abd030
Bug 23166: Call the methods from the .inc

We do not longer need the order variables to be passed from the
controllers, we can call the methods on the biblio object instead.

There is something wrong with our ->search method and TT behaviours, it
is hard to retrieve object list in a scalar context.
If [% objects.method.count %] is called, objects.method will get the
first object of the list and count will explode (Koha::Object->count
does not exist)

We need to force the call in a scalar context to retrieve an iterator
and prevent to fetch all the objects (we could have called all then
size, but it's not efficient)

If adopted I will move the plugin on a separate bug report to ease
backport

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Template/Plugin/Context.pm [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc