Lines 75-80
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
75 |
if ( $op eq "renew" ) { |
75 |
if ( $op eq "renew" ) { |
76 |
# Do not use this script with op=renew and @subscriptionids > 1! |
76 |
# Do not use this script with op=renew and @subscriptionids > 1! |
77 |
my $subscriptionid = $subscriptionids[0]; |
77 |
my $subscriptionid = $subscriptionids[0]; |
|
|
78 |
# Make sure the subscription exists |
79 |
my $subscription = GetSubscription( $subscriptionid ); |
80 |
output_and_exit( $query, $cookie, $template, 'unknown_subscription') unless $subscription; |
78 |
my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); |
81 |
my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); |
79 |
ReNewSubscription( |
82 |
ReNewSubscription( |
80 |
$subscriptionid, $loggedinuser, |
83 |
$subscriptionid, $loggedinuser, |
Lines 95-100
if ( $op eq "renew" ) {
Link Here
|
95 |
} else { |
98 |
} else { |
96 |
my $subscriptionid = $subscriptionids[0]; |
99 |
my $subscriptionid = $subscriptionids[0]; |
97 |
my $subscription = GetSubscription($subscriptionid); |
100 |
my $subscription = GetSubscription($subscriptionid); |
|
|
101 |
output_and_exit( $query, $cookie, $template, 'unknown_subscription') unless $subscription; |
98 |
if ($subscription->{'cannotedit'}){ |
102 |
if ($subscription->{'cannotedit'}){ |
99 |
carp "Attempt to renew subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed"; |
103 |
carp "Attempt to renew subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed"; |
100 |
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); |
104 |
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); |
101 |
- |
|
|