mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #8302 from turbo124/v5-develop
Limit per page to 5000
This commit is contained in:
commit
b1cef2900b
@ -463,7 +463,7 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
public $accept_client_input_quote_approval = false;
|
public $accept_client_input_quote_approval = false;
|
||||||
|
|
||||||
public $allow_billable_task_items = false;
|
public $allow_billable_task_items = true;
|
||||||
|
|
||||||
public $show_task_item_description = false;
|
public $show_task_item_description = false;
|
||||||
|
|
||||||
|
@ -88,4 +88,25 @@ class UserFilters extends QueryFilters
|
|||||||
->orderByRaw("{$this->with_property} = ? DESC", [$value])
|
->orderByRaw("{$this->with_property} = ? DESC", [$value])
|
||||||
->where('account_id', auth()->user()->account_id);
|
->where('account_id', auth()->user()->account_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exclude a list of user_ids, can pass multiple
|
||||||
|
* user IDs by separating them with a comma.
|
||||||
|
*
|
||||||
|
* @param string $user_id
|
||||||
|
* @return Builder
|
||||||
|
*/
|
||||||
|
public function without(string $user_id = ''): Builder
|
||||||
|
{
|
||||||
|
if (strlen($user_id) == 0) {
|
||||||
|
return $this->builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_array = $this->transformKeys(explode(',', $user_id));
|
||||||
|
|
||||||
|
return $this->builder->where(function ($query) use ($user_array) {
|
||||||
|
$query->whereNotIn('id', $user_array)
|
||||||
|
->where('account_id', auth()->user()->account_id);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -555,7 +555,8 @@ class BaseController extends Controller
|
|||||||
private function resolveQueryLimit(): int
|
private function resolveQueryLimit(): int
|
||||||
{
|
{
|
||||||
if (request()->has('per_page')) {
|
if (request()->has('per_page')) {
|
||||||
return abs((int)request()->input('per_page', 20));
|
return min(abs((int)request()->input('per_page', 20)), 5000);
|
||||||
|
// return abs((int)request()->input('per_page', 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 20;
|
return 20;
|
||||||
|
@ -5000,7 +5000,8 @@ $LANG = array(
|
|||||||
'sync_from' => 'Sync From',
|
'sync_from' => 'Sync From',
|
||||||
'gateway_payment_text' => 'Invoices: :invoices for :amount for client :client',
|
'gateway_payment_text' => 'Invoices: :invoices for :amount for client :client',
|
||||||
'gateway_payment_text_no_invoice' => 'Payment with no invoice for amount :amount for client :client',
|
'gateway_payment_text_no_invoice' => 'Payment with no invoice for amount :amount for client :client',
|
||||||
|
'click_to_variables' => 'Client here to see all variables.',
|
||||||
|
'ship_to' => 'Ship to',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user