broken refactor but need to leave now...

This commit is contained in:
Oliver Gorwits
2019-03-22 09:10:19 +00:00
parent 3e0af5888c
commit bd9ba3bcb8
6 changed files with 18 additions and 34 deletions

View File

@@ -8,7 +8,6 @@ use Time::Seconds;
use base 'Exporter';
our @EXPORT = ();
our @EXPORT_OK = qw/
request_is_api
sort_port sort_modules
interval_to_daterange
sql_match
@@ -28,18 +27,6 @@ subroutines.
=head1 EXPORT_OK
=head2 request_is_api
Whether the request should be interpreted as an API call.
=cut
sub request_is_api {
return (setting('api_token_lifetime')
and request->accept =~ m/(?:json|javascript)/
and index(var('orig_path'), uri_for('/api')->path) == 0);
}
=head2 sql_match( $value, $exact? )
Convert wildcard characters "C<*>" and "C<?>" to "C<%>" and "C<_>"