Bugzilla – Attachment 3399 Details for
Bug 5880
C4/Koha.pm : adding two functions GetAuthorisedValueByCode and GetKohaImageurlFromAuthorisedValues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Follow-up patch to correct error in pod
0001-Bug-5880-Correct-misleading-pod-in-new-subroutine.patch (text/plain), 2.12 KB, created by
Colin Campbell
on 2011-03-22 15:25:39 UTC
(
hide
)
Description:
Follow-up patch to correct error in pod
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2011-03-22 15:25:39 UTC
Size:
2.12 KB
patch
obsolete
>From 6dfeb767434d5de7786e524800a1a92cc7d66695 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Tue, 22 Mar 2011 15:21:20 +0000 >Subject: [PATCH] Bug 5880: Correct misleading pod in new subroutine >Content-Type: text/plain; charset="utf-8" > >Also remove some whitespace noise from prev commit >--- > C4/Koha.pm | 23 ++++++++++++----------- > 1 files changed, 12 insertions(+), 11 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 2f94aa0..974afcc 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -57,8 +57,8 @@ BEGIN { > &GetKohaAuthorisedValues > &GetKohaAuthorisedValuesFromField > &GetKohaAuthorisedValueLib >- &GetAuthorisedValueByCode >- &GetKohaImageurlFromAuthorisedValues >+ &GetAuthorisedValueByCode >+ &GetKohaImageurlFromAuthorisedValues > &GetAuthValCode > &GetNormalizedUPC > &GetNormalizedISBN >@@ -957,9 +957,9 @@ sub GetKohaImageurlFromAuthorisedValues { > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare("SELECT imageurl FROM authorised_values WHERE category=? AND lib =?"); > $sth->execute( $category, $lib ); >- while ( my $data = $sth->fetchrow_hashref ) { >- return $data->{'imageurl'}; >- } >+ while ( my $data = $sth->fetchrow_hashref ) { >+ return $data->{'imageurl'}; >+ } > } > > =head2 GetAuthValCode >@@ -1060,19 +1060,20 @@ sub GetAuthorisedValueCategories { > > $authhorised_value = GetAuthorisedValueByCode( $category, $authvalcode ); > >-Return an hashref of the authorised value represented by $authvalcode. >+Return the lib attribute from authorised_values from the row identified >+by the passed category and code > > =cut > > sub GetAuthorisedValueByCode { >- my ( $category, $authvalcode ) = @_; >- >+ my ( $category, $authvalcode ) = @_; >+ > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare("SELECT lib FROM authorised_values WHERE category=? AND authorised_value =?"); > $sth->execute( $category, $authvalcode ); >- while ( my $data = $sth->fetchrow_hashref ) { >- return $data->{'lib'}; >- } >+ while ( my $data = $sth->fetchrow_hashref ) { >+ return $data->{'lib'}; >+ } > } > > =head2 GetKohaAuthorisedValues >-- >1.7.4 >
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 5880
:
3318
|
3336
|
3340
| 3399