Bugzilla – Attachment 18155 Details for
Bug 10080
Change system pref IndependantBranches to IndependentBranches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10080 - Change system pref IndependantBranches to IndependentBranches
Bug-10080---Change-system-pref-IndependantBranches.patch (text/plain), 42.21 KB, created by
Kyle M Hall (khall)
on 2013-05-15 14:11:33 UTC
(
hide
)
Description:
Bug 10080 - Change system pref IndependantBranches to IndependentBranches
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-05-15 14:11:33 UTC
Size:
42.21 KB
patch
obsolete
>From d04d0224ab85f84580a28e7c8f911ab670e6a697 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >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 <m.de.rooy@rijksmuseum.nl> >--- > 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 d11f2a9..b3c3af2 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -867,7 +867,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 = '')"; >@@ -1730,7 +1730,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 = ? >@@ -1949,7 +1949,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 ? '; >@@ -2058,7 +2058,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') "; > >@@ -2118,7 +2118,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 ca061b5..551a951 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -345,7 +345,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"), >@@ -880,7 +880,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/){ >@@ -1025,7 +1025,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 ca77452..1967bc7 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 1509c13..5770f7b 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 1de40e8..78cbeab 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 9283b5c..4ee1238 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 b8e2722..0868e1b 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -123,7 +123,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 6a30c44..3221f53 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 c8b0cdd..5ff12e4 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 e2748ff..76d3fc7 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 c55968a..bf7878b 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 f203af2..7eff6e4 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 33b061d..ce96ff3 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 55e8273..f0cfb13 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 3314f1a..79b0f65 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 7475103..a2eacef 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 5eee81b..d4f5a2c 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 1e1bd6f..4343592 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 31ecd85..9a60ec1 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 91d1f6a..29cd0b6 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 158b847..1ec6b2d 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 8576d5d..49f4ef7 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 35f575a..12b39c0 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6834,6 +6834,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > 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 4a26d79..289f5b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -61,7 +61,7 @@ > <b class="caret"></b> > </a> > <ul class="dropdown-menu" role="menu" aria-labelledby="drop3"> >- [% IF ( IndependantBranches ) %] >+ [% IF ( IndependentBranches ) %] > [% IF ( CAN_user_management || CAN_user_editcatalogue_edit_catalogue ) %] > <li> > <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index bb5c546..1215ac1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -64,7 +64,7 @@ Administration: > tmp: as temporary files. > memcached: in a memcached server. > - >- - pref: IndependantBranches >+ - pref: IndependentBranches > default: 0 > choices: > yes: Prevent >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >index 4b547c9..c0b3f99 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >@@ -49,7 +49,7 @@ > </p> > > [% IF ( AutoLocation ) %][% ELSE %] >-[% IF ( IndependantBranches ) %][% ELSE %] >+[% IF ( IndependentBranches ) %][% ELSE %] > <p><label for="branch">Library:</label> > <select name="branch" id="branch" class="input" tabindex="3"> > <option value="">My library</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >index f5e82b4..af533f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >@@ -22,7 +22,7 @@ > [% IF ( display_transfer ) %] > <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li> > [% END %] >- [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependantBranches ) %][% ELSE %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %][% END %] >+ [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependentBranches ) %][% ELSE %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %][% END %] > [% IF ( fast_cataloging ) %] > [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] > <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li> >diff --git a/mainpage.pl b/mainpage.pl >index 9085630..4159618 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -51,7 +51,7 @@ $template->param( > ); > > my $branch = >- C4::Context->preference("IndependantBranches") >+ C4::Context->preference("IndependentBranches") > && !$flags->{'superlibrarian'} > ? C4::Context->userenv()->{'branch'} > : undef; >diff --git a/members/deletemem.pl b/members/deletemem.pl >index 7a78ead..ef6ba01 100755 >--- a/members/deletemem.pl >+++ b/members/deletemem.pl >@@ -66,7 +66,7 @@ if ($bor->{category_type} eq "S") { > } > } > >-if (C4::Context->preference("IndependantBranches")) { >+if (C4::Context->preference("IndependentBranches")) { > my $userenv = C4::Context->userenv; > if (($userenv->{flags} % 2 != 1) && $bor->{'branchcode'}){ > unless ($userenv->{branch} eq $bor->{'branchcode'}){ >diff --git a/members/memberentry.pl b/members/memberentry.pl >index d2b701d..d5a3ffb 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -292,7 +292,7 @@ if ($op eq 'save' || $op eq 'insert'){ > $newdata{'surname'} = uc($newdata{'surname'}); > } > >- if (C4::Context->preference("IndependantBranches")) { >+ if (C4::Context->preference("IndependentBranches")) { > if ($userenv && $userenv->{flags} % 2 != 1){ > $debug and print STDERR " $newdata{'branchcode'} : ".$userenv->{flags}.":".$userenv->{branch}; > unless (!$newdata{'branchcode'} || $userenv->{branch} eq $newdata{'branchcode'}){ >@@ -422,7 +422,7 @@ if ($nok or !$nodouble){ > $template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); > } > } >-if (C4::Context->preference("IndependantBranches")) { >+if (C4::Context->preference("IndependentBranches")) { > my $userenv = C4::Context->userenv; > if ($userenv->{flags} % 2 != 1 && $data{'branchcode'}){ > unless ($userenv->{branch} eq $data{'branchcode'}){ >diff --git a/members/members-update.pl b/members/members-update.pl >index 334d83b..0b39552 100755 >--- a/members/members-update.pl >+++ b/members/members-update.pl >@@ -42,7 +42,7 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( > ); > > my $branch = >- C4::Context->preference("IndependantBranches") >+ C4::Context->preference("IndependentBranches") > && !$flags->{'superlibrarian'} > ? C4::Context->userenv()->{'branch'} > : undef; >diff --git a/members/moremember.pl b/members/moremember.pl >index 2e5c66a..1cd6c05 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -212,7 +212,7 @@ $bor{'borrowernumber'} = $borrowernumber; > > # Converts the branchcode to the branch name > my $samebranch; >-if ( C4::Context->preference("IndependantBranches") ) { >+if ( C4::Context->preference("IndependentBranches") ) { > my $userenv = C4::Context->userenv; > unless ( $userenv->{flags} % 2 == 1 ) { > $samebranch = ( $data->{'branchcode'} eq $userenv->{branch} ); >@@ -338,7 +338,7 @@ my $candeleteuser; > my $userenv = C4::Context->userenv; > if($userenv->{flags} % 2 == 1){ > $candeleteuser = 1; >-}elsif ( C4::Context->preference("IndependantBranches") ) { >+}elsif ( C4::Context->preference("IndependentBranches") ) { > $candeleteuser = ( $data->{'branchcode'} eq $userenv->{branch} ); > }else{ > if( C4::Auth::getuserflags( $userenv->{flags},$userenv->{number})->{borrowers} ) { >diff --git a/reserve/request.pl b/reserve/request.pl >index 7f3f423..54f2755 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -426,7 +426,7 @@ foreach my $biblionumber (@biblionumbers) { > > # if independent branches is on we need to check if the person can reserve > # for branches they arent logged in to >- if ( C4::Context->preference("IndependantBranches") ) { >+ if ( C4::Context->preference("IndependentBranches") ) { > if (! C4::Context->preference("canreservefromotherbranches")){ > # cant reserve items so need to check if item homebranch and userenv branch match if not we cant reserve > my $userenv = C4::Context->userenv; >diff --git a/serials/member-search.pl b/serials/member-search.pl >index ecbb94f..17c19d5 100755 >--- a/serials/member-search.pl >+++ b/serials/member-search.pl >@@ -82,7 +82,7 @@ if (defined $member) { > > my ($count,$results); > >-if (C4::Context->preference("IndependantBranches")){ >+if (C4::Context->preference("IndependentBranches")){ > if (C4::Context->userenv && C4::Context->userenv->{flags} % 2 !=1 && C4::Context->userenv->{'branch'}){ > $$patron{branchcode}=C4::Context->userenv->{'branch'}; > } >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 10bccd1..1959b23 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -120,7 +120,7 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > } > } > >-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/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 8bfee43..fc57d89 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -162,7 +162,7 @@ $template->param( > routing => C4::Context->preference("RoutingSerials"), > totalissues => $totalissues, > hemisphere => $hemisphere, >- cannotedit =>(C4::Context->preference('IndependantBranches') && >+ cannotedit =>(C4::Context->preference('IndependentBranches') && > C4::Context->userenv && > C4::Context->userenv->{flags} % 2 !=1 && > C4::Context->userenv->{branch} && $subs->{branchcode} && >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index b4f4d37..4788266 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -276,7 +276,7 @@ if(defined($returnsuggested) and $returnsuggested ne "noone") > > #branch display management > my $branchfilter = ($displayby ne "branchcode") ? $input->param('branchcode') : ''; >-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/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 58c0d37..634ac0c 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -29,7 +29,7 @@ my $PHONE = "555-12123"; > # XXX should be randomised and checked against the database > my $IMPOSSIBLE_CARDNUMBER = "XYZZZ999"; > >-my $INDEPENDENT_BRANCHES_PREF = 'IndependantBranches'; >+my $INDEPENDENT_BRANCHES_PREF = 'IndependentBranches'; > > # XXX make a non-commit transaction and rollback rather than insert/delete > >diff --git a/t/db_dependent/lib/KohaTest/Acquisition.pm b/t/db_dependent/lib/KohaTest/Acquisition.pm >index e7618c9..c859038 100644 >--- a/t/db_dependent/lib/KohaTest/Acquisition.pm >+++ b/t/db_dependent/lib/KohaTest/Acquisition.pm >@@ -119,7 +119,7 @@ sub enable_independant_branches { > ); > > # set a preference. There's surely a method for this, but I can't find it. >- my $retval = C4::Context->dbh->do( q(update systempreferences set value = '1' where variable = 'IndependantBranches') ); >+ my $retval = C4::Context->dbh->do( q(update systempreferences set value = '1' where variable = 'IndependentBranches') ); > ok( $retval, 'set the preference' ); > > ok( C4::Context->userenv, 'usernev' ); >@@ -133,7 +133,7 @@ sub enable_independant_branches { > sub disable_independant_branches { > my $self = shift; > >- my $retval = C4::Context->dbh->do( q(update systempreferences set value = '0' where variable = 'IndependantBranches') ); >+ my $retval = C4::Context->dbh->do( q(update systempreferences set value = '0' where variable = 'IndependentBranches') ); > ok( $retval, 'set the preference back' ); > > >diff --git a/t/db_dependent/lib/KohaTest/Acquisition/GetHistory.pm b/t/db_dependent/lib/KohaTest/Acquisition/GetHistory.pm >index a2c0ed2..8191723 100644 >--- a/t/db_dependent/lib/KohaTest/Acquisition/GetHistory.pm >+++ b/t/db_dependent/lib/KohaTest/Acquisition/GetHistory.pm >@@ -180,7 +180,7 @@ sub one_order : Test( 55 ) { > is( $total_qtyreceived, 0, 'total_qtyreceived searched by from_date' ); > } > >- # set up some things necessary to make GetHistory use the IndependantBranches >+ # set up some things necessary to make GetHistory use the IndependentBranches > $self->enable_independant_branches(); > > # just search by title here, we need to search by something. >diff --git a/t/db_dependent/lib/KohaTest/Acquisition/GetLateOrders.pm b/t/db_dependent/lib/KohaTest/Acquisition/GetLateOrders.pm >index a2f95ea..cc7fdaa 100644 >--- a/t/db_dependent/lib/KohaTest/Acquisition/GetLateOrders.pm >+++ b/t/db_dependent/lib/KohaTest/Acquisition/GetLateOrders.pm >@@ -80,7 +80,7 @@ sub one_order : Test( 29 ) { > or diag( Data::Dumper->Dump( [ \@orders ], [ 'orders' ] ) ); > } > >- # set up some things necessary to make GetLateOrders use the IndependantBranches >+ # set up some things necessary to make GetLateOrders use the IndependentBranches > $self->enable_independant_branches(); > > { >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index e416d44..c299487 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -318,7 +318,7 @@ foreach my $tag (sort keys %{$tagslib}) { > $value =~ s/DD/$day/g; > } > $subfield_data{visibility} = "display:none;" if (($tagslib->{$tag}->{$subfield}->{hidden} > 4) || ($tagslib->{$tag}->{$subfield}->{hidden} < -4)); >- # testing branch value if IndependantBranches. >+ # testing branch value if IndependentBranches. > > my $attributes_no_value = qq(tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" ); > my $attributes = qq($attributes_no_value value="$value" ); >@@ -492,7 +492,7 @@ sub BuildItemsData{ > foreach my $field (grep {$_->tag() eq $itemtagfield} $itemmarc->fields()) { > # loop through each subfield > my $itembranchcode=$field->subfield($branchtagsubfield); >- if ($itembranchcode && C4::Context->preference("IndependantBranches")) { >+ if ($itembranchcode && C4::Context->preference("IndependentBranches")) { > #verifying rights > my $userenv = C4::Context->userenv(); > unless (($userenv->{'flags'} == 1) or (($userenv->{'branch'} eq $itembranchcode))){ >diff --git a/tools/export.pl b/tools/export.pl >index d634419..0e05e3a 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -118,13 +118,13 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( > ); > > my $limit_ind_branch = >- ( C4::Context->preference('IndependantBranches') >+ ( C4::Context->preference('IndependentBranches') > && C4::Context->userenv > && !( C4::Context->userenv->{flags} & 1 ) > && C4::Context->userenv->{branch} ) ? 1 : 0; > > my $branch = $query->param("branch") || ''; >-if ( C4::Context->preference("IndependantBranches") >+if ( C4::Context->preference("IndependentBranches") > && C4::Context->userenv > && !( C4::Context->userenv->{flags} & 1 ) ) > { >diff --git a/tools/holidays.pl b/tools/holidays.pl >index bb04988..38c889d 100755 >--- a/tools/holidays.pl >+++ b/tools/holidays.pl >@@ -57,7 +57,7 @@ $keydate =~ s/-/\//g; > > my $branch= $input->param('branch') || C4::Context->userenv->{'branch'}; > # Set all the branches. >-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}?1:0); >diff --git a/tools/letter.pl b/tools/letter.pl >index 68c6701..7582e66 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -106,7 +106,7 @@ our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user > } > ); > >-our $my_branch = C4::Context->preference("IndependantBranches") && !$staffflags->{'superlibrarian'} >+our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'} > ? C4::Context->userenv()->{'branch'} > : undef; > # we show only the TMPL_VAR names $op >-- >1.7.2.5
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 10080
:
17556
|
17588
|
18044
|
18155
|
18273
|
18307
|
18308