Bugzilla – Attachment 9398 Details for
Bug 7970
Allow OPAC holds per library policy without default rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Update the database as follow-up to Bug 5795
0001-Update-the-database-as-follow-up-to-Bug-5795.patch (text/plain), 2.36 KB, created by
Amit Gupta
on 2012-05-03 12:26:35 UTC
(
hide
)
Description:
Update the database as follow-up to Bug 5795
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2012-05-03 12:26:35 UTC
Size:
2.36 KB
patch
obsolete
>From 5ae4ce6bc451e85181753e81e602e01521155aa3 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@osslabs.biz> >Date: Thu, 3 May 2012 17:51:21 +0530 >Subject: [PATCH] Update the database as follow-up to Bug 5795 > >If value is not exist it insert other wise update the >existing value. >To Test: >1) Go to mysql use koha database >2) select * from systempreferences where variable = 'ReservesControlBranch'; >3) Show old result if value is present other wise it shows >+-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ >| variable | value | options | explanation | type | >+-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ >| ReservesControlBranch | ItemHomeLibrary | ItemHomeLibrary|PatronLibrary | Branch checked for members reservations rights. | Choice | >+-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ >--- > installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ > 1 files changed, 12 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 84f0437..839613e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5212,6 +5212,18 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.08.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ if (C4::Context->preference('ReservesControlBranch')){ >+ my $sth = $dbh->prepare("UPDATE systempreferences SET value = ? WHERE variable = 'ReservesControlBranch'"); >+ $sth->execute(C4::Context->preference('ReservesControlBranch')); >+ }else{ >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','ItemHomeLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights.','Choice')"); >+ } >+ print "Upgrade to $DBversion done (Insert/Update ReservesControlBranch systempreference into systempreferences table )\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.6.4.2 >
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 7970
:
9223
|
9224
|
9393
|
9398
|
9450