From a06b1ac7285a6922e35141deeeada099be4962d5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 21 Aug 2014 14:47:06 +0200 Subject: [PATCH] Bug 6536: [QA Follow-up] Remove surrounding spaces in sru_fields This patch only removes surrouding spaces at comma and equals-sign while passing the options in sru_fields to the ZOOM object. Test plan: If you add spaces between options in sru_fields, searching should still work. E.g. sru_fields= sru = get , sru_version = 1.1 Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- C4/Breeding.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 7125cb2132..293b933336 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -360,7 +360,10 @@ sub _create_connection { if( $server->{servertype} eq 'sru' ) { foreach( split ',', $server->{sru_options}//'' ) { - my @temp= split '='; + #first remove surrounding spaces at comma and equals-sign + s/^\s+|\s+$//g; + my @temp= split '=', $_, 2; + @temp= map { s/^\s+|\s+$//g; $_; } @temp; $option1->option( $temp[0] => $temp[1] ) if @temp; } } elsif( $server->{servertype} eq 'zed' ) { -- 2.39.5