Bugzilla – Attachment 33830 Details for
Bug 13329
Can't make new suggestion with AllowPurchaseSuggestionBranchChoice turned on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13329: Fix create a suggestion at the OPAC
Bug-13329-Fix-create-a-suggestion-at-the-OPAC.patch (text/plain), 2.90 KB, created by
Jonathan Druart
on 2014-11-24 08:58:07 UTC
(
hide
)
Description:
Bug 13329: Fix create a suggestion at the OPAC
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-11-24 08:58:07 UTC
Size:
2.90 KB
patch
obsolete
>From e458851cb12dcd66308d68e3724c07a325ab1855 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 24 Nov 2014 09:54:16 +0100 >Subject: [PATCH] Bug 13329: Fix create a suggestion at the OPAC > >The suggestion table does not contain a 'branch' column name. >The script should pass 'branchcode' to C4::Suggestion::NewSuggestion. > >Test plan: >0/ Enable the AllowPurchaseSuggestionBranchChoice pref >1/ Create a suggestion at the OPAC should not raise a DBIx::Class error. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 2 +- > opac/opac-suggestions.pl | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index d20b2b7..46d0031 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -57,7 +57,7 @@ > </li> > [% IF ( branchloop ) %] > <li><label for="branch">Library:</label> >- <select name="branch" id="branch"> >+ <select name="branchcode" id="branch"> > [% FOREACH branchloo IN branchloop %] > [% IF ( branchloo.selected ) %] > <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option> >diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl >index d35f715..2d89d93 100755 >--- a/opac/opac-suggestions.pl >+++ b/opac/opac-suggestions.pl >@@ -94,7 +94,7 @@ if ( $op eq "add_confirm" ) { > $suggestion->{$suggest} = $scrubber->scrub($suggestion->{$suggest}); > } > $suggestion->{suggesteddate} = dt_from_string; >- $$suggestion{'branchcode'}= $input->param('branch') || C4::Context->userenv->{"branch"}; >+ $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"}; > > &NewSuggestion($suggestion); > # empty fields, to avoid filter in "SearchSuggestion" >@@ -149,10 +149,10 @@ if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) { > if (C4::Context->userenv && C4::Context->userenv->{'branch'}) { > $userbranch = C4::Context->userenv->{'branch'}; > } >- my $branch = $input->param('branch') || $borr->{'branchcode'} || $userbranch || '' ; >+ my $branchcode = $input->param('branchcode') || $borr->{'branchcode'} || $userbranch || '' ; > > # make branch selection options... >- my $branchloop = GetBranchesLoop($branch); >+ my $branchloop = GetBranchesLoop($branchcode); > $template->param( branchloop => $branchloop ); > } > >-- >2.1.0
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 13329
:
33830
|
33854
|
33877