Bugzilla – Attachment 43552 Details for
Bug 10363
Move authorised value related code into its own package
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10363: [QA Followup]
PASSED-QA-Bug-10363-QA-Followup.patch (text/plain), 2.20 KB, created by
Katrin Fischer
on 2015-10-18 09:02:40 UTC
(
hide
)
Description:
[PASSED QA] Bug 10363: [QA Followup]
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-10-18 09:02:40 UTC
Size:
2.20 KB
patch
obsolete
>From a8f68074774e61941d9caff0aec52c893ff6fa21 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 24 Nov 2014 07:48:02 -0500 >Subject: [PATCH] [PASSED QA] Bug 10363: [QA Followup] > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > Koha/AuthorisedValues.pm | 2 +- > admin/authorised_values.pl | 8 +++++--- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/Koha/AuthorisedValues.pm b/Koha/AuthorisedValues.pm >index ec201c3..55c7266 100644 >--- a/Koha/AuthorisedValues.pm >+++ b/Koha/AuthorisedValues.pm >@@ -63,7 +63,7 @@ sub search { > ->search( { %$params, %$or, }, $join ); > > my $class = ref($self); >- return wantarray ? $self->_wrap( $rs->all() ) : $class->new_from_dbic($rs); >+ return wantarray ? $self->_wrap( $rs->all() ) : $class->_new_from_dbic($rs); > } > > sub categories { >diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl >index 022348e..1cf683d 100755 >--- a/admin/authorised_values.pl >+++ b/admin/authorised_values.pl >@@ -101,7 +101,7 @@ if ($op eq 'add_form') { > my $imageurl = $input->param( 'imageurl' ) || ''; > $imageurl = '' if $imageurl =~ /removeImage/; > my $duplicate_entry = 0; >- my @branches = $input->param('branches'); >+ my @branches = grep { $_ ne q{} } $input->param('branches'); > > if ( $id ) { # Update > my $av = Koha::AuthorisedValues->new->find( $id ); >@@ -113,7 +113,7 @@ if ($op eq 'add_form') { > $av->imageurl( $imageurl ); > eval{ > $av->store; >- $av->branch_limitations( \@branches ); >+ $av->replace_branch_limitations( \@branches ); > }; > if ( $@ ) { > push @messages, {type => 'error', code => 'error_on_update' }; >@@ -129,10 +129,12 @@ if ($op eq 'add_form') { > lib_opac => $input->param('lib_opac') || undef, > imageurl => $imageurl, > } ); >+ > eval { > $av->store; >- $av->branch_limitations( \@branches ); >+ $av->replace_branch_limitations( \@branches ); > }; >+ > if ( $@ ) { > push @messages, {type => 'error', code => 'error_on_insert' }; > } else { >-- >1.9.1
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 10363
:
18430
|
18431
|
18432
|
18751
|
18752
|
18753
|
20729
|
21833
|
21834
|
21835
|
21836
|
25284
|
25285
|
25286
|
25287
|
30583
|
30584
|
30585
|
30710
|
30711
|
30712
|
31565
|
32632
|
32633
|
32634
|
33416
|
33417
|
33422
|
33423
|
33860
|
33861
|
33862
|
33889
|
33949
|
35838
|
35839
|
35840
|
35841
|
41290
|
41291
|
41292
|
41293
|
41294
|
41302
|
41343
|
41344
|
41345
|
43112
|
43113
|
43114
|
43550
|
43551
| 43552 |
43553
|
43554
|
43555
|
43556
|
43557
|
43558
|
43559
|
43696
|
43827