Bugzilla – Attachment 154060 Details for
Bug 34357
Subroutine Koha::ItemType::SUPER::imageurl redefined
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34357: Replace SUPER->imageurl in ItemTypes
Bug-34357-Replace-SUPER-imageurl-in-ItemTypes.patch (text/plain), 2.19 KB, created by
Katrin Fischer
on 2023-07-29 19:35:18 UTC
(
hide
)
Description:
Bug 34357: Replace SUPER->imageurl in ItemTypes
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-07-29 19:35:18 UTC
Size:
2.19 KB
patch
obsolete
>From 94620cabbee51e215209ea5c3e2cb77e99668825 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 24 Jul 2023 14:00:48 +0000 >Subject: [PATCH] Bug 34357: Replace SUPER->imageurl in ItemTypes > >Test plan: >Run t/db_dependent/Koha/ItemTypes.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > Koha/ItemType.pm | 2 +- > t/db_dependent/Koha/ItemTypes.t | 20 ++++++++++++++++++-- > 2 files changed, 19 insertions(+), 3 deletions(-) > >diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm >index dbbae3fbfc..18f2544604 100644 >--- a/Koha/ItemType.pm >+++ b/Koha/ItemType.pm >@@ -86,7 +86,7 @@ sub delete { > > sub image_location { > my ( $self, $interface ) = @_; >- return C4::Koha::getitemtypeimagelocation( $interface, $self->SUPER::imageurl ); >+ return C4::Koha::getitemtypeimagelocation( $interface, $self->imageurl ); > } > > =head3 translated_description >diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t >index aecd8d971b..d62cf05e48 100755 >--- a/t/db_dependent/Koha/ItemTypes.t >+++ b/t/db_dependent/Koha/ItemTypes.t >@@ -19,8 +19,7 @@ > > use Modern::Perl; > >-use Data::Dumper; >-use Test::More tests => 14; >+use Test::More tests => 15; > > use t::lib::Mocks; > use t::lib::TestBuilder; >@@ -134,4 +133,21 @@ $biblio->delete; > > is ( $item_type->can_be_deleted, 1, 'The item type that was being used by the removed item and biblioitem can now be deleted' ); > >+subtest 'image_location' => sub { >+ plan tests => 3; >+ >+ my $item_type = $builder->build_object( { class => 'Koha::ItemTypes' } ); >+ $item_type->imageurl('https://myserver.org/image01'); >+ is( $item_type->image_location, 'https://myserver.org/image01', 'Check URL' ); >+ $item_type->imageurl('bridge/newthing.png'); >+ is( >+ $item_type->image_location('opac'), '/opac-tmpl/bootstrap/itemtypeimg/bridge/newthing.png', >+ 'Check path for opac' >+ ); >+ is( >+ $item_type->image_location('intranet'), '/intranet-tmpl/prog/img/itemtypeimg/bridge/newthing.png', >+ 'Check path for intranet' >+ ); >+}; >+ > $schema->txn_rollback; >-- >2.30.2
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 34357
:
153838
|
153844
| 154060