Bugzilla – Attachment 23103 Details for
Bug 10904
Limit patron modification request management by branch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10904 [QA Followup] - would like to limit patron update request management by branch
Bug-10904-QA-Followup---would-like-to-limit-patron.patch (text/plain), 4.74 KB, created by
Kyle M Hall (khall)
on 2013-11-22 18:51:18 UTC
(
hide
)
Description:
Bug 10904 [QA Followup] - would like to limit patron update request management by branch
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-11-22 18:51:18 UTC
Size:
4.74 KB
patch
obsolete
>From e4bb95fe7b1d477fc5123117b0f666eecac352df Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 22 Nov 2013 13:50:38 -0500 >Subject: [PATCH] Bug 10904 [QA Followup] - would like to limit patron update request management by branch > >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 10 ++++++++++ > .../prog/en/modules/admin/preferences/admin.pref | 7 +++++++ > mainpage.pl | 8 +++++--- > members/members-update.pl | 7 ++++--- > 5 files changed, 27 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index a07103a..a541448 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -136,6 +136,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'), > ('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'), > ('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'), >+('IndependentBranchesPatronModifications',0, NULL, 'Show only modification request for the logged in branch','YesNo'), > ('InProcessingToShelvingCart','0','','If set, when any item with a location code of PROC is \'checked in\', it\'s location code will be changed to CART.','YesNo'), > ('INTRAdidyoumean',NULL,NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), > ('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index e6f54f9..235f26b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7762,6 +7762,16 @@ if ( CheckVersion($DBversion) ) { > SetVersion ($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if(CheckVersion($DBversion)) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) >+ VALUES ('IndependentBranchesPatronModifications',0,'Show only modification request for the logged in branch','','YesNo') >+ }); >+ print "Upgrade to $DBversion done (Bug 10904 - would like to limit patron update request management by branch)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index 1215ac1..f43052b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -70,6 +70,13 @@ Administration: > yes: Prevent > no: "Don't prevent" > - staff (but not superlibrarians) from modifying objects (holds, items, patrons, etc.) belonging to other libraries. >+ - >+ - pref: IndependentBranchesPatronModifications >+ default: 0 >+ choices: >+ yes: Prevent >+ no: "Don't prevent" >+ - staff (but not superlibrarians) from viewing and approving/denying patron modification requests for patrons belonging to other libraries. > CAS Authentication: > - > - pref: casAuthentication >diff --git a/mainpage.pl b/mainpage.pl >index 3401495..708c800 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -50,9 +50,11 @@ $template->param( > koha_news_count => $koha_news_count > ); > >-my $branch = $flags->{'superlibrarian'} >- ? undef >- : C4::Context->userenv()->{'branch'}; >+my $branch = >+ C4::Context->preference("IndependentBranchesPatronModifications") >+ && !$flags->{'superlibrarian'} >+ ? C4::Context->userenv()->{'branch'} >+ : undef; > > my $pendingcomments = numberofreviews(0); > my $pendingtags = get_count_by_tag_status(0); >diff --git a/members/members-update.pl b/members/members-update.pl >index c8526ab..ee1f7ee 100755 >--- a/members/members-update.pl >+++ b/members/members-update.pl >@@ -42,9 +42,10 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( > ); > > my $branch = >- $flags->{'superlibrarian'} >- ? undef >- : C4::Context->userenv()->{'branch'}; >+ C4::Context->preference("IndependentBranchesPatronModifications") >+ && !$flags->{'superlibrarian'} >+ ? C4::Context->userenv()->{'branch'} >+ : undef; > > my $pending_modifications = > Koha::Borrower::Modifications->GetPendingModifications($branch); >-- >1.7.2.5
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 10904
:
21950
|
22494
|
23103
|
23104
|
25467
|
25468
|
27253
|
27254
|
27255
|
27256
|
36959
|
36960
|
36961
|
42599
|
42600
|
42601