OK, very handy, if the config has to be available
within the plugin only.
But if to access the config on a global level, we
have to include the config file
in rcube_config.php.
Could I do ...
global $CONFIG;
$CONFIG = array_merge ...
or better
$rcmail->config = array_merge ...
... within a plugin?
Cor Bosman: It would solve the unnecessary file
stats and no Core modifications are necessary.
Regards,
Roland
----- Original Message -----
Sent: Sunday, May 17, 2009 5:42 PM
Subject: Re: [RCD] Load plugin config from plugin
folder
> On Sun, 17 May 2009 13:03:37 -0230, Robert King <robk@mun.ca> wrote:
>> In my plugins I've been calling a
function in the plugin init of:
>>
>> class plugin_name
extends rcube_plugin
>> {
>>
>> public function
init()
>> {
>> _load_config();
>> }
>>
>> private function _load_config()
>> {
>>
include('config.inc.php');
>> $this->config = (array)
$_config;
>> }
>>
>> }
>
> Forgot this
important detail:
>
> class plugin_name extends
rcube_plugin
> {
> private $config;
> ...
> }
>
> --
> Robert King
> System Administrator
> Computing
& Communications
> Memorial University
>
_______________________________________________
> List info: http://lists.roundcube.net/dev/
>