[Koha-patches] [PATCH] [followup](MT3160) fix previous patch for non checked variable

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Fri Jun 4 11:06:59 CEST 2010


This add a if to check if the variable exists
---
 C4/Overdues.pm                                     |    2 +-
 .../prog/en/modules/cataloguing/addbiblio.tmpl     |   14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/C4/Overdues.pm b/C4/Overdues.pm
index 79e5151..d9bd420 100644
--- a/C4/Overdues.pm
+++ b/C4/Overdues.pm
@@ -199,7 +199,7 @@ sub GetOverduesByBorrowers{
             surname,
             firstname,
             title,
-            CONCAT(borrowers.address, '\n', borrowers.address2) as address,
+            CONCAT(borrowers.streetnumber, ' ', borrowers.address, '\n', borrowers.address2) as address,
             city,
             zipcode,
             email,
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
index 6321e5e..e13e07a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
@@ -454,12 +454,14 @@ function CloneSubfield(index){
     // Changing the "..." link's onclick attribute for plugin callback
     var links  = clone.getElementsByTagName('a');
     var link = links[0];
-    var buttonDotOnClick = link.getAttribute('onclick');
-    if(buttonDotOnClick.match('Clictag')){   // -1- It s a plugin
-	var re = /\('.*'\)/i;
-        buttonDotOnClick = buttonDotOnClick.replace(re,"('"+linkid+"')");
-        if(buttonDotOnClick){
-	    link.setAttribute('onclick',buttonDotOnClick);
+    if ( link ) {
+        var buttonDotOnClick = link.getAttribute('onclick');
+        if(buttonDotOnClick.match('Clictag')){   // -1- It s a plugin
+            var re = /\('.*'\)/i;
+            buttonDotOnClick = buttonDotOnClick.replace(re,"('"+linkid+"')");
+            if(buttonDotOnClick){
+                link.setAttribute('onclick',buttonDotOnClick);
+            }
         }
     }
 
-- 
1.7.0.4



More information about the Koha-patches mailing list