summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-05-21 20:40:10 +0000
committerthomascube <thomas@roundcube.net>2009-05-21 20:40:10 +0000
commit029c2fa60eec5927b694ce92ab2779ffd2998cc4 (patch)
treea9a98758075b595d03a36c9f45352e991a9f12d6 /program
parentc73b195e5d02a09d56430dd6e666313b86fee2f9 (diff)
Pass return value of config->load_from_file() back to the plugin
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_plugin.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/include/rcube_plugin.php b/program/include/rcube_plugin.php
index 63acaf84e..f7820c448 100644
--- a/program/include/rcube_plugin.php
+++ b/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;
}
/**