Bugzilla – Attachment 24391 Details for
Bug 6739
expired patrons not blocked from opac actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6739: FIX conflicts with some others bugs.
Bug-6739-FIX-conflicts-with-some-others-bugs.patch (text/plain), 5.53 KB, created by
Jonathan Druart
on 2014-01-15 11:06:46 UTC
(
hide
)
Description:
Bug 6739: FIX conflicts with some others bugs.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-15 11:06:46 UTC
Size:
5.53 KB
patch
obsolete
>From c1b861508d151e6651283e8015a52431f19d35db Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 15 Jan 2014 11:38:38 +0100 >Subject: [PATCH] Bug 6739: FIX conflicts with some others bugs. > >see comments 86 and 88. This patch fixes a bad conflict resolution in a >previous patch. >--- > installer/data/mysql/updatedatabase.pl | 37 ++++++++++++++++---------------- > opac/opac-user.pl | 17 ++++++++++----- > 2 files changed, 30 insertions(+), 24 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d17b947..dcebd7b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7130,7 +7130,6 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >- > $DBversion = "3.13.00.020"; > if ( CheckVersion($DBversion) ) { > $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo')"); >@@ -7139,24 +7138,6 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >- >-$DBversion = "3.13.00.XXX"; >-if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >- $dbh->do(" >- INSERT INTO systempreferences (variable,value,explanation,options,type) >- VALUES ( >- 'BlockExpiredPatronOpacActions', >- '1', >- 'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis', >- NULL, >- 'YesNo' >- ) >- "); >- $dbh->do("ALTER TABLE `categories` ADD COLUMN `BlockExpiredPatronOpacActions` TINYINT(1) DEFAULT -1 NOT NULL AFTER category_type"); >- print "Upgraded to $DBversion done (Bug 6739 - expired patrons not blocked from opac actions)\n"; >- SetVersion ($DBversion); >-} >- > $DBversion ="3.13.00.021"; > if ( CheckVersion($DBversion) ) { > $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ConfirmFutureHolds','0','Number of days for confirming future holds','','Integer');"); >@@ -7930,6 +7911,24 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do(" >+ INSERT INTO systempreferences (variable,value,explanation,options,type) >+ VALUES ( >+ 'BlockExpiredPatronOpacActions', >+ '1', >+ 'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis', >+ NULL, >+ 'YesNo' >+ ) >+ "); >+ $dbh->do("ALTER TABLE `categories` ADD COLUMN `BlockExpiredPatronOpacActions` TINYINT(1) DEFAULT -1 NOT NULL AFTER category_type"); >+ print "Upgraded to $DBversion done (Bug 6739 - expired patrons not blocked from opac actions)\n"; >+ SetVersion ($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 2cad002..38c5801 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -64,7 +64,11 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0; >+my $show_priority; >+for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { >+ m/priority/ and $show_priority = 1; >+} >+ > my $patronupdate = $query->param('patronupdate'); > my $canrenew = 1; > >@@ -106,6 +110,7 @@ if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstandi > $canrenew = 0; > $template->param( > renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), >+ renewal_blocked_fines_amountoutstanding => sprintf( '%.02f', $borr->{amountoutstanding} ), > ); > } > >@@ -158,7 +163,7 @@ my $issues = GetPendingIssues($borrowernumber); > if ($issues){ > foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) { > # check for reserves >- my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} ); >+ my $restype = GetReserveStatus( $issue->{'itemnumber'} ); > if ( $restype ) { > $issue->{'reserved'} = 1; > } >@@ -170,6 +175,8 @@ if ($issues){ > $charges += $ac->{'amountoutstanding'} > if $ac->{'accounttype'} eq 'F'; > $charges += $ac->{'amountoutstanding'} >+ if $ac->{'accounttype'} eq 'FU'; >+ $charges += $ac->{'amountoutstanding'} > if $ac->{'accounttype'} eq 'L'; > } > } >@@ -259,8 +266,8 @@ foreach my $res (@reserves) { > $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'}; > my $biblioData = GetBiblioData($res->{'biblionumber'}); > $res->{'reserves_title'} = $biblioData->{'title'}; >- if ($OPACDisplayRequestPriority) { >- $res->{'priority'} = '' if $res->{'priority'} eq '0'; >+ if ($show_priority) { >+ $res->{'priority'} ||= ''; > } > $res->{'suspend_until'} = C4::Dates->new( $res->{'suspend_until'}, "iso")->output("syspref") if ( $res->{'suspend_until'} ); > } >@@ -270,7 +277,7 @@ foreach my $res (@reserves) { > > $template->param( RESERVES => \@reserves ); > $template->param( reserves_count => $#reserves+1 ); >-$template->param( showpriority=>1 ) if $OPACDisplayRequestPriority; >+$template->param( showpriority=>$show_priority ); > > my @waiting; > my $wcount = 0; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6739
:
7814
|
9108
|
16061
|
16063
|
16064
|
16065
|
16069
|
16071
|
16072
|
17356
|
17357
|
17463
|
17464
|
17466
|
17517
|
17518
|
17907
|
17908
|
17909
|
18041
|
18042
|
18043
|
19553
|
19554
|
19555
|
19558
|
19559
|
19560
|
19678
|
19679
|
19993
|
19994
|
19995
|
19996
|
19997
|
20641
|
20642
|
20643
|
20644
|
20645
|
21312
|
21313
|
21314
|
21315
|
21316
|
21317
|
24385
|
24386
|
24387
|
24388
|
24389
|
24390
|
24391
|
24392
|
25158
|
25159
|
25160
|
25161
|
25162
|
25163
|
25164
|
25165
|
25231
|
25232
|
25233
|
26546
|
26547
|
26548
|
26549
|
26550
|
26551
|
26552
|
26553
|
26836
|
26837
|
26838
|
26839
|
26840
|
26841
|
26842
|
26843