minor bug fixes and cleanup

This commit is contained in:
Oliver Gorwits
2020-05-15 11:35:12 +01:00
parent 49d4519ed2
commit 8acdb67346
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ Client has requested JSON format data and an endpoint under C</api>.
=cut
sub request_is_api {
return ((request->accept =~ m/(?:json|javascript)/) and (
return ((request->accept and request->accept =~ m/(?:json|javascript)/) and (
index(request->path, uri_for('/api/')->path) == 0
or
(param('return_url')

View File

@@ -45,7 +45,7 @@ register_search_tab({
description => 'Date Range in format "YYYY-MM-DD to YYYY-MM-DD"',
},
age_invert => {
description => 'Date Range is NOT within the supplied range',
description => 'Results should NOT be within daterange',
type => 'boolean',
default => 'false',
},
@@ -241,7 +241,7 @@ ajax '/ajax/content/search/node' => require_login sub {
return unless $set and $set->has_rows;
$set = $set->search_rs({}, { order_by => 'me.mac' });
template 'ajax/search/node_by_ip.tt', {
return template 'ajax/search/node_by_ip.tt', {
macs => $set,
archive_filter => {@active},
};