Lines 307-312
sub is_ajax {
Link Here
|
307 |
return ( $x_req and $x_req =~ /XMLHttpRequest/i ) ? 1 : 0; |
307 |
return ( $x_req and $x_req =~ /XMLHttpRequest/i ) ? 1 : 0; |
308 |
} |
308 |
} |
309 |
|
309 |
|
|
|
310 |
=item |
311 |
|
312 |
output_and_exit_if_error( $query, $cookie, $template, $params ); |
313 |
|
314 |
To executed at the beginning of scripts to stop the script at this point if |
315 |
some errors are found. |
316 |
|
317 |
Tests for module 'members': |
318 |
* patron is not defined (we are looking for a patron that does no longer exist/never existed) |
319 |
* The logged in user cannot see patron's infos (feature 'cannot_see_patron_infos') |
320 |
|
321 |
Others will be added here depending on the needs (for instance biblio does not exist will be useful). |
322 |
|
323 |
=cut |
324 |
|
310 |
sub output_and_exit_if_error { |
325 |
sub output_and_exit_if_error { |
311 |
my ( $query, $cookie, $template, $params ) = @_; |
326 |
my ( $query, $cookie, $template, $params ) = @_; |
312 |
my $error; |
327 |
my $error; |
313 |
- |
|
|