[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/serials subscription-renew.pl
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/serials subscription-renew.pl |
Date: |
Tue, 05 Jun 2007 08:46:18 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: Antoine Farnault <toins> 07/06/05 08:46:18
Modified files:
serials : subscription-renew.pl
Log message:
re-indenting + redirecting to subscription-detail.pl after a renewal.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-renew.pl?cvsroot=koha&r1=1.9&r2=1.10
Patches:
Index: subscription-renew.pl
===================================================================
RCS file: /sources/koha/koha/serials/subscription-renew.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- subscription-renew.pl 29 May 2007 16:54:50 -0000 1.9
+++ subscription-renew.pl 5 Jun 2007 08:46:18 -0000 1.10
@@ -18,7 +18,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: subscription-renew.pl,v 1.9 2007/05/29 16:54:50 hdl Exp $
+# $Id: subscription-renew.pl,v 1.10 2007/06/05 08:46:18 toins Exp $
=head1 NAME
@@ -45,7 +45,6 @@
=cut
-
use strict;
require Exporter;
use CGI;
@@ -64,22 +63,35 @@
my $op = $query->param('op');
my $subscriptionid = $query->param('subscriptionid');
my $done = 0; # for after form has been submitted
-my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name =>
"serials/subscription-renew.tmpl",
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "serials/subscription-renew.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {serials => 1},
+ flagsrequired => { serials => 1 },
debug => 1,
- });
-if ($op eq "renew") {
-
ReNewSubscription($subscriptionid,$loggedinuser,$query->param('startdate'),$query->param('numberlength'),$query->param('weeklength'),$query->param('monthlength'),$query->param('note'));
- $done = 1;
+ }
+);
+
+if ( $op eq "renew" ) {
+ ReNewSubscription(
+ $subscriptionid, $loggedinuser,
+ $query->param('startdate'), $query->param('numberlength'),
+ $query->param('weeklength'), $query->param('monthlength'),
+ $query->param('note')
+ );
+
$query->redirect('/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid='.$subscriptionid);
+ exit;
}
-my $subscription= GetSubscription($subscriptionid);
+my $subscription = GetSubscription($subscriptionid);
-$template->param(startdate =>
format_date(GetExpirationDate($subscriptionid)||POSIX::strftime("%Y-%m-%d",localtime)),
+$template->param(
+ startdate => format_date(
+ GetExpirationDate($subscriptionid)
+ || POSIX::strftime( "%Y-%m-%d", localtime )
+ ),
numberlength => $subscription->{numberlength},
weeklength => $subscription->{weeklength},
monthlength => $subscription->{monthlength},
@@ -87,10 +99,7 @@
bibliotitle => $subscription->{bibliotitle},
$op => 1,
done => $done,
- intranetcolorstylesheet =>
C4::Context->preference("intranetcolorstylesheet"),
- intranetstylesheet =>
C4::Context->preference("intranetstylesheet"),
- IntranetNav => C4::Context->preference("IntranetNav"),
- );
+);
# Print the page
output_html_with_http_headers $query, $cookie, $template->output;
- [Koha-cvs] koha/serials subscription-renew.pl,
Antoine Farnault <=