]> git.koha-community.org Git - koha.git/commit
Bug 24458: Use the ViewPolicy filter on search results
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 11 May 2020 13:10:39 +0000 (10:10 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Wed, 20 May 2020 21:00:14 +0000 (21:00 +0000)
commite78231f3f63ed49fc65ac653e57159a8aba7fbe2
treedc62b09c69b20cd099b9ddf770b2d03a5984ff58
parent448915cc3d8dcd92ce93736bea09a5a0a113dc03
Bug 24458: Use the ViewPolicy filter on search results

This patch implements the use of the ViewPolicy record processor filter
inside C4::Search::searchResults. The idea is that the $record_processor
is instantiated once and reused inside the loop. This leaves options for
further optimizations I will do on a follow-up bug.

The filter is applied to the MARC data before it is passed to the XSLT
processor.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Search.t
=> FAIL: This is not implemented, tests fail
3. Apply this patch
4. Repeat 2
5. Feel the joy in your body from a long standing bug being solved
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
C4/Search.pm