Bugzilla – Attachment 46696 Details for
Bug 15295
Move the C4::Branch related code to Koha::Libraries - part 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 15295: (follow-up) Koha::Libraries - Remove GetBranchesCount
SIGNED-OFF-Bug-15295-follow-up-KohaLibraries---Rem.patch (text/plain), 2.09 KB, created by
Nick Clemens (kidclamp)
on 2016-01-15 13:51:18 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 15295: (follow-up) Koha::Libraries - Remove GetBranchesCount
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-01-15 13:51:18 UTC
Size:
2.09 KB
patch
obsolete
>From 8f7892329af5ea1d164bcbca615905e3c7c09800 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 15 Jan 2016 09:35:26 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 15295: (follow-up) Koha::Libraries - Remove > GetBranchesCount > >Fix conflict with bug 11625 > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > admin/smart-rules.pl | 3 ++- > tools/overduerules.pl | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 9c903da..ff8c67a 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -30,6 +30,7 @@ use Koha::DateUtils; > use Koha::Database; > use Koha::IssuingRule; > use Koha::IssuingRules; >+use Koha::Libraries; > > my $input = CGI->new; > my $dbh = C4::Context->dbh; >@@ -49,7 +50,7 @@ my $type=$input->param('type'); > > my $branch; > if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) { >- $branch = $input->param('branch') || GetBranchesCount() == 1 ? undef : C4::Branch::mybranch(); >+ $branch = $input->param('branch') || Koha::Libraries->search->count() == 1 ? undef : C4::Branch::mybranch(); > } > else { > $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' ); >diff --git a/tools/overduerules.pl b/tools/overduerules.pl >index 5657b19..369ac9c 100755 >--- a/tools/overduerules.pl >+++ b/tools/overduerules.pl >@@ -28,6 +28,7 @@ use C4::Branch; > use C4::Letters; > use C4::Members; > use C4::Overdues; >+use Koha::Libraries; > > our $input = new CGI; > my $dbh = C4::Context->dbh; >@@ -76,7 +77,7 @@ my $branch = $input->param('branch'); > $branch = > defined $branch ? $branch > : C4::Context->preference('DefaultToLoggedInLibraryOverdueTriggers') ? C4::Branch::mybranch() >- : GetBranchesCount() == 1 ? undef >+ : Koha::Libraries->search->count() == 1 ? undef > : undef; > $branch ||= q{}; > $branch = q{} if $branch eq 'NO_LIBRARY_SET'; >-- >2.1.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 15295
:
45368
|
45369
|
45370
|
45371
|
45372
|
45373
|
45374
|
45375
|
45752
|
45754
|
45755
|
45756
|
45757
|
45760
|
45763
|
45764
|
45765
|
45924
|
45925
|
45926
|
45927
|
45928
|
45929
|
45930
|
45931
|
46684
| 46696