Fall back to load plugin config from global config directories only if no local config file exists

pull/163/head
Thomas Bruederli 11 years ago
parent 5991988b9a
commit aa581c2912

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

Loading…
Cancel
Save