fixed moving contracts to and from private addressbook

This commit is contained in:
Ralf Becker 2007-06-25 16:37:42 +00:00
parent 96eaf62eda
commit ed64e9102a

View File

@ -639,10 +639,10 @@ class uicontacts extends bocontacts
{
$Ok = false;
}
elseif ($contact['owner'] != $action) // no need to change
elseif ($contact['owner'] != (int)$action || $contact['private'] != (int)(substr($action,-1) == 'p'))
{
$contact['owner'] = (int) $action;
$contact['private'] = 0;
$contact['private'] = (int)(substr($action,-1) == 'p');
$Ok = $this->save($contact);
}
}