X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=authorities%2Fysearch.pl;h=65841232f9b7069ea199a38a2cc96c132ade0ce7;hb=a51aa4f546c5ca0dc7363b2cbbe77a903ee32f96;hp=1f7e5efcced7be121df5eda8be0a62badb128be1;hpb=6e60986819e9c37e3d41584b89fbddbf68e7484d;p=koha_fer diff --git a/authorities/ysearch.pl b/authorities/ysearch.pl index 1f7e5efcce..65841232f9 100755 --- a/authorities/ysearch.pl +++ b/authorities/ysearch.pl @@ -66,14 +66,15 @@ if ( $auth_status ne "ok" ) { print "["; my $i = 0; - foreach (@$results) { + foreach my $result (@$results) { if($i > 0){ print ","; } - my ($value) = $_->{'summary'}; - # Removes new lines - $value =~ s/
/ /g; - $value =~ s/\n//g; - $value = "{\"summary\":\"" . $value . "\"" . "}"; + my $value = ''; + my $authorized = $result->{'summary'}->{'authorized'}; + foreach my $heading (@$authorized) { + $value .= $heading->{'heading'} . ' '; + } + $value = "{\"summary\":\"" . $value . "\"" . "}"; print nsb_clean($value) . "\n"; $i++; } -print "]"; \ No newline at end of file +print "]";