#1475
authorFrédéric DEMIANS <f.demians@tamil.fr>
Wed, 10 Oct 2007 19:42:15 +0000 (14:42 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 10 Oct 2007 22:05:48 +0000 (17:05 -0500)
Not sure whereas this patch's reached you...

Thanks.

--
Frédéric DEMIANS
http://www.tamil.fr/u/fdemians.html

>From 4c1efe7c79d8ac6eb6f275823d9a0ea948d1315c Mon Sep 17 00:00:00 2001
From: Frederic Demians <f.demians@tamil.fr>
Date: Sun, 7 Oct 2007 01:54:56 +0200
Subject: [PATCH] Correct a bug preventing from modifying member records

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
members/memberentry.pl

index f027c4c..e5fe443 100755 (executable)
@@ -101,11 +101,12 @@ $category_type="A" unless $category_type; # FIXME we should display a error mess
 
 my %newdata;
 if ($op eq 'insert' || $op eq 'modify' || $op eq 'save') {
-  my @names=($borrower_data?keys %$borrower_data:$input->param());
-  foreach my $key (@names){
-    $newdata{$key}=$input->param($key)||'';
-    $newdata{$key}=~ s/\"/&quot;/gg unless $key eq 'borrowernotes' or $key eq 'opacnote';
-  }
+    
+    my @names= $borrower_data && $op ne 'save' ? keys %$borrower_data : $input->param();
+    foreach my $key (@names) {
+        $newdata{$key} = $input->param($key) || '';
+        $newdata{$key} =~ s/\"/&quot;/gg unless $key eq 'borrowernotes' or $key eq 'opacnote';
+    }
 
 
   # WARN : some tests must be done whatever the step, because the librarian can click on any tab.