diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 45e964df5d..14692729ac 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -727,7 +727,7 @@ sub CanBookBeIssued { my $userenv = C4::Context->userenv; if ( ($userenv) && ( $userenv->{flags} != 1 ) ) { $issuingimpossible{NOTSAMEBRANCH} = 1 - if ( $item->{'holdingbranch'} ne $userenv->{branch} ); + if ( $item->{C4::Context->preference("HomeOrHoldingbranch")} ne $userenv->{branch} ); } } diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index d5e199694e..f49ac06387 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -61,6 +61,7 @@ my %tabsysprefs; $tabsysprefs{dateformat}="Admin"; $tabsysprefs{delimiter}="Admin"; $tabsysprefs{IndependantBranches}="Admin"; + $tabsysprefs{HomeOrHoldingBranch}="Admin"; $tabsysprefs{insecure}="Admin"; $tabsysprefs{KohaAdmin}="Admin"; $tabsysprefs{KohaAdminEmailAddress}="Admin"; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 34d03ce7e7..f308fde381 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -561,6 +561,38 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.023"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('yuipath','http://yui.yahooapis.com/2.3.1/build','Insert the path to YUI libraries','','free')"); + print "Upgrade to $DBversion done (adding new system preference for controlling YUI path)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.00.00.024"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE biblioitems CHANGE itemtype itemtype VARCHAR(10)"); + print "Upgrade to $DBversion done (changing itemtype to (10))\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.00.00.025"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE items ADD COLUMN itype VARCHAR(10)"); + if(C4::Context->preference('item-level_itypes')){ + $dbh->do('update items,biblioitems set items.itype=biblioitems.itemtype where items.biblionumber=biblioitems.biblionumber and itype is null'); + } + print "Upgrade to $DBversion done (reintroduce items.itype - fill from itemtype)\n "; + SetVersion ($DBversion); +} + +$DBversion = "3.00.00.026"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) + VALUES ('HomeOrHoldingBranch','homebranch','homebranch|holdingbranch','With independent branches turned on this decides whether to check the items holdingbranch or homebranch at circulatilon','choice')"); + print "Upgrade to $DBversion done (adding new system preference for choosing whether homebranch or holdingbranch is checked in circulation)\n"; + SetVersion ($DBversion); +} =item DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index abda80caec..fc3fcde19e 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -8,7 +8,7 @@ # and is automatically called by Auth.pm when needed. sub kohaversion { - return "3.00.00.025"; + return "3.00.00.026"; } 1;