The interpolation of a variable on including a file caused an unexpected
error:
Template process failed: undef error - Not a GLOB reference at
/usr/lib/i386-linux-gnu/perl5/5.20/Template/Provider.pm line 619.
The easier fix is to replace it with a SWITCH.
Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
<li id="patronbasics"><img src="[% interface %]/[% theme %]/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
[% END %]
[% END %]
- [% IF Koha.Preference( 'AddressFormat' ) %]
- [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
- [% ELSE %]
- [% INCLUDE 'member-display-address-style-us.inc' %]
+ [% SWITCH Koha.Preference( 'AddressFormat' ) %]
+ [% CASE 'de' %]
+ [% INCLUDE 'member-display-address-style-de.inc' %]
+ [% CASE # us %]
+ [% INCLUDE 'member-display-address-style-us.inc' %]
[% END %]
[% IF ( phone ) %]<li class="patronphone">
[% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %]
<div class = "address">
- [% IF Koha.Preference( 'AddressFormat' ) %]
- [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
- [% ELSE %]
- [% INCLUDE 'member-display-address-style-us.inc' %]
+ [% SWITCH Koha.Preference( 'AddressFormat' ) %]
+ [% CASE 'de' %]
+ [% INCLUDE 'member-display-address-style-de.inc' %]
+ [% CASE # us %]
+ [% INCLUDE 'member-display-address-style-us.inc' %]
[% END %]
</div>