From b00ec06968e6377c61523e72e0a49e6c9f8bf8b8 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 15 May 2013 10:10:10 -0400 Subject: [PATCH] Bug 10080 - Change system pref IndependantBranches to IndependentBranches Test Plan: 1) Enable IndependantBranches 2) Apply this patch 3) Run updatedatabase.pl 4) Verify that the system preference still functions correctly Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- C4/Acquisition.pm | 10 +++++----- C4/Auth.pm | 6 +++--- C4/Boolean.pm | 2 +- C4/Branch.pm | 4 ++-- C4/Circulation.pm | 2 +- C4/Items.pm | 6 +++--- C4/Letters.pm | 2 +- C4/Members.pm | 8 ++++---- C4/Reserves.pm | 2 +- C4/Serials.pm | 14 +++++++------- C4/Suggestions.pm | 6 +++--- acqui/basket.pl | 4 ++-- acqui/neworderempty.pl | 2 +- catalogue/moredetail.pl | 2 +- cataloguing/addbiblio.pl | 2 +- cataloguing/additem.pl | 4 ++-- circ/circulation-home.pl | 2 +- circ/overdue.pl | 2 +- circ/pendingreserves.pl | 2 +- circ/reserveratios.pl | 2 +- circ/waitingreserves.pl | 2 +- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/includes/header.inc | 2 +- .../prog/en/modules/admin/preferences/admin.pref | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 2 +- .../prog/en/modules/circ/circulation-home.tt | 2 +- mainpage.pl | 2 +- members/deletemem.pl | 2 +- members/memberentry.pl | 4 ++-- members/members-update.pl | 2 +- members/moremember.pl | 4 ++-- reserve/request.pl | 2 +- serials/member-search.pl | 2 +- serials/subscription-add.pl | 2 +- serials/subscription-detail.pl | 2 +- suggestion/suggestion.pl | 2 +- t/db_dependent/Members.t | 2 +- t/db_dependent/lib/KohaTest/Acquisition.pm | 4 ++-- .../lib/KohaTest/Acquisition/GetHistory.pm | 2 +- .../lib/KohaTest/Acquisition/GetLateOrders.pm | 2 +- tools/batchMod.pl | 4 ++-- tools/export.pl | 4 ++-- tools/holidays.pl | 2 +- tools/letter.pl | 2 +- 45 files changed, 78 insertions(+), 71 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index a570a7358b..02dfb280fe 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -870,7 +870,7 @@ sub GetPendingOrders { AND datecancellationprinted IS NULL"; my @query_params; my $userenv = C4::Context->userenv; - if ( C4::Context->preference("IndependantBranches") ) { + if ( C4::Context->preference("IndependentBranches") ) { if ( ($userenv) && ( $userenv->{flags} != 1 ) ) { $strsth .= " AND (borrowers.branchcode = ? or borrowers.branchcode = '')"; @@ -1733,7 +1733,7 @@ sub GetParcel { AND aqorders.datereceived = ? "; my @query_params = ( $supplierid, $code, $datereceived ); - if ( C4::Context->preference("IndependantBranches") ) { + if ( C4::Context->preference("IndependentBranches") ) { my $userenv = C4::Context->userenv; if ( ($userenv) && ( $userenv->{flags} != 1 ) ) { $strsth .= " and (borrowers.branchcode = ? @@ -1952,7 +1952,7 @@ sub GetLateOrders { if ( defined $estimateddeliverydatefrom and not defined $estimateddeliverydateto ) { $from .= ' AND ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) <= CAST(now() AS date)'; } - if (C4::Context->preference("IndependantBranches") + if (C4::Context->preference("IndependentBranches") && C4::Context->userenv && C4::Context->userenv->{flags} != 1 ) { $from .= ' AND borrowers.branchcode LIKE ? '; @@ -2061,7 +2061,7 @@ sub GetHistory { LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid"; $query .= " LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber" - if ( C4::Context->preference("IndependantBranches") ); + if ( C4::Context->preference("IndependentBranches") ); $query .= " WHERE (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') "; @@ -2121,7 +2121,7 @@ sub GetHistory { push @query_params, "%$basketgroupname%"; } - if ( C4::Context->preference("IndependantBranches") ) { + if ( C4::Context->preference("IndependentBranches") ) { my $userenv = C4::Context->userenv; if ( $userenv && ($userenv->{flags} || 0) != 1 ) { $query .= " AND (borrowers.branchcode = ? OR borrowers.branchcode ='' ) "; diff --git a/C4/Auth.pm b/C4/Auth.pm index ee180305fd..9dba387e92 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -338,7 +338,7 @@ sub get_template_and_user { CalendarFirstDayOfWeek => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1, CircAutocompl => C4::Context->preference("CircAutocompl"), FRBRizeEditions => C4::Context->preference("FRBRizeEditions"), - IndependantBranches => C4::Context->preference("IndependantBranches"), + IndependentBranches => C4::Context->preference("IndependentBranches"), IntranetNav => C4::Context->preference("IntranetNav"), IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), LibraryName => C4::Context->preference("LibraryName"), @@ -873,7 +873,7 @@ sub checkauth { $branchname = GetBranchName($branchcode); } my $branches = GetBranches(); - if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){ + if (C4::Context->boolean_preference('IndependentBranches') && C4::Context->boolean_preference('Autolocation')){ # we have to check they are coming from the right ip range my $domain = $branches->{$branchcode}->{'branchip'}; if ($ip !~ /^$domain/){ @@ -1018,7 +1018,7 @@ sub checkauth { IntranetNav => C4::Context->preference("IntranetNav"), IntranetFavicon => C4::Context->preference("IntranetFavicon"), intranetuserjs => C4::Context->preference("intranetuserjs"), - IndependantBranches=> C4::Context->preference("IndependantBranches"), + IndependentBranches=> C4::Context->preference("IndependentBranches"), AutoLocation => C4::Context->preference("AutoLocation"), wrongip => $info{'wrongip'}, PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), diff --git a/C4/Boolean.pm b/C4/Boolean.pm index ca77452d7f..1967bc71da 100644 --- a/C4/Boolean.pm +++ b/C4/Boolean.pm @@ -67,7 +67,7 @@ our %strings = ( =item true_p - if ( C4::Boolean::true_p(C4::Context->preference("IndependantBranches")) ) { + if ( C4::Boolean::true_p(C4::Context->preference("IndependentBranches")) ) { ... } diff --git a/C4/Branch.pm b/C4/Branch.pm index 1509c1302f..5770f7ba17 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -69,7 +69,7 @@ The functions in this module deal with branches. $branches = &GetBranches(); -Returns informations about ALL branches, IndependantBranches Insensitive. +Returns informations about ALL branches, IndependentBranches Insensitive. GetBranchInfo() returns the same information without the problems of this function (namespace collision, mainly). @@ -143,7 +143,7 @@ sub GetBranches { sub onlymine { return - C4::Context->preference('IndependantBranches') && + C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} %2 != 1 && C4::Context->userenv->{branch} ; diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 1de40e8665..78cbeab3da 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -887,7 +887,7 @@ sub CanBookBeIssued { $needsconfirmation{ITEM_LOST} = $code if ( C4::Context->preference("IssueLostItem") eq 'confirm' ); $alerts{ITEM_LOST} = $code if ( C4::Context->preference("IssueLostItem") eq 'alert' ); } - if ( C4::Context->preference("IndependantBranches") ) { + if ( C4::Context->preference("IndependentBranches") ) { my $userenv = C4::Context->userenv; if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) { $issuingimpossible{ITEMNOTSAMEBRANCH} = 1 diff --git a/C4/Items.pm b/C4/Items.pm index 2d2c62ce94..212a9d35a7 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1253,7 +1253,7 @@ sub GetItemsInfo { $data->{firstname} = $idata->{firstname}; $data->{lastreneweddate} = $idata->{lastreneweddate}; $datedue = $idata->{'date_due'}; - if (C4::Context->preference("IndependantBranches")){ + if (C4::Context->preference("IndependentBranches")){ my $userenv = C4::Context->userenv; if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) { $data->{'NOTSAMEBRANCH'} = 1 if ($idata->{'bcode'} ne $userenv->{branch}); @@ -2214,7 +2214,7 @@ sub DelItemCheck { $error = "book_on_loan" } elsif ( !( C4::Context->userenv->{flags} & 1 ) - and C4::Context->preference("IndependantBranches") + and C4::Context->preference("IndependentBranches") and ( C4::Context->userenv->{branch} ne $item->{'homebranch'} ) ) { $error = "not_same_branch"; @@ -2689,7 +2689,7 @@ sub PrepareItemrecordDisplay { # builds list, depending on authorised value... #---- branch if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) { - if ( ( C4::Context->preference("IndependantBranches") ) + if ( ( C4::Context->preference("IndependentBranches") ) && ( C4::Context->userenv->{flags} % 2 != 1 ) ) { my $sth = $dbh->prepare( "SELECT branchcode,branchname FROM branches WHERE branchcode = ? ORDER BY branchname" ); $sth->execute( C4::Context->userenv->{branch} ); diff --git a/C4/Letters.pm b/C4/Letters.pm index ff5b4419b9..0349efe6c1 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -128,7 +128,7 @@ sub getletter { $branchcode ||= ''; - if ( C4::Context->preference('IndependantBranches') + if ( C4::Context->preference('IndependentBranches') and $branchcode and C4::Context->userenv ) { diff --git a/C4/Members.pm b/C4/Members.pm index 6a30c440f4..3221f5333a 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -256,7 +256,7 @@ sub Search { # $showallbranches was not used at the time SearchMember() was mainstreamed into Search(). # Mentioning for the reference - if ( C4::Context->preference("IndependantBranches") ) { # && !$showallbranches){ + if ( C4::Context->preference("IndependentBranches") ) { # && !$showallbranches){ if ( my $userenv = C4::Context->userenv ) { my $branch = $userenv->{'branch'}; if ( ($userenv->{flags} % 2 !=1) && $branch ){ @@ -2042,7 +2042,7 @@ sub GetBorrowersToExpunge { my $filterexpiry = $params->{'expired_before'}; my $filtercategory = $params->{'category_code'}; my $filterbranch = $params->{'branchcode'} || - ((C4::Context->preference('IndependantBranches') + ((C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{branch}) @@ -2108,7 +2108,7 @@ I<$result> is a ref to an array which all elements are a hasref. sub GetBorrowersWhoHaveNeverBorrowed { my $filterbranch = shift || - ((C4::Context->preference('IndependantBranches') + ((C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{branch}) @@ -2158,7 +2158,7 @@ sub GetBorrowersWithIssuesHistoryOlderThan { my $dbh = C4::Context->dbh; my $date = shift ||POSIX::strftime("%Y-%m-%d",localtime()); my $filterbranch = shift || - ((C4::Context->preference('IndependantBranches') + ((C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{branch}) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index c8b0cdda47..5ff12e44ec 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1419,7 +1419,7 @@ be the target of an item-level hold request. Note that IsAvailableForItemLevelRequest() does not check if the staff operator is authorized to place a request on the item - in particular, -this routine does not check IndependantBranches +this routine does not check IndependentBranches and canreservefromotherbranches. =cut diff --git a/C4/Serials.pm b/C4/Serials.pm index e2748ff92f..76d3fc7e5e 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -216,7 +216,7 @@ sub GetSerialInformation { my $dbh = C4::Context->dbh; my $query = qq| SELECT serial.*, serial.notes as sernotes, serial.status as serstatus,subscription.*,subscription.subscriptionid as subsid |; - if ( C4::Context->preference('IndependantBranches') + if ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{'flags'} != 1 && C4::Context->userenv->{'branch'} ) { @@ -321,7 +321,7 @@ sub GetSubscription { aqbooksellers.name AS aqbooksellername, biblio.title AS bibliotitle, subscription.biblionumber as bibnum); - if ( C4::Context->preference('IndependantBranches') + if ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{'flags'} != 1 && C4::Context->userenv->{'branch'} ) { @@ -336,7 +336,7 @@ sub GetSubscription { WHERE subscription.subscriptionid = ? ); - # if (C4::Context->preference('IndependantBranches') && + # if (C4::Context->preference('IndependentBranches') && # C4::Context->userenv && # C4::Context->userenv->{'flags'} != 1){ # # $debug and warn "flags: ".C4::Context->userenv->{'flags'}; @@ -370,7 +370,7 @@ sub GetFullSubscription { biblio.title as bibliotitle, subscription.branchcode AS branchcode, subscription.subscriptionid AS subscriptionid |; - if ( C4::Context->preference('IndependantBranches') + if ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{'flags'} != 1 && C4::Context->userenv->{'branch'} ) { @@ -490,7 +490,7 @@ sub GetSubscriptionsFromBiblionumber { $subs->{ "numberpattern" . $subs->{numberpattern} } = 1; $subs->{ "status" . $subs->{'status'} } = 1; $subs->{'cannotedit'} = - ( C4::Context->preference('IndependantBranches') + ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 != 1 && C4::Context->userenv->{branch} @@ -530,7 +530,7 @@ sub GetFullSubscriptionsFromBiblionumber { biblio.title as bibliotitle, subscription.branchcode AS branchcode, subscription.subscriptionid AS subscriptionid|; - if ( C4::Context->preference('IndependantBranches') + if ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{'flags'} != 1 && C4::Context->userenv->{'branch'} ) { @@ -630,7 +630,7 @@ sub GetSubscriptions { while ( my $line = $sth->fetchrow_hashref ) { $line->{'cannotedit'} = - ( C4::Context->preference('IndependantBranches') + ( C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 != 1 && C4::Context->userenv->{branch} diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index c55968a29c..bf7878bb19 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -132,7 +132,7 @@ sub SearchSuggestion { } # filter on user branch - if ( C4::Context->preference('IndependantBranches') ) { + if ( C4::Context->preference('IndependentBranches') ) { my $userenv = C4::Context->userenv; if ($userenv) { if ( ( $userenv->{flags} % 2 ) != 1 && !$suggestion->{branchcode} ) @@ -339,7 +339,7 @@ sub GetSuggestionByStatus { }; # filter on branch - if ( C4::Context->preference("IndependantBranches") || $branchcode ) { + if ( C4::Context->preference("IndependentBranches") || $branchcode ) { my $userenv = C4::Context->userenv; if ($userenv) { unless ( $userenv->{flags} % 2 == 1 ) { @@ -389,7 +389,7 @@ sub CountSuggestion { my $dbh = C4::Context->dbh; my $sth; my $userenv = C4::Context->userenv; - if ( C4::Context->preference("IndependantBranches") + if ( C4::Context->preference("IndependentBranches") && $userenv->{flags} % 2 != 1 ) { my $query = q{ diff --git a/acqui/basket.pl b/acqui/basket.pl index f203af2517..7eff6e465e 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -103,7 +103,7 @@ if ( $op eq 'delete_confirm' ) { $template->param( NO_BOOKSELLER => 1 ); } elsif ( $op eq 'del_basket') { $template->param( delete_confirm => 1 ); - if ( C4::Context->preference("IndependantBranches") ) { + if ( C4::Context->preference("IndependentBranches") ) { my $userenv = C4::Context->userenv; unless ( $userenv->{flags} == 1 ) { my $validtest = ( $basket->{creationdate} eq '' ) @@ -192,7 +192,7 @@ if ( $op eq 'delete_confirm' ) { print $query->redirect('/cgi-bin/koha/acqui/basket.pl?basketno='.$basket->{'basketno'}) } else { # get librarian branch... - if ( C4::Context->preference("IndependantBranches") ) { + if ( C4::Context->preference("IndependentBranches") ) { my $userenv = C4::Context->userenv; unless ( $userenv->{flags} == 1 ) { my $validtest = ( $basket->{creationdate} eq '' ) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 33b061d3a0..ce96ff39b2 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -229,7 +229,7 @@ for my $curr ( @rates ) { } # build branches list -my $onlymine=C4::Context->preference('IndependantBranches') && +my $onlymine=C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags}!=1 && C4::Context->userenv->{branch}; diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 55e827320f..f0cfb13a9f 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -172,7 +172,7 @@ foreach my $item (@items){ $item->{status_advisory} = 1; } - if (C4::Context->preference("IndependantBranches")) { + if (C4::Context->preference("IndependentBranches")) { #verifying rights my $userenv = C4::Context->userenv(); unless (($userenv->{'flags'} == 1) or ($userenv->{'branch'} eq $item->{'homebranch'})) { diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index fdbacd4902..3a5b7c5f82 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -172,7 +172,7 @@ sub build_authorized_values_list { #---- branch if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) { #Use GetBranches($onlymine) - my $onlymine=C4::Context->preference('IndependantBranches') && + my $onlymine=C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 == 0 && C4::Context->userenv->{branch}; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 7475103681..a2eacef883 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -689,7 +689,7 @@ foreach my $field (@fields) { || $subfieldvalue; } - if (($field->tag eq $branchtagfield) && ($subfieldcode eq $branchtagsubfield) && C4::Context->preference("IndependantBranches")) { + if (($field->tag eq $branchtagfield) && ($subfieldcode eq $branchtagsubfield) && C4::Context->preference("IndependentBranches")) { #verifying rights my $userenv = C4::Context->userenv(); unless (($userenv->{'flags'} == 1) or (($userenv->{'branch'} eq $subfieldvalue))){ @@ -750,7 +750,7 @@ my $i=0; my $pref_itemcallnumber = C4::Context->preference('itemcallnumber'); -my $onlymine = C4::Context->preference('IndependantBranches') && +my $onlymine = C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags}!=1 && C4::Context->userenv->{branch}; diff --git a/circ/circulation-home.pl b/circ/circulation-home.pl index 5eee81be28..d4f5a2c069 100755 --- a/circ/circulation-home.pl +++ b/circ/circulation-home.pl @@ -38,7 +38,7 @@ my $fa = getframeworkinfo('FA'); $template->param( fast_cataloging => 1 ) if (defined $fa); # Checking if the transfer page needs to be displayed -$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependantBranches") == 0) ); +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/circ/overdue.pl b/circ/overdue.pl index 1e1bd6f216..4343592e5a 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -91,7 +91,7 @@ while (my ($itemtype, $description) =$req->fetchrow) { itemtypename => $description, }; } -my $onlymine=C4::Context->preference('IndependantBranches') && +my $onlymine=C4::Context->preference('IndependentBranches') && C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{branch}; diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 31ecd85612..9a60ec187b 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -151,7 +151,7 @@ if ( $run_report ) { # multiple patrons have a hold on an item - if (C4::Context->preference('IndependantBranches')){ + if (C4::Context->preference('IndependentBranches')){ $strsth .= " AND items.holdingbranch=? "; push @query_params, C4::Context->userenv->{'branch'}; } diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index 91d1f6a266..29cd0b6033 100755 --- a/circ/reserveratios.pl +++ b/circ/reserveratios.pl @@ -113,7 +113,7 @@ my $strsth = $sqldatewhere "; -if (C4::Context->preference('IndependantBranches')){ +if (C4::Context->preference('IndependentBranches')){ $strsth .= " AND items.holdingbranch=? "; push @query_params, C4::Context->userenv->{'branch'}; } diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 158b847e05..1ec6b2d3fa 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -73,7 +73,7 @@ if ($item) { push @cancel_result, $res if $res; } -if ( C4::Context->preference('IndependantBranches') ) { +if ( C4::Context->preference('IndependentBranches') ) { undef $all_branches; } else { $template->param( all_branches_link => $input->url . '?allbranches=1' ) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 126f40aa82..817b9f8589 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -31,7 +31,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependentBranches',0,'If ON, increases security between libraries',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','normal|marc|isbd|labeled_marc','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('intranetcolorstylesheet','','Define the color stylesheet to use in the Staff Client','50','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetmainUserblock','','Add a block of HTML that will display on the intranet home page','70|10','Textarea'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 61c0de0d88..1de26a9b98 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6935,6 +6935,13 @@ INSERT INTO permissions (module_bit, code, description) VALUES SetVersion($DBversion); } +$DBversion = "3.11.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("UPDATE systempreferences SET variable = 'IndependentBranches' WHERE variable = 'IndependantBranches'"); + print "Upgrade to $DBversion done (Bug 10080 - Change system pref IndependantBranches to IndependentBranches)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index dd480440fc..194a0f9b93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -64,7 +64,7 @@