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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 15 May 2020 08:33:22 +0000 (09:33 +0100)
commitd69ab6ee9185d124e8d282608e279d8590a6180f
tree6a5f756cb70ce4d7c9c6b64f1853885024f76eba
parent0524f3b6d6a96e9016802a2a4d4ea3a27ef0d2fa
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>
C4/Search.pm