Bug 15797: Remove C4::Koha::GetKohaImageurlFromAuthorisedValues
This subroutine is no longer in used and can be remove. Test plan: git grep GetKohaImageurlFromAuthorisedValues should not return any results. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
parent
f4241d1a49
commit
b1ea7d7068
20
C4/Koha.pm
20
C4/Koha.pm
|
|
@ -65,7 +65,6 @@ BEGIN {
|
|||
&GetKohaAuthorisedValuesMapping
|
||||
&GetKohaAuthorisedValueLib
|
||||
&GetAuthorisedValueByCode
|
||||
&GetKohaImageurlFromAuthorisedValues
|
||||
&GetAuthValCode
|
||||
&AddAuthorisedValue
|
||||
&GetNormalizedUPC
|
||||
|
|
@ -1077,25 +1076,6 @@ sub displayServers {
|
|||
return \@primaryserverloop;
|
||||
}
|
||||
|
||||
|
||||
=head2 GetKohaImageurlFromAuthorisedValues
|
||||
|
||||
$authhorised_value = GetKohaImageurlFromAuthorisedValues( $category, $authvalcode );
|
||||
|
||||
Return the first url of the authorised value image represented by $lib.
|
||||
|
||||
=cut
|
||||
|
||||
sub GetKohaImageurlFromAuthorisedValues {
|
||||
my ( $category, $lib ) = @_;
|
||||
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'};
|
||||
}
|
||||
}
|
||||
|
||||
=head2 GetAuthValCode
|
||||
|
||||
$authvalcode = GetAuthValCode($kohafield,$frameworkcode);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ $dbh->{AutoCommit} = 0;
|
|||
$dbh->{RaiseError} = 1;
|
||||
|
||||
subtest 'Authorized Values Tests' => sub {
|
||||
plan tests => 8;
|
||||
plan tests => 7;
|
||||
|
||||
my $data = {
|
||||
category => 'CATEGORY',
|
||||
|
|
@ -39,10 +39,9 @@ subtest 'Authorized Values Tests' => sub {
|
|||
|
||||
# Tests
|
||||
SKIP: {
|
||||
skip "INSERT failed", 5 unless $insert_success;
|
||||
skip "INSERT failed", 4 unless $insert_success;
|
||||
|
||||
is ( GetAuthorisedValueByCode($data->{category}, $data->{authorised_value}), $data->{lib}, "GetAuthorisedValueByCode" );
|
||||
is ( GetKohaImageurlFromAuthorisedValues($data->{category}, $data->{lib}), $data->{imageurl}, "GetKohaImageurlFromAuthorisedValues" );
|
||||
|
||||
my $sortdet=C4::Members::GetSortDetails("lost", "3");
|
||||
is ($sortdet, "Lost and Paid For", "lost and paid works");
|
||||
|
|
|
|||
Loading…
Reference in New Issue