|
Lines 17-35
package Koha::Template::Plugin::KohaBranchName;
Link Here
|
| 17 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
17 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
| 18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 |
|
19 |
|
| 20 |
use strict; |
20 |
use Modern::Perl; |
| 21 |
use warnings; |
|
|
| 22 |
|
21 |
|
| 23 |
use Template::Plugin::Filter; |
22 |
use Template::Plugin::Filter; |
| 24 |
use base qw( Template::Plugin::Filter ); |
23 |
use base qw( Template::Plugin::Filter ); |
| 25 |
use warnings; |
|
|
| 26 |
use strict; |
| 27 |
|
24 |
|
| 28 |
use C4::Branch qw( GetBranchName );; |
25 |
use C4::Branch qw( GetBranchName );; |
| 29 |
|
26 |
|
| 30 |
sub filter { |
27 |
sub filter { |
| 31 |
my ($self,$branchcode) = @_; |
28 |
my ($self, $branchcode) = @_; |
| 32 |
return GetBranchName( $branchcode ); |
29 |
my $name = GetBranchName( $branchcode ); |
|
|
30 |
return defined($name) ? $name : ''; |
| 33 |
} |
31 |
} |
| 34 |
|
32 |
|
| 35 |
1; |
33 |
1; |
| 36 |
- |
|
|