Bug 15407: (follow-up) Koha::Patron::Categories - replace C4::Category->al
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 12 Aug 2016 10:05:46 +0000 (11:05 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 8 Sep 2016 13:29:22 +0000 (13:29 +0000)
Categories.GetName should not have been removed in the previous patch
(merge conflict issue).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Template/Plugin/Categories.pm

index 5eb4c95..2a7ae53 100644 (file)
@@ -26,6 +26,12 @@ sub all {
     return Koha::Patron::Categories->search_limited;
 }
 
+sub GetName {
+    my ( $self, $categorycode ) = @_;
+
+    return Koha::Patron::Categories->find( $categorycode )->description;
+}
+
 1;
 
 =head1 NAME