From: Dobrica Pavlinusic Date: Sun, 14 Nov 2010 12:55:36 +0000 (+0100) Subject: add links to biblio and biblioitems X-Git-Url: http://git.rot13.org/?p=NoSQL-toys.git;a=commitdiff_plain;h=258ea9ebd2bb0f1d24d6659abae617f3a1fe97f4 add links to biblio and biblioitems --- diff --git a/koha/koha2riak-search.pl b/koha/koha2riak-search.pl index 0d7df0b..be3d145 100755 --- a/koha/koha2riak-search.pl +++ b/koha/koha2riak-search.pl @@ -60,8 +60,12 @@ while(1) { # warn "## $key ",dump($row); my $headers; - $headers->{Link} = qq|; riaktag="biblio"| - if $biblionumber && $key !~ m/biblionumber/; + foreach my $reference ( qw(biblio biblioitem) ) { + my $col = $reference . 'number'; + next if $key =~ m/$col/; + my $number = $row->{$col} || next; + push @{ $headers->{Link} }, qq|; riaktag="$reference"|; + } $riak->request( 'PUT' => "/koha.$table/$key", $row, $headers ); }