roundcubemail/program/lib/Roundcube/rcube_plugin.php
public function load_config($fname = 'config.inc.php')
    {
        if (in_array($fname, $this->loaded_config)) {
            return true;
        }

        $this->loaded_config[] = $fname;

        $fpath = $this->home.'/'.$fname;
        $rcube = rcube::get_instance();

        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 if (!$is_local) {
            // Search plugin_name.inc.php file in any configured path
            return $rcube->config->load_from_file($this->ID . '.inc.php');
        }

        return true;
    }
public function load_config($fname = 'config.inc.php')
    {
        if (in_array($fname, $this->loaded_config)) {
            return true;
        }

        $this->loaded_config[] = $fname;

        $fpath = $this->home.'/'.$fname;
        $rcube = rcube::get_instance();

        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 if (!$is_local) {
            // Search plugin_name.inc.php file in any configured path
            return $rcube->config->load_from_file($this->ID . '.inc.php');
        }

        return true;
    }
public function load_config ( $ fname = 'config.inc.php' ) { if ( in_array ( $ fname , $ this -> loaded_config ) ) { return true ; } $ this -> loaded_config [ ] = $ fname ; $ fpath = $ this -> home . '/' . $ fname ; $ rcube = rcube :: get_instance ( ) ; 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 if ( ! $ is_local ) { // Search plugin_name.inc.php file in any configured path return $ rcube -> config -> load_from_file ( $ this -> ID . '.inc.php' ) ; } return true ; }
Load local config file from plugins directory.
The loaded values are patched over the global configuration.

@param string $fname Config file name relative to the plugin's folder

@return boolean True on success, false on failure
Load local config file from plugins directory . The loaded values are patched over the global configuration .