summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Template/config/about.php2
-rw-r--r--app/constants.php10
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'));