diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-04-14 22:08:39 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-04-14 22:08:39 -0400 |
commit | cc9f3e69c61147811d2dba0828c434ed42c3c372 (patch) | |
tree | 44f6b75857b270f19efcdfdd6b2d30d60bd23088 /app/constants.php | |
parent | f4e8eb176f19b31176bd3a5f9284b54e9ea6fb17 (diff) |
Added new constant DATA_DIR
Diffstat (limited to 'app/constants.php')
-rw-r--r-- | app/constants.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/app/constants.php b/app/constants.php index a09aac19..3dd827b3 100644 --- a/app/constants.php +++ b/app/constants.php @@ -1,11 +1,17 @@ <?php +// Data directory location +defined('DATA_DIR') or define('DATA_DIR', implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', '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'))); + // Enable/disable debug defined('DEBUG') or define('DEBUG', getenv('DEBUG')); -defined('DEBUG_FILE') or define('DEBUG_FILE', getenv('DEBUG_FILE') ?: __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug.log'); - -// Plugin directory -defined('PLUGINS_DIR') or define('PLUGINS_DIR', __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'plugins'); +defined('DEBUG_FILE') or define('DEBUG_FILE', getenv('DEBUG_FILE') ?: DATA_DIR.DIRECTORY_SEPARATOR.'debug.log'); // Application version defined('APP_VERSION') or define('APP_VERSION', build_app_version('$Format:%d$', '$Format:%H$')); @@ -14,7 +20,7 @@ defined('APP_VERSION') or define('APP_VERSION', build_app_version('$Format:%d$', defined('DB_DRIVER') or define('DB_DRIVER', 'sqlite'); // Sqlite configuration -defined('DB_FILENAME') or define('DB_FILENAME', 'data'.DIRECTORY_SEPARATOR.'db.sqlite'); +defined('DB_FILENAME') or define('DB_FILENAME', DATA_DIR.DIRECTORY_SEPARATOR.'db.sqlite'); // Mysql/Postgres configuration defined('DB_USERNAME') or define('DB_USERNAME', 'root'); @@ -82,9 +88,6 @@ defined('ENABLE_XFRAME') or define('ENABLE_XFRAME', true); // Syslog defined('ENABLE_SYSLOG') or define('ENABLE_SYSLOG', getenv('ENABLE_SYSLOG')); -// Default files directory -defined('FILES_DIR') or define('FILES_DIR', 'data'.DIRECTORY_SEPARATOR.'files'); - // Escape html inside markdown text defined('MARKDOWN_ESCAPE_HTML') or define('MARKDOWN_ESCAPE_HTML', true); |