Bugzilla – Attachment 163003 Details for
Bug 19605
ILL backends should be pluggable through regular Koha plugins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19605: Update expandTemplate to expand_template method name
Bug-19605-Update-expandTemplate-to-expandtemplate-.patch (text/plain), 4.27 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-03-09 13:08:10 UTC
(
hide
)
Description:
Bug 19605: Update expandTemplate to expand_template method name
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-03-09 13:08:10 UTC
Size:
4.27 KB
patch
obsolete
>From 387511aeacd60fca3a2dc25f2e4c1f6d022fd6a9 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 30 Oct 2023 12:22:52 +0000 >Subject: [PATCH] Bug 19605: Update expandTemplate to expand_template method > name > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Illrequest.pm | 24 ++++++++++++------------ > t/db_dependent/Illrequests.t | 6 +++--- > 2 files changed, 15 insertions(+), 15 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 95f61b3de46..5ca6c2644c0 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -760,7 +760,7 @@ sub custom_capability { > request => $self, > other => $params, > }); >- return $self->expandTemplate($response); >+ return $self->expand_template($response); > } > } > return 0; >@@ -825,7 +825,7 @@ sub backend_illview { > request => $self, > other => $params, > }); >- return $self->expandTemplate($response) if $response; >+ return $self->expand_template($response) if $response; > return $response; > } > >@@ -843,7 +843,7 @@ sub backend_migrate { > request => $self, > other => $params, > }); >- return $self->expandTemplate($response) if $response; >+ return $self->expand_template($response) if $response; > return $response; > } > >@@ -868,7 +868,7 @@ sub backend_confirm { > request => $self, > other => $params, > }); >- return $self->expandTemplate($response); >+ return $self->expand_template($response); > } > > =head3 backend_update_status >@@ -877,7 +877,7 @@ sub backend_confirm { > > sub backend_update_status { > my ( $self, $params ) = @_; >- return $self->expandTemplate($self->_backend->update_status($params)); >+ return $self->expand_template($self->_backend->update_status($params)); > } > > =head3 backend_cancel >@@ -896,7 +896,7 @@ sub backend_cancel { > other => $params > }); > >- return $self->expandTemplate($result); >+ return $self->expand_template($result); > } > > =head3 backend_renew >@@ -909,7 +909,7 @@ The standard interface method allowing for request renewal queries. > > sub backend_renew { > my ( $self ) = @_; >- return $self->expandTemplate( >+ return $self->expand_template( > $self->_backend->renew({ > request => $self, > }) >@@ -960,7 +960,7 @@ sub backend_create { > > # ... simple case: we're not at 'commit' stage. > my $stage = $result->{stage}; >- return $self->expandTemplate($result) >+ return $self->expand_template($result) > unless ( 'commit' eq $stage ); > > # ... complex case: commit! >@@ -993,7 +993,7 @@ sub backend_create { > $result = $unmediated_result if $unmediated_result; > } > >- return $self->expandTemplate($result); >+ return $self->expand_template($result); > } > > =head3 backend_get_update >@@ -1018,15 +1018,15 @@ sub backend_get_update { > return $response; > } > >-=head3 expandTemplate >+=head3 expand_template > >- my $params = $abstract->expandTemplate($params); >+ my $params = $abstract->expand_template($params); > > Return a version of $PARAMS augmented with our required template path. > > =cut > >-sub expandTemplate { >+sub expand_template { > my ( $self, $params ) = @_; > my $backend = $self->_backend->name; > # Generate path to file to load >diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t >index bf1d6e7bf15..a5516b28503 100755 >--- a/t/db_dependent/Illrequests.t >+++ b/t/db_dependent/Illrequests.t >@@ -723,15 +723,15 @@ subtest 'Backend core methods' => sub { > # Now load the mocked backend > $illrq->_backend($backend); > >- # expandTemplate: >- is_deeply($illrq->expandTemplate({ test => 1, method => "bar" }), >+ # expand_template: >+ is_deeply($illrq->expand_template({ test => 1, method => "bar" }), > { > test => 1, > method => "bar", > template => "/tmp/Mock/intra-includes/bar.inc", > opac_template => "/tmp/Mock/opac-includes/bar.inc", > }, >- "ExpandTemplate"); >+ "expand_template"); > > # backend_create > # we are testing simple cases. >-- >2.44.0
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 19605
:
158068
|
158069
|
158070
|
160433
|
160434
|
160435
|
162996
|
162997
|
162998
|
162999
|
163000
|
163001
|
163002
|
163003
|
163004
|
163005
|
163006
|
163007
|
163846
|
164084
|
164085
|
164086
|
164087
|
164088
|
164089
|
164090
|
164091
|
165201