diff options
author | Thomas B. <thomas@roundcube.net> | 2014-01-13 23:35:46 -0800 |
---|---|---|
committer | Thomas B. <thomas@roundcube.net> | 2014-01-13 23:35:46 -0800 |
commit | 5991988b9a54a17c90bf5a6583064f71eaca9186 (patch) | |
tree | c32628e9ca579413e06202acc7df90035ad1ad47 /program/lib/Roundcube | |
parent | 14bd927c71bf6bd62483494b1a4229a50855ccb7 (diff) | |
parent | d073a66db3abf13a769ffaab50028bac4e771916 (diff) |
Merge pull request #160 from Takika/patch-1
Load plugin config file (by plugin name) from any configured path
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r-- | program/lib/Roundcube/rcube_plugin.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php index aa6d8376e..a571609f1 100644 --- a/program/lib/Roundcube/rcube_plugin.php +++ b/program/lib/Roundcube/rcube_plugin.php @@ -131,6 +131,16 @@ abstract class rcube_plugin 'file' => __FILE__, 'line' => __LINE__, 'message' => "Failed to load config from $fpath"), true, false); return false; + } else { + $fname = $this->ID . '.inc.php'; + // Search plugin_name.inc.php file in any configured path + if (!$rcube->config->load_from_file($fname)) { + rcube::raise_error(array( + 'code' => 527, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Failed to load $fname config file from any configured path"), true, false); + return false; + } } return true; |