projects
/
NoSQL-toys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9881f01
)
add links to biblio and biblioitems
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 14 Nov 2010 12:55:36 +0000
(13:55 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 14 Nov 2010 12:55:36 +0000
(13:55 +0100)
koha/koha2riak-search.pl
patch
|
blob
|
history
diff --git
a/koha/koha2riak-search.pl
b/koha/koha2riak-search.pl
index
0d7df0b
..
be3d145
100755
(executable)
--- a/
koha/koha2riak-search.pl
+++ b/
koha/koha2riak-search.pl
@@
-60,8
+60,12
@@
while(1) {
# warn "## $key ",dump($row);
my $headers;
# warn "## $key ",dump($row);
my $headers;
- $headers->{Link} = qq|</riak/koha.biblio/$biblionumber>; 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|</riak/koha.$reference/$number>; riaktag="$reference"|;
+ }
$riak->request( 'PUT' => "/koha.$table/$key", $row, $headers );
}
$riak->request( 'PUT' => "/koha.$table/$key", $row, $headers );
}