Bug 13618: Fix error 'Not a GLOB reference'
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 Aug 2015 14:51:55 +0000 (15:51 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Fri, 29 Jan 2016 17:54:13 +0000 (17:54 +0000)
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
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt

index f545afa..7c52ce5 100644 (file)
             <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">
index 30cda46..a217180 100644 (file)
@@ -199,10 +199,11 @@ function validate1(date) {
      [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% 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>