summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--ChangeLog1
-rw-r--r--config.default.php13
-rw-r--r--doc/config.markdown11
-rw-r--r--tests/configtest/DefaultConfigFileTest.php9
5 files changed, 33 insertions, 2 deletions
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 @@
+<?php
+
+class DefaultConfigFileTest extends PHPUnit_Framework_TestCase
+{
+ public function testThatFileCanBeImported()
+ {
+ $this->assertNotFalse(include __DIR__.'/../../config.default.php');
+ }
+}