Bugzilla – Attachment 16653 Details for
Bug 9117
Reports hierarchies management improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9117: Add imageurl to the list of parameters of AddAuthorisedValue
Bug-9117-Add-imageurl-to-the-list-of-parameters-of.patch (text/plain), 2.78 KB, created by
Julian Maurice
on 2013-03-21 14:49:07 UTC
(
hide
)
Description:
Bug 9117: Add imageurl to the list of parameters of AddAuthorisedValue
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2013-03-21 14:49:07 UTC
Size:
2.78 KB
patch
obsolete
>From feeab4e185593d1dbb727a1f647cebe40de86e14 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 21 Mar 2013 14:47:37 +0000 >Subject: [PATCH] Bug 9117: Add imageurl to the list of parameters of AddAuthorisedValue > >and add unit test in t/db_dependant/Koha.t >--- > C4/Koha.pm | 10 +++++----- > t/db_dependent/Koha.t | 8 +++----- > 2 files changed, 8 insertions(+), 10 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 13ab94a..6869ab0 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -1229,22 +1229,22 @@ sub GetKohaAuthorisedValueLib { > > =head2 AddAuthorisedValue > >- AddAuthorisedValue($category, $authorised_value, $lib, $lib_opac); >+ AddAuthorisedValue($category, $authorised_value, $lib, $lib_opac, $imageurl); > > Create a new authorised value. > > =cut > > sub AddAuthorisedValue { >- my ($category, $authorised_value, $lib, $lib_opac) = @_; >+ my ($category, $authorised_value, $lib, $lib_opac, $imageurl) = @_; > > my $dbh = C4::Context->dbh; > my $query = qq{ >- INSERT INTO authorised_values (category, authorised_value, lib, lib_opac) >- VALUES (?,?,?,?) >+ INSERT INTO authorised_values (category, authorised_value, lib, lib_opac, imageurl) >+ VALUES (?,?,?,?,?) > }; > my $sth = $dbh->prepare($query); >- $sth->execute($category, $authorised_value, $lib, $lib_opac); >+ $sth->execute($category, $authorised_value, $lib, $lib_opac, $imageurl); > } > > =head2 display_marc_indicators >diff --git a/t/db_dependent/Koha.t b/t/db_dependent/Koha.t >index aea5245..1a68c7d 100644 >--- a/t/db_dependent/Koha.t >+++ b/t/db_dependent/Koha.t >@@ -32,9 +32,7 @@ subtest 'Authorized Values Tests' => sub { > > > # Insert an entry into authorised_value table >- my $query = "INSERT INTO authorised_values (category, authorised_value, lib, lib_opac, imageurl) VALUES (?,?,?,?,?);"; >- my $sth = $dbh->prepare($query); >- my $insert_success = $sth->execute($data->{category}, $data->{authorised_value}, $data->{lib}, $data->{lib_opac}, $data->{imageurl}); >+ my $insert_success = AddAuthorisedValue($data->{category}, $data->{authorised_value}, $data->{lib}, $data->{lib_opac}, $data->{imageurl}); > ok($insert_success, "Insert data in database"); > > >@@ -57,8 +55,8 @@ subtest 'Authorized Values Tests' => sub { > > # Clean up > if($insert_success){ >- $query = "DELETE FROM authorised_values WHERE category=? AND authorised_value=? AND lib=? AND lib_opac=? AND imageurl=?;"; >- $sth = $dbh->prepare($query); >+ my $query = "DELETE FROM authorised_values WHERE category=? AND authorised_value=? AND lib=? AND lib_opac=? AND imageurl=?;"; >+ my $sth = $dbh->prepare($query); > $sth->execute($data->{category}, $data->{authorised_value}, $data->{lib}, $data->{lib_opac}, $data->{imageurl}); > } > }; >-- >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 9117
:
13560
|
13578
|
13597
|
13627
|
13628
|
13931
|
14668
|
14669
|
14670
|
16241
|
16244
|
16246
|
16270
|
16271
|
16282
|
16283
|
16284
|
16285
|
16286
|
16287
|
16288
|
16290
|
16292
|
16293
|
16294
|
16295
|
16296
| 16653