mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-31 16:37:27 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
a1f3a5c624
|
@ -33,12 +33,14 @@ class SettingsServiceProvider extends ServiceProvider
|
||||||
// Make sure the limit is actually set, is an integer and does not exceed system limits
|
// Make sure the limit is actually set, is an integer and does not exceed system limits
|
||||||
\App::singleton('api_limit_value', function () {
|
\App::singleton('api_limit_value', function () {
|
||||||
$limit = config('app.max_results');
|
$limit = config('app.max_results');
|
||||||
|
$int_limit = intval(request('limit'));
|
||||||
|
|
||||||
if ((abs(intval(request('limit'))) > 0) && (abs(request('limit')) <= config('app.max_results'))) {
|
if ((abs($int_limit) > 0) && ($int_limit <= config('app.max_results'))) {
|
||||||
$limit = abs(request('limit'));
|
$limit = abs($int_limit);
|
||||||
}
|
}
|
||||||
\Log::debug('Max in env: '.config('app.max_results'));
|
\Log::debug('Max in env: '.config('app.max_results'));
|
||||||
\Log::debug('Original requested limit: '.request('limit'));
|
\Log::debug('Original requested limit: '.request('limit'));
|
||||||
|
\Log::debug('Int limit: '.$int_limit);
|
||||||
\Log::debug('Modified limit: '.$limit);
|
\Log::debug('Modified limit: '.$limit);
|
||||||
\Log::debug('------------------------------');
|
\Log::debug('------------------------------');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue