From e2a9440c927f9ca698daf42990eead1f6a15a997 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Aug 2016 21:48:27 -0400 Subject: Fix undefined constant in config example file --- .travis.yml | 1 + ChangeLog | 1 + config.default.php | 13 +++++++++++-- doc/config.markdown | 11 +++++++++++ tests/configtest/DefaultConfigFileTest.php | 9 +++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 tests/configtest/DefaultConfigFileTest.php diff --git a/.travis.yml b/.travis.yml index 40af3ca8..32403be4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,3 +26,4 @@ before_script: script: - phpunit -c tests/units.$DB.xml + - phpunit tests/configtest diff --git a/ChangeLog b/ChangeLog index 1f7cedd5..0e9edd49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ Improvements: Bug fixes: +* Fix undefined constant in config example file * Fix PHP notice when sending overdue notifications Version 1.0.32 diff --git a/config.default.php b/config.default.php index d0e93a8e..b9dc8d77 100644 --- a/config.default.php +++ b/config.default.php @@ -4,6 +4,9 @@ /* Rename this file to config.php if you want to change the values */ /*******************************************************************/ +// Data folder (must be writeable by the web server user) +define('DATA_DIR', 'data'); + // Enable/Disable debug define('DEBUG', false); @@ -14,9 +17,15 @@ define('LOG_DRIVER', ''); define('LOG_FILE', DATA_DIR.DIRECTORY_SEPARATOR.'debug.log'); // Plugins directory -define('PLUGINS_DIR', ROOT_DIR.DIRECTORY_SEPARATOR.'plugins'); +define('PLUGINS_DIR', 'plugins'); + +// Available cache drivers are "file" and "memory" +define('CACHE_DRIVER', 'memory'); + +// Cache folder to use if cache driver is "file" (must be writeable by the web server user) +define('CACHE_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'cache'); -// Folder for uploaded files +// Folder for uploaded files (must be writeable by the web server user) define('FILES_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'files'); // E-mail address for the "From" header (notifications) diff --git a/doc/config.markdown b/doc/config.markdown index e51fd54a..853fa6f2 100644 --- a/doc/config.markdown +++ b/doc/config.markdown @@ -37,6 +37,17 @@ Folder for uploaded files define('FILES_DIR', 'data/files'); ``` +Cache parameters +---------------- + +```php +// Available cache drivers are "file" and "memory" +define('CACHE_DRIVER', 'memory'); + +// Cache folder to use if cache driver is "file" (must be writeable by the web server user) +define('CACHE_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'cache'); +``` + Enable/disable url rewrite -------------------------- diff --git a/tests/configtest/DefaultConfigFileTest.php b/tests/configtest/DefaultConfigFileTest.php new file mode 100644 index 00000000..0840925b --- /dev/null +++ b/tests/configtest/DefaultConfigFileTest.php @@ -0,0 +1,9 @@ +assertNotFalse(include __DIR__.'/../../config.default.php'); + } +} -- cgit v1.2.3