[Tickets #6044] php error on first login of kolab user
bugs at horde.org
bugs at horde.org
Tue Dec 25 00:21:15 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=6044
-----------------------------------------------------------------------
Ticket | 6044
Created By | m.gabriel at das-netzwerkteam.de
Summary | php error on first login of kolab user
Queue | Kolab
Type | Bug
State | Unconfirmed
Priority | 1. Low
Owners |
-----------------------------------------------------------------------
m.gabriel at das-netzwerkteam.de (2007-12-24 19:21) wrote:
i am using kolab-2.1 (debian unstable) and horde-webmail-1.1rc1
the following patch sedates some php errors for kolab users on first
login:
diff -r horde-webmail-1.1-rc1/turba/lib/Maintenance/Task/upgradelists.php
horde-webmail-1.1-rc1-netzwerkteam/turba/lib/Maintenance/Task/upgradelists.php
34,55c34,57
< $cnt = $lists->count();
< for ($j = 0; $j < $cnt; ++$j) {
< $list = $lists->next();
< $attributes = $list->getAttributes();
< $members = @unserialize($attributes['__members']);
< $c = count($members);
< for ($i = 0; $i < $c; ++$i) {
< if (substr_count($members[$i], ':') == 2) {
<
preg_match('/^([a-zA-Z0-9]+:[a-zA-Z0-9]+)(:[a-zA-Z0-9]+)$/', $members[$i],
$matches);
< $source = $matches[1];
< $contact_key = substr($matches[2], 1);
< } elseif (substr_count($members[$i], ':') == 1)
{
< list($source, $contact_key) = explode(':',
$members[$i]);
< } else {
< break;
< }
< $source = $this->_updateShareName($source);
< $members[$i] = $source . ':' . $contact_key;
< }
< $list->setValue('__members', serialize($members));
< $list->store();
< }
---
> if ($lists) {
> $cnt = $lists->count();
> for ($j = 0; $j < $cnt; ++$j) {
> $list = $lists->next();
> $attributes = $list->getAttributes();
> $members =
@unserialize($attributes['__members']);
> $c = count($members);
> for ($i = 0; $i < $c; ++$i) {
> if (substr_count($members[$i], ':') == 2) {
>
preg_match('/^([a-zA-Z0-9]+:[a-zA-Z0-9]+)(:[a-zA-Z0-9]+)$/', $members[$i],
$matches);
> $source = $matches[1];
> $contact_key = substr($matches[2], 1);
> } elseif (substr_count($members[$i], ':') ==
1) {
> list($source, $contact_key) = explode(':',
$members[$i]);
> } else {
> break;
> }
> $source = $this->_updateShareName($source);
> $members[$i] = $source . ':' . $contact_key;
> }
> $list->setValue('__members',
serialize($members));
> $list->store();
> }
> }
best,
mike
More information about the bugs
mailing list