thomascube
2009-05-21 c73b195e5d02a09d56430dd6e666313b86fee2f9
program/include/rcube_plugin.php
@@ -47,6 +47,20 @@
   * Initialization method, needs to be implemented by the plugin itself
   */
  abstract function init();
  /**
   * Load local config file from plugins directory.
   * The loaded values are patched over the global configuration.
   *
   * @param string Config file name relative to the plugin's folder
   */
  public function load_config($fname = 'config.inc.php')
  {
    $fpath = $this->home.'/'.$fname;
    $rcmail = rcmail::get_instance();
    if (!$rcmail->config->load_from_file($fpath))
      raise_error(array('code' => 527, 'type' => 'php', 'message' => "Failed to load config from $fpath"), true, false);
  }
  /**
   * Register a callback function for a specific (server-side) hook