summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-01-14 17:04:24 +0100
committerThomas Bruederli <thomas@roundcube.net>2014-01-14 17:04:24 +0100
commitaa581c2912fa291c59605d876a6b37241a6a8b06 (patch)
tree39b6880450419914f3e282d49fe5c51ab862838c /program/lib/Roundcube
parent5991988b9a54a17c90bf5a6583064f71eaca9186 (diff)
Fall back to load plugin config from global config directories only if no local config file exists
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_plugin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php
index a571609f1..0dd575a96 100644
--- a/program/lib/Roundcube/rcube_plugin.php
+++ b/program/lib/Roundcube/rcube_plugin.php
@@ -125,13 +125,14 @@ abstract class rcube_plugin
$fpath = $this->home.'/'.$fname;
$rcube = rcube::get_instance();
- if (is_file($fpath) && !$rcube->config->load_from_file($fpath)) {
+ if (($is_local = is_file($fpath)) && !$rcube->config->load_from_file($fpath)) {
rcube::raise_error(array(
'code' => 527, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Failed to load config from $fpath"), true, false);
return false;
- } else {
+ }
+ else if (!$is_local) {
$fname = $this->ID . '.inc.php';
// Search plugin_name.inc.php file in any configured path
if (!$rcube->config->load_from_file($fname)) {