From 6e9132d7f5e8b21ac124edae9e8319dbb0a3f119 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 Content-Type: text/plain; charset=utf-8 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 --- C4/Breeding.pm | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 7125cb2..293b933 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' ) { -- 1.7.7.6