From 7598f5d8ee84d4122ee7b4c1cebf363fc0c91949 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Fri, 21 Aug 2015 10:23:54 +1200 Subject: [PATCH] Bug 13618 - memberentrygen.tt errors Not a GLOB reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like Jonathan said: 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. Replaced it with a SWITCH, like the other patch for this similar error. Signed-off-by: Signed-off-by: Joonas Kylmälä Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Katrin Fischer --- .../prog/en/modules/members/memberentrygen.tt | 31 +++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 69624d2..50039c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -510,11 +510,12 @@ [% END %] [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] - [% IF Koha.Preference( 'AddressFormat' ) %] - [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] - [% ELSE %] - [% INCLUDE 'member-main-address-style-us.inc' %] - [% END %] + [% SWITCH Koha.Preference( 'AddressFormat' ) %] + [% CASE 'de' %] + [% INCLUDE 'member-main-address-style-de.inc' %] + [% CASE # us %] + [% INCLUDE 'member-main-address-style-us.inc' %] + [% END %] [% END # nostreet && nocity etc group%] [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] @@ -603,20 +604,24 @@ [% IF ( step_6 ) %] [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %] - [% IF Koha.Preference( 'AddressFormat' ) %] - [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] - [% ELSE %] + [% SWITCH Koha.Preference( 'AddressFormat' ) %] + [% CASE 'de' %] + [% INCLUDE 'member-alt-address-style-de.inc' %] + [% CASE # us %] [% INCLUDE 'member-alt-address-style-us.inc' %] - [% END %] + [% END %] + [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] [% END %] [% IF ( step_2 ) %] [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %] - [% IF Koha.Preference( 'AddressFormat' ) %] - [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] - [% ELSE %] + [% SWITCH Koha.Preference( 'AddressFormat' ) %] + [% CASE 'de' %] + [% INCLUDE 'member-alt-contact-style-de.inc' %] + [% CASE # us %] [% INCLUDE 'member-alt-contact-style-us.inc' %] - [% END %] + [% END %] + [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] [% END %] -- 2.1.0