Make configurable to number of events stored in project activities
This commit is contained in:
@@ -20,13 +20,6 @@ class ProjectActivityModel extends Base
|
|||||||
*/
|
*/
|
||||||
const TABLE = 'project_activities';
|
const TABLE = 'project_activities';
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum number of events
|
|
||||||
*
|
|
||||||
* @var integer
|
|
||||||
*/
|
|
||||||
const MAX_EVENTS = 1000;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new event for the project
|
* Add a new event for the project
|
||||||
*
|
*
|
||||||
@@ -49,7 +42,7 @@ class ProjectActivityModel extends Base
|
|||||||
'data' => json_encode($data),
|
'data' => json_encode($data),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->cleanup(self::MAX_EVENTS - 1);
|
$this->cleanup(PROJECT_ACTIVITIES_MAX_EVENTS - 1);
|
||||||
return $this->db->table(self::TABLE)->insert($values);
|
return $this->db->table(self::TABLE)->insert($values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,3 +146,5 @@ defined('HTTP_PROXY_PASSWORD') or define('HTTP_PROXY_PASSWORD', '');
|
|||||||
defined('HTTP_VERIFY_SSL_CERTIFICATE') or define('HTTP_VERIFY_SSL_CERTIFICATE', true);
|
defined('HTTP_VERIFY_SSL_CERTIFICATE') or define('HTTP_VERIFY_SSL_CERTIFICATE', true);
|
||||||
|
|
||||||
defined('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard');
|
defined('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard');
|
||||||
|
|
||||||
|
defined('PROJECT_ACTIVITIES_MAX_EVENTS') or define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
||||||
|
|||||||
@@ -237,3 +237,6 @@ define('HTTP_VERIFY_SSL_CERTIFICATE', true);
|
|||||||
|
|
||||||
// TOTP (2FA) issuer name
|
// TOTP (2FA) issuer name
|
||||||
define('TOTP_ISSUER', 'Kanboard');
|
define('TOTP_ISSUER', 'Kanboard');
|
||||||
|
|
||||||
|
// Maximum number of events stored in the table "project_activities"
|
||||||
|
define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ Enable/Disable debug mode
|
|||||||
```php
|
```php
|
||||||
define('DEBUG', true);
|
define('DEBUG', true);
|
||||||
define('LOG_DRIVER', 'file'); // Other drivers are: syslog, stdout, stderr or file
|
define('LOG_DRIVER', 'file'); // Other drivers are: syslog, stdout, stderr or file
|
||||||
|
|
||||||
|
// By default, the log file is in data/debug.log but you can change the path:
|
||||||
|
define('LOG_FILE', '/path/to/debug.log');
|
||||||
```
|
```
|
||||||
|
|
||||||
The log driver must be defined if you enable the debug mode.
|
The log driver must be defined if you enable the debug mode.
|
||||||
@@ -332,4 +335,7 @@ define('API_AUTHENTICATION_TOKEN', 'My unique API Token');
|
|||||||
|
|
||||||
// TOTP (2FA) issuer name
|
// TOTP (2FA) issuer name
|
||||||
define('TOTP_ISSUER', 'Kanboard');
|
define('TOTP_ISSUER', 'Kanboard');
|
||||||
|
|
||||||
|
// Maximum number of events stored in the table "project_activities"
|
||||||
|
define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user