diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-21 20:40:10 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-21 20:40:10 +0000 |
| commit | 6855eed774893906fefdc65b587eb2dc0ecb391c (patch) | |
| tree | 06cf41b8ea41829f61261beb9da583359d5c7f8d /roundcubemail/program/include/rcube_plugin.php | |
| parent | 9b0aa170e0313acb11ed02d06aea49ab3248e9b6 (diff) | |
Pass return value of config->load_from_file() back to the plugin
git-svn-id: https://svn.roundcube.net/trunk@2517 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_plugin.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_plugin.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_plugin.php b/roundcubemail/program/include/rcube_plugin.php index 63acaf84e..f7820c448 100644 --- a/roundcubemail/program/include/rcube_plugin.php +++ b/roundcubemail/program/include/rcube_plugin.php @@ -53,13 +53,18 @@ abstract class rcube_plugin * The loaded values are patched over the global configuration. * * @param string Config file name relative to the plugin's folder + * @return boolean True on success, false on failure */ public function load_config($fname = 'config.inc.php') { $fpath = $this->home.'/'.$fname; $rcmail = rcmail::get_instance(); - if (!$rcmail->config->load_from_file($fpath)) + if (!$rcmail->config->load_from_file($fpath)) { raise_error(array('code' => 527, 'type' => 'php', 'message' => "Failed to load config from $fpath"), true, false); + return false; + } + + return true; } /** |
