From 0e1ea3ef817ac58a4894f3e3328b15b8d6bcb649 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 22 Mar 2011 15:24:06 +0000 Subject: [PATCH] Bug 5880: Correct misleading pod in new subroutine Also remove some whitespace noise from prev commit Signed-off-by: Chris Cormack --- C4/Koha.pm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 2f94aa07e5..974afcc697 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 -- 2.39.5