[horde] Horde_Db 2.1.0 trashed Installation

lst_hoe02 at kwsoft.de lst_hoe02 at kwsoft.de
Wed Mar 5 11:47:06 UTC 2014


Zitat von Jan Schneider <jan at horde.org>:

> Zitat von lst_hoe02 at kwsoft.de:
>
>> Zitat von Jan Schneider <jan at horde.org>:
>>
>>> Zitat von lst_hoe02 at kwsoft.de:
>>>
>>>> Zitat von lst_hoe02 at kwsoft.de:
>>>>
>>>>> Ok, will try out and let you (and maybe others) know about the results.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Andreas
>>>>
>>>> Close but not there :-(
>>>>
>>>>
>>>> in horde/config/hooks.php:
>>>>
>>>> class Horde_Hooks
>>>> {
>>>>  // PREFERENCES INIT: See above for documentation.
>>>>  public function prefs_init($pref, $value, $username, $scope_ob)
>>>>  {
>>>>      switch ($pref) {
>>>>      case 'from_addr':
>>>>          // You are responsible for bringing in to the local scope any
>>>>          // information you need. You can "global" anything else you
>>>>          // need.
>>>>          //
>>>>          // Returns an address: either just the user@ side or a full
>>>>          // address.
>>>>
>>>>          $db_results =  
>>>> $GLOBALS['injector']->getInstance('Horde_Db_Adapter')
>>>>                        ->selectValues('SELECT alias FROM  
>>>> postfix_virtual_aliases WHERE user_uid = ?',
>>>>                                        
>>>> array($GLOBALS['registry']->getAuth())
>>>>                                      );
>>>>          return array($db_results);
>>>
>>> $db_results already contains an array of values, don't wrap it  
>>> into another array.
>>
>>
>> Ok, is now return &db_results;
>>
>>
>>>>
>>>>      }
>>>>  }
>>>> }
>>>>
>>>>
>>>>
>>>> in horde/config/prefs.local.php :
>>>>
>>>> $_prefs['from_addr'] = array(
>>>>  'value' => '',
>>>
>>> This needs to be an empty array, not a string, since you changed  
>>> the type to enum.
>>
>> Not sure about this. Should it be 'value' => array(), ??
>>
>> Thanks
>>
>> Andreas
>
> Yes

Still got this and an empty drop down field:

HORDE: [horde] PHP ERROR: Invalid argument supplied for foreach() [pid  
1391 on line 525 of "/usr/share/php/Horde/Core/Prefs/Ui.php"]

The query is executed as expected but looks like Ui.php does not  
expect an enum ?

Any idea to get this working?

Regards

Andreas




More information about the horde mailing list