Lines 343-350
sub GetFullSubscription {
Link Here
|
343 |
my $sth = $dbh->prepare($query); |
343 |
my $sth = $dbh->prepare($query); |
344 |
$sth->execute($subscriptionid); |
344 |
$sth->execute($subscriptionid); |
345 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
345 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
|
|
346 |
my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if ref($subscriptions) eq 'ARRAY'; |
346 |
for my $subscription ( @$subscriptions ) { |
347 |
for my $subscription ( @$subscriptions ) { |
347 |
$subscription->{cannotedit} = not can_edit_subscription( $subscription ); |
348 |
$subscription->{cannotedit} = $cannotedit; |
348 |
} |
349 |
} |
349 |
return $subscriptions; |
350 |
return $subscriptions; |
350 |
} |
351 |
} |
Lines 502-509
sub GetFullSubscriptionsFromBiblionumber {
Link Here
|
502 |
my $sth = $dbh->prepare($query); |
503 |
my $sth = $dbh->prepare($query); |
503 |
$sth->execute($biblionumber); |
504 |
$sth->execute($biblionumber); |
504 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
505 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
|
|
506 |
my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if ref($subscriptions) eq 'ARRAY'; |
505 |
for my $subscription ( @$subscriptions ) { |
507 |
for my $subscription ( @$subscriptions ) { |
506 |
$subscription->{cannotedit} = not can_edit_subscription( $subscription ); |
508 |
$subscription->{cannotedit} = $cannotedit; |
507 |
} |
509 |
} |
508 |
return $subscriptions; |
510 |
return $subscriptions; |
509 |
} |
511 |
} |
510 |
- |
|
|