]> git.koha-community.org Git - koha.git/commit
Bug 21890: Add can_any_reset_password() to the Categories TT plugin
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 31 Jan 2019 19:27:10 +0000 (16:27 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 12 Apr 2019 02:32:03 +0000 (02:32 +0000)
commite55b627603450313954b98704e73d0baa3ed56f9
tree87fb8acbc375986bd17ced6040fa42def08cfcbf
parentdea4f3caaadabc8977453615eb162d8403fa5b5d
Bug 21890: Add can_any_reset_password() to the Categories TT plugin

This patch introduces a method to the Koha::Template::Plugin::Categories
TT plugin. This methods queries for categories filtering them by
effective_reset_password flag set, and returns a boolean representing the fact
that there's at least one category allowed.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Template/Plugin/Categories.t
=> SUCCESS: Tests pass!
- Sign off :-D

Caveat: this patch/tests require the schema to be updated

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Template/Plugin/Categories.pm
t/db_dependent/Template/Plugin/Categories.t