summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-06-28 22:27:30 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-06-28 22:27:30 +0200
commit0f39b4f4cdd60f4af5f85d656ed08698e86287ea (patch)
tree8b44384daa1d2f6cf8d1f8762a7ea43969cae985 /program/lib/Roundcube
parentd6707475ccf0462849309ac1ab902d37b72c4ff9 (diff)
Enable legacy mode: allow running with old config files and log warnings every no and then
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_config.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php
index ff398bc00..90bb85348 100644
--- a/program/lib/Roundcube/rcube_config.php
+++ b/program/lib/Roundcube/rcube_config.php
@@ -76,11 +76,14 @@ class rcube_config
// load main config file
if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'config.inc.php')) {
- $this->errors[] = 'config.inc.php was not found.';
-
// Old configuration files
- $this->load_from_file(RCUBE_CONFIG_DIR . 'main.inc.php');
- $this->load_from_file(RCUBE_CONFIG_DIR . 'db.inc.php');
+ if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'main.inc.php') ||
+ !$this->load_from_file(RCUBE_CONFIG_DIR . 'db.inc.php')) {
+ $this->errors[] = 'config.inc.php was not found.';
+ }
+ else if (rand(1,100) == 10) { // log warning on every 100th request (average)
+ trigger_error("config.inc.php was not found. Please migrate your config by running bin/update.sh", E_USER_WARNING);
+ }
}
// load host-specific configuration