Bugzilla – Attachment 46756 Details for
Bug 4941
Remove singleBranchMode system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4941: DB Changes
Bug-4940-DB-Changes.patch (text/plain), 1.47 KB, created by
Chris Cormack
on 2016-01-17 02:47:49 UTC
(
hide
)
Description:
Bug 4941: DB Changes
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2016-01-17 02:47:49 UTC
Size:
1.47 KB
patch
obsolete
>From 09a1c4bd9a11f97669039a29e846d3fadbbf06a4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 6 Jan 2016 10:41:42 +0000 >Subject: [PATCH] Bug 4940: DB Changes > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >http://bugs.koha-community.org/show_bug.cgi?id=4941 >--- > .../atomicupdate/bug_4941-remove_singleBranchMode.perl | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_4941-remove_singleBranchMode.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_4941-remove_singleBranchMode.perl b/installer/data/mysql/atomicupdate/bug_4941-remove_singleBranchMode.perl >new file mode 100644 >index 0000000..34ef9c6 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_4941-remove_singleBranchMode.perl >@@ -0,0 +1,13 @@ >+use Modern::Perl; >+use C4::Context; >+ >+my $dbh = C4::Context->dbh; >+ >+my ( $db_value ) = $dbh->selectrow_array(q|SELECT count(*) FROM branches|); >+my $pref_value = C4::Context->preference("singleBranchMode") || 0; >+if ( $db_value > 1 and $pref_value == 1 ) { >+ warn "WARNING: You have more than 1 libraries in your branches tables but the singleBranchMode system preference is on.\n"; >+ warn "This configuration does not make sense. The system preference is going to be deleted,\n"; >+ warn "and this parameter will be based on the number of libraries defined.\n"; >+} >+$dbh->do(q|DELETE FROM systempreferences WHERE variable="singleBranchMode"|); >-- >2.7.0.rc3
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 4941
:
46311
|
46312
|
46313
|
46755
|
46756
|
46757
|
47199
|
47200
|
47201
|
47202
|
48394
|
48395
|
48396
|
48397
|
48398