diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-04-30 14:23:30 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-04-30 14:23:30 -0400 |
commit | 2afd7ee834d8064c6cfefd09a11d08d05a0dfdf1 (patch) | |
tree | 622999bf95fa78ec71632cf7adbbe4664ea1d986 /app | |
parent | c3d06f7794855f726ed817f0bd33bb1c336275e0 (diff) |
Added new constants for folders
Diffstat (limited to 'app')
-rw-r--r-- | app/Template/config/about.php | 2 | ||||
-rw-r--r-- | app/constants.php | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/app/Template/config/about.php b/app/Template/config/about.php index 1c45d73a..7c599ef7 100644 --- a/app/Template/config/about.php +++ b/app/Template/config/about.php @@ -82,5 +82,5 @@ <h2><?= t('License') ?></h2> </div> <div class="listing"> -<?= nl2br(file_get_contents('LICENSE')) ?> +<?= nl2br(file_get_contents(ROOT_DIR.DIRECTORY_SEPARATOR.'LICENSE')) ?> </div> 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')); |