[imp] Access to "name" parameter from servers.php

Jan Schneider jan at horde.org
Mon Jul 3 14:12:33 PDT 2006


Zitat von Mike Cisar <mlists at starmania.net>:

> Hi Jan,
>
>> > the 'name' value from that particular "$servers" section).  This
>> > like the easiest method for us to maintain since the appropriate
>> > welcome string can be placed in that field when the rest of the server
>> > parameters are added when configuring a new server.
>>
>> $_SESSION['imp']['server']
>
> I've tried your suggestion and get a blank string... corresponding with the
> following error in the httpd error log... "PHP Notice:  Undefined index:
> imp in /var/www/html/horde/imp/login.php on line 157"
>
> What I have done is take the existing line...
> "$title = sprintf(_("Welcome to %s"), $registry->get('name', ($imp_auth) ?
> 'horde' : null));"
>
> and changed it to...
> $myservername = $_SESSION['imp']['server'];
> "$title = "Welcome to the $myservername Web Portal";
>
> I don't think there is a session yet before we log in, is that why it would
> give that error?

Correct. You need to loop through $servers then and use  
IMP::isPreferredServer().

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the imp mailing list