[Koha-patches] [PATCH] Make stickyduedate remember for session a little more permanent
Michael Hafen
mdhafen at tech.washk12.org
Wed Sep 3 00:32:52 CEST 2008
Store the stickyduedate in the session. So "Remember for Session" means
for session rather than "while on this page".
---
circ/circulation.pl | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/circ/circulation.pl b/circ/circulation.pl
index cb21c70..42aeb18 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -121,8 +121,8 @@ $printer = C4::Context->userenv->{'branchprinter'};
my $barcode = $query->param('barcode') || '';
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
-my $stickyduedate = $query->param('stickyduedate');
-my $duedatespec = $query->param('duedatespec');
+my $stickyduedate = $query->param('stickyduedate') || $session->param( 'stickyduedate' );
+my $duedatespec = $query->param('duedatespec') || $session->param( 'stickyduedate' );
my $issueconfirmed = $query->param('issueconfirmed');
my $cancelreserve = $query->param('cancelreserve');
my $organisation = $query->param('organisations');
@@ -698,7 +698,14 @@ $template->param(
);
# set return date if stickyduedate
-if ($stickyduedate) {
+if ( $stickyduedate && ! $query->param( 'stickyduedate' ) ) {
+ $session->clear( 'stickyduedate' );
+ $template->param(
+ stickyduedate => '',
+ duedatespec => '',
+ );
+} elsif ($stickyduedate) {
+ $session->param( 'stickyduedate', $duedatespec );
$template->param(
duedatespec => $duedatespec,
);
--
1.5.4.3
More information about the Koha-patches
mailing list