Added new constants for folders

This commit is contained in:
Frederic Guillot 2016-04-30 14:23:30 -04:00
parent c3d06f7794
commit 2afd7ee834
2 changed files with 9 additions and 3 deletions

View File

@ -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>

View File

@ -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'));