]> git.koha-community.org Git - koha.git/commit
Bug 19223: Add methods to correctly handle plugin-generated output
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 27 Mar 2018 18:56:57 +0000 (15:56 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 14 May 2018 14:39:29 +0000 (14:39 +0000)
commit149645534bac47f8d0b9e63e7a9b53fc51f40076
tree0f270affddbfcd521345656624d9271c2136ac7f
parentdc2f137d02bf0f67430e9640423e801d000e9982
Bug 19223: Add methods to correctly handle plugin-generated output

This patch introduces two methods to be used by plugin authors:

->output
->output_html

They are basically wrappers for the helper methods from C4::Output
(output_html_with_http_headers and output_with_http_headers).

Plugin authors can use them, or keep the current flexibility of handling
the headers themselves in their code.

The KitchenSink plugin should be updated to highlight this.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: The methods are not implemented
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass, and they are meaningful
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Plugins/Base.pm