mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Add batch limits for hosted imports
This commit is contained in:
parent
d534b5595b
commit
bd70b4596c
@ -475,6 +475,7 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
define('LOGGED_ERROR_LIMIT', 100);
|
||||
define('RANDOM_KEY_LENGTH', 32);
|
||||
define('MAX_NUM_USERS', 20);
|
||||
define('MAX_IMPORT_ROWS', 500);
|
||||
define('MAX_SUBDOMAIN_LENGTH', 30);
|
||||
define('MAX_IFRAME_URL_LENGTH', 250);
|
||||
define('MAX_LOGO_FILE_SIZE', 200); // KB
|
||||
|
@ -6,6 +6,7 @@ use Excel;
|
||||
use Cache;
|
||||
use Exception;
|
||||
use Auth;
|
||||
use Utils;
|
||||
use parsecsv;
|
||||
use Session;
|
||||
use Validator;
|
||||
@ -332,6 +333,10 @@ class ImportService
|
||||
*/
|
||||
private function checkData($entityType, $count)
|
||||
{
|
||||
if (Utils::isNinja() && $count > MAX_IMPORT_ROWS) {
|
||||
throw new Exception(trans('texts.limit_import_rows', ['count' => MAX_IMPORT_ROWS]));
|
||||
}
|
||||
|
||||
if ($entityType === ENTITY_CLIENT) {
|
||||
$this->checkClientCount($count);
|
||||
}
|
||||
|
@ -2042,6 +2042,7 @@ $LANG = array(
|
||||
'wepay_account_description' => 'Payment gateway for Invoice Ninja',
|
||||
'payment_error_code' => 'There was an error processing your payment [:code]. Please try again later.',
|
||||
'standard_fees_apply' => 'Standard fees apply: 2.9% + $0.30 per successful charge.',
|
||||
'limit_import_rows' => 'Data needs to be imported in batches of :count rows or less',
|
||||
|
||||
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user