Bugzilla – Attachment 16171 Details for
Bug 9457
Ordering branches should be case independent (2)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9457 - Followup - Ordering branches should be case independent (2)
Bug-9457---Followup---Ordering-branches-should-be-.patch (text/plain), 3.27 KB, created by
Bernardo Gonzalez Kriegel
on 2013-03-15 20:36:32 UTC
(
hide
)
Description:
Bug 9457 - Followup - Ordering branches should be case independent (2)
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-03-15 20:36:32 UTC
Size:
3.27 KB
patch
obsolete
>From 10898fdb29584b5f3f596066c5170d11838be5b5 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Fri, 15 Mar 2013 17:05:26 -0300 >Subject: [PATCH] Bug 9457 - Followup - Ordering branches should be case > independent (2) > >This follow up reinstates or add check for undef returned >by C4::Context->userenv, only where previous patch touch >code. >--- > members/memberentry.pl | 6 +++++- > opac/opac-suggestions.pl | 6 +++++- > reports/itemtypes.plugin | 11 +++++++---- > reserve/request.pl | 6 +++++- > 4 files changed, 22 insertions(+), 7 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 79f1f93..6b0e846 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -572,7 +572,11 @@ foreach (keys(%flags)) { > # in modify mod: userbranch value for GetBranchesLoop() comes from borrowers table > # in add mod: userbranch value come from branches table (ip correspondence) > >-my $userbranch = C4::Context->userenv->{'branch'}; >+my $userbranch = ''; >+if (C4::Context->userenv && C4::Context->userenv->{'branch'}) { >+ $userbranch = C4::Context->userenv->{'branch'}; >+} >+ > if (defined ($data{'branchcode'}) and ( $op eq 'modify' || ( $op eq 'add' && $category_type eq 'C' ) )) { > $userbranch = $data{'branchcode'}; > } >diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl >index 1b353fd..32b5c3d 100755 >--- a/opac/opac-suggestions.pl >+++ b/opac/opac-suggestions.pl >@@ -128,7 +128,11 @@ if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) { > my ( $borr ) = GetMemberDetails( $borrowernumber ); > > # pass the pickup branch along.... >- my $branch = $input->param('branch') || $borr->{'branchcode'} || C4::Context->userenv->{branch} || '' ; >+ my $userbranch = ''; >+ if (C4::Context->userenv && C4::Context->userenv->{'branch'}) { >+ $userbranch = C4::Context->userenv->{'branch'}; >+ } >+ my $branch = $input->param('branch') || $borr->{'branchcode'} || $userbranch || '' ; > > # make branch selection options... > my $branchloop = GetBranchesLoop($branch); >diff --git a/reports/itemtypes.plugin b/reports/itemtypes.plugin >index 388649f..e4164a5 100755 >--- a/reports/itemtypes.plugin >+++ b/reports/itemtypes.plugin >@@ -31,10 +31,13 @@ use C4::Branch; # GetBranches > =cut > > sub set_parameters { >- my ($template) = @_; >- my $userbranch = C4::Context->userenv->{'branch'}; >- $template->param( branchloop => GetBranchesLoop($userbranch) ); >- return $template; >+ my ($template) = @_; >+ my $userbranch = ''; >+ if (C4::Context->userenv && C4::Context->userenv->{'branch'}) { >+ $userbranch = C4::Context->userenv->{'branch'}; >+ } >+ $template->param( branchloop => GetBranchesLoop($userbranch) ); >+ return $template; > } > > sub calculate { >diff --git a/reserve/request.pl b/reserve/request.pl >index f8e26a2..5bcaca2 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -65,7 +65,11 @@ my $showallitems = $input->param('showallitems'); > my $branches = GetBranches(); > my $itemtypes = GetItemTypes(); > >-my $userbranch = C4::Context->userenv->{branch}; >+my $userbranch = ''; >+if (C4::Context->userenv && C4::Context->userenv->{'branch'}) { >+ $userbranch = C4::Context->userenv->{'branch'}; >+} >+ > > # Select borrowers infos > my $findborrower = $input->param('findborrower'); >-- >1.7.9.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 9457
:
14787
|
15184
|
16171
|
16209
|
16210