[RCD] need help with $CONFIG

Jim Pingle lists at pingle.org
Fri Jul 27 03:49:03 CEST 2007


roundcube at kamm.hu wrote:
> I'm new to RoundCube, just tried it today, liked it very much, so I decided to
> modify the code a little to suit my needs, but I'm not a php expert, that's
> why I need some help. I wanted to disable the e-mail and reply-to modifying options
> in the identities menu.
> 
> In the main.inc.php config file I added a new entry:
> 
> rcmail_config['can_change_fromaddr'] = TRUE;
> 
> but it seems like that $CONFIG['can_change_fromaddr'] is empty when I try to use it in
> the edit_identity.inc file.
> 
> What am I doing wrong?

I posted a patch before that used a config variable, and it worked just
fine, but I was in a different file than you are working in.

See:
http://trac.roundcube.net/trac.cgi/attachment/ticket/1291605/edit_identity_on_first_login.patch

I don't have much time to get into your patch to see what might be wrong,
but I figured it might help to see another example.

I don't see any other references to $CONFIG in edit_identity.inc, so you may
(as till said) have to access it via global. You may also need to load the
config ( $CONFIG = rcmail_load_config(); ) if it isn't accessible from your
current scope.

Reloading the config wouldn't necessarily be a good thing performance and
style-wise, but it would get the job done...

Jim
_______________________________________________
List info: http://lists.roundcube.net/dev/



More information about the Dev mailing list