mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Fix unsaved compose contacts
Move thm-body from body to div
This commit is contained in:
parent
92855bc880
commit
25f9a1e95b
6 changed files with 57 additions and 13 deletions
|
|
@ -4220,8 +4220,8 @@ class Actions
|
|||
{
|
||||
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
||||
|
||||
$this->PersonalAddressBookProvider($oAccount)->IncFrec($oAccount->ParentEmailHelper(), \array_values($aArrayToFrec),
|
||||
!!$oSettings->GetConf('ContactsAutosave', false));
|
||||
$this->PersonalAddressBookProvider($oAccount)->IncFrec(
|
||||
$oAccount->ParentEmailHelper(), \array_values($aArrayToFrec), !!$oSettings->GetConf('ContactsAutosave', true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -948,10 +948,10 @@ class PdoPersonalAddressBook
|
|||
{
|
||||
if ($oItem)
|
||||
{
|
||||
$sEmail = \strtolower(\trim($oItem->GetEmail()));
|
||||
if (0 < \strlen($sEmail))
|
||||
$sEmailUpdate = \strtolower(\trim($oItem->GetEmail()));
|
||||
if (0 < \strlen($sEmailUpdate))
|
||||
{
|
||||
$aEmailsToUpdate[] = $sEmail;
|
||||
$aEmailsToUpdate[] = $sEmailUpdate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -978,12 +978,38 @@ class PdoPersonalAddressBook
|
|||
|
||||
if ('' !== \trim($oEmail->GetDisplayName()))
|
||||
{
|
||||
$oPropName = new \RainLoop\Providers\PersonalAddressBook\Classes\Property();
|
||||
$oPropName->ScopeType = $oContact->ScopeType;
|
||||
$oPropName->Type = \RainLoop\Providers\PersonalAddressBook\Enumerations\PropertyType::FULLNAME;
|
||||
$oPropName->Value = \trim($oEmail->GetDisplayName());
|
||||
$sFirst = $sLast = '';
|
||||
$sFullName = $oEmail->GetDisplayName();
|
||||
if (false !== \strpos($sFullName, ' '))
|
||||
{
|
||||
$aNames = explode(' ', $sFullName, 2);
|
||||
$sFirst = isset($aNames[0]) ? $aNames[0] : '';
|
||||
$sLast = isset($aNames[1]) ? $aNames[1] : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sFirst = $sFullName;
|
||||
}
|
||||
|
||||
$oContact->Properties[] = $oPropName;
|
||||
if (0 < \strlen($sFirst))
|
||||
{
|
||||
$oPropName = new \RainLoop\Providers\PersonalAddressBook\Classes\Property();
|
||||
$oPropName->ScopeType = $oContact->ScopeType;
|
||||
$oPropName->Type = \RainLoop\Providers\PersonalAddressBook\Enumerations\PropertyType::FIRST_NAME;
|
||||
$oPropName->Value = \trim($sFirst);
|
||||
|
||||
$oContact->Properties[] = $oPropName;
|
||||
}
|
||||
|
||||
if (0 < \strlen($sLast))
|
||||
{
|
||||
$oPropName = new \RainLoop\Providers\PersonalAddressBook\Classes\Property();
|
||||
$oPropName->ScopeType = $oContact->ScopeType;
|
||||
$oPropName->Type = \RainLoop\Providers\PersonalAddressBook\Enumerations\PropertyType::LAST_NAME;
|
||||
$oPropName->Value = \trim($sLast);
|
||||
|
||||
$oContact->Properties[] = $oPropName;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 < \count($oContact->Properties))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue