View | Details | Raw Unified | Return to bug 19605
Collapse All | Expand All

(-)a/Koha/Illrequest.pm (-12 / +12 lines)
Lines 760-766 sub custom_capability { Link Here
760
                    request    => $self,
760
                    request    => $self,
761
                    other      => $params,
761
                    other      => $params,
762
                });
762
                });
763
            return $self->expandTemplate($response);
763
            return $self->expand_template($response);
764
        }
764
        }
765
    }
765
    }
766
    return 0;
766
    return 0;
Lines 825-831 sub backend_illview { Link Here
825
        request    => $self,
825
        request    => $self,
826
        other      => $params,
826
        other      => $params,
827
    });
827
    });
828
    return $self->expandTemplate($response) if $response;
828
    return $self->expand_template($response) if $response;
829
    return $response;
829
    return $response;
830
}
830
}
831
831
Lines 843-849 sub backend_migrate { Link Here
843
            request    => $self,
843
            request    => $self,
844
            other      => $params,
844
            other      => $params,
845
        });
845
        });
846
    return $self->expandTemplate($response) if $response;
846
    return $self->expand_template($response) if $response;
847
    return $response;
847
    return $response;
848
}
848
}
849
849
Lines 868-874 sub backend_confirm { Link Here
868
            request    => $self,
868
            request    => $self,
869
            other      => $params,
869
            other      => $params,
870
        });
870
        });
871
    return $self->expandTemplate($response);
871
    return $self->expand_template($response);
872
}
872
}
873
873
874
=head3 backend_update_status
874
=head3 backend_update_status
Lines 877-883 sub backend_confirm { Link Here
877
877
878
sub backend_update_status {
878
sub backend_update_status {
879
    my ( $self, $params ) = @_;
879
    my ( $self, $params ) = @_;
880
    return $self->expandTemplate($self->_backend->update_status($params));
880
    return $self->expand_template($self->_backend->update_status($params));
881
}
881
}
882
882
883
=head3 backend_cancel
883
=head3 backend_cancel
Lines 896-902 sub backend_cancel { Link Here
896
        other => $params
896
        other => $params
897
    });
897
    });
898
898
899
    return $self->expandTemplate($result);
899
    return $self->expand_template($result);
900
}
900
}
901
901
902
=head3 backend_renew
902
=head3 backend_renew
Lines 909-915 The standard interface method allowing for request renewal queries. Link Here
909
909
910
sub backend_renew {
910
sub backend_renew {
911
    my ( $self ) = @_;
911
    my ( $self ) = @_;
912
    return $self->expandTemplate(
912
    return $self->expand_template(
913
        $self->_backend->renew({
913
        $self->_backend->renew({
914
            request    => $self,
914
            request    => $self,
915
        })
915
        })
Lines 960-966 sub backend_create { Link Here
960
960
961
    # ... simple case: we're not at 'commit' stage.
961
    # ... simple case: we're not at 'commit' stage.
962
    my $stage = $result->{stage};
962
    my $stage = $result->{stage};
963
    return $self->expandTemplate($result)
963
    return $self->expand_template($result)
964
        unless ( 'commit' eq $stage );
964
        unless ( 'commit' eq $stage );
965
965
966
    # ... complex case: commit!
966
    # ... complex case: commit!
Lines 993-999 sub backend_create { Link Here
993
        $result = $unmediated_result if $unmediated_result;
993
        $result = $unmediated_result if $unmediated_result;
994
    }
994
    }
995
995
996
    return $self->expandTemplate($result);
996
    return $self->expand_template($result);
997
}
997
}
998
998
999
=head3 backend_get_update
999
=head3 backend_get_update
Lines 1018-1032 sub backend_get_update { Link Here
1018
    return $response;
1018
    return $response;
1019
}
1019
}
1020
1020
1021
=head3 expandTemplate
1021
=head3 expand_template
1022
1022
1023
    my $params = $abstract->expandTemplate($params);
1023
    my $params = $abstract->expand_template($params);
1024
1024
1025
Return a version of $PARAMS augmented with our required template path.
1025
Return a version of $PARAMS augmented with our required template path.
1026
1026
1027
=cut
1027
=cut
1028
1028
1029
sub expandTemplate {
1029
sub expand_template {
1030
    my ( $self, $params ) = @_;
1030
    my ( $self, $params ) = @_;
1031
    my $backend = $self->_backend->name;
1031
    my $backend = $self->_backend->name;
1032
    # Generate path to file to load
1032
    # Generate path to file to load
(-)a/t/db_dependent/Illrequests.t (-4 / +3 lines)
Lines 723-737 subtest 'Backend core methods' => sub { Link Here
723
    # Now load the mocked backend
723
    # Now load the mocked backend
724
    $illrq->_backend($backend);
724
    $illrq->_backend($backend);
725
725
726
    # expandTemplate:
726
    # expand_template:
727
    is_deeply($illrq->expandTemplate({ test => 1, method => "bar" }),
727
    is_deeply($illrq->expand_template({ test => 1, method => "bar" }),
728
              {
728
              {
729
                  test => 1,
729
                  test => 1,
730
                  method => "bar",
730
                  method => "bar",
731
                  template => "/tmp/Mock/intra-includes/bar.inc",
731
                  template => "/tmp/Mock/intra-includes/bar.inc",
732
                  opac_template => "/tmp/Mock/opac-includes/bar.inc",
732
                  opac_template => "/tmp/Mock/opac-includes/bar.inc",
733
              },
733
              },
734
              "ExpandTemplate");
734
              "expand_template");
735
735
736
    # backend_create
736
    # backend_create
737
    # we are testing simple cases.
737
    # we are testing simple cases.
738
- 

Return to bug 19605