]> git.koha-community.org Git - koha.git/commit
Bug 9183: Refactor ZOOM event loop
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 1 Dec 2012 03:45:48 +0000 (22:45 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 27 Dec 2012 19:56:02 +0000 (08:56 +1300)
commit727e002f3acc25b445b3177b601756ba6d5f650d
treeb00ade1bdd048afe43eab1a44d267bb3a2c437ed
parentc3825279d90147f801b435824ddab587f6378162
Bug 9183: Refactor ZOOM event loop

Prior to this patch, there were three identical ZOOM event loops in
C4::Search. This is wasteful, and goes against all good programming
practice. This patch refactors the ZOOM event loops into a separate
subroutine which is called by SimpleSearch, searchResults, and
GetDistinctValues call.

The new routine, _ZOOM_event_loop process the ZOOM event loop and,
once it has been fully processed, passes control to a closure provided
by the calling routine for processing the results, and destroys the
result sets.

To test (after applying patch):
1) Do a regular bibliographic search that should return results.
2) Do a search in the Cataloging module that should return results.
3) If you get results from both searches, the patch works.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Search.pm