summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-10-19 10:50:36 -0700
committerFrederic Guillot <fred@kanboard.net>2017-10-19 10:50:36 -0700
commitd3b8fbfa2864e55b7e5916e55ca818599e7e94d6 (patch)
treed4c5e7f12c65a0e834065287f8e3cbcf59ec41b1 /app
parente7f795a63e49a11a9cea239d89d6172e8c40227d (diff)
Make configurable to number of events stored in project activities
Diffstat (limited to 'app')
-rw-r--r--app/Model/ProjectActivityModel.php9
-rw-r--r--app/constants.php2
2 files changed, 3 insertions, 8 deletions
diff --git a/app/Model/ProjectActivityModel.php b/app/Model/ProjectActivityModel.php
index 380ea125..17cf6485 100644
--- a/app/Model/ProjectActivityModel.php
+++ b/app/Model/ProjectActivityModel.php
@@ -21,13 +21,6 @@ class ProjectActivityModel extends Base
const TABLE = 'project_activities';
/**
- * Maximum number of events
- *
- * @var integer
- */
- const MAX_EVENTS = 1000;
-
- /**
* Add a new event for the project
*
* @access public
@@ -49,7 +42,7 @@ class ProjectActivityModel extends Base
'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);
}
diff --git a/app/constants.php b/app/constants.php
index d62bfd3a..2266014d 100644
--- a/app/constants.php
+++ b/app/constants.php
@@ -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('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard');
+
+defined('PROJECT_ACTIVITIES_MAX_EVENTS') or define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);