summaryrefslogtreecommitdiff
path: root/app/constants.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-04-30 14:23:30 -0400
committerFrederic Guillot <fred@kanboard.net>2016-04-30 14:23:30 -0400
commit2afd7ee834d8064c6cfefd09a11d08d05a0dfdf1 (patch)
tree622999bf95fa78ec71632cf7adbbe4664ea1d986 /app/constants.php
parentc3d06f7794855f726ed817f0bd33bb1c336275e0 (diff)
Added new constants for folders
Diffstat (limited to 'app/constants.php')
-rw-r--r--app/constants.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/constants.php b/app/constants.php
index 3dd827b3..0f438535 100644
--- a/app/constants.php
+++ b/app/constants.php
@@ -1,13 +1,19 @@
<?php
+// Root directory
+define('ROOT_DIR', __DIR__.DIRECTORY_SEPARATOR.'..');
+
+// App directory
+define('APP_DIR', __DIR__);
+
// Data directory location
-defined('DATA_DIR') or define('DATA_DIR', implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'data')));
+defined('DATA_DIR') or define('DATA_DIR', ROOT_DIR.DIRECTORY_SEPARATOR.'data');
// Files directory (attachments)
defined('FILES_DIR') or define('FILES_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'files');
// Plugins directory
-defined('PLUGINS_DIR') or define('PLUGINS_DIR', implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'plugins')));
+defined('PLUGINS_DIR') or define('PLUGINS_DIR', ROOT_DIR.DIRECTORY_SEPARATOR.'plugins');
// Enable/disable debug
defined('DEBUG') or define('DEBUG', getenv('DEBUG'));