Bug 28909: Fix handling if backend doesn't support
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Tue, 31 Aug 2021 09:06:03 +0000 (10:06 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 9 Aug 2022 16:21:39 +0000 (13:21 -0300)
If a backend hasn't been updated to support this functionality, we need
to handle that gracefully

Also, this commit fixes some indentation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Illrequest.pm
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt

index 540a3ef..4f50a42 100644 (file)
@@ -722,9 +722,9 @@ sub backend_illview {
     my ( $self, $params ) = @_;
 
     my $response = $self->_backend_capability('illview',{
-            request    => $self,
-            other      => $params,
-        });
+        request    => $self,
+        other      => $params,
+    });
     return $self->expandTemplate($response) if $response;
     return $response;
 }
index 0933b1a..c27fe0e 100644 (file)
                     </div>
 
                 [% ELSIF query_type == 'illview' %]
+                    [% IF whole.template.length > 0 %]
                     [% PROCESS $whole.template %]
+                    [% END %]
                     [% req_status = request.status %]
 
                     [% IF error %]