mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
The final commit personal address books branches before merging
This commit is contained in:
parent
43f094220c
commit
867dcc8f7e
44 changed files with 2163 additions and 1147 deletions
|
|
@ -5,24 +5,29 @@ namespace RainLoop\Providers\PersonalAddressBook\Classes;
|
|||
class Contact
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
* @var string
|
||||
*/
|
||||
public $IdContact;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $DisplayInList;
|
||||
public $Display;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var string
|
||||
*/
|
||||
public $Type;
|
||||
public $DisplayName;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $DisplayEmail;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $CanBeChanged;
|
||||
public $Auto;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
|
|
@ -32,7 +37,7 @@ class Contact
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $TagsIds;
|
||||
public $Tags;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
@ -46,13 +51,14 @@ class Contact
|
|||
|
||||
public function Clear()
|
||||
{
|
||||
$this->IdContact = 0;
|
||||
$this->IdContact = '';
|
||||
$this->IdUser = 0;
|
||||
$this->DisplayInList = '';
|
||||
$this->Type = \RainLoop\Providers\PersonalAddressBook\Enumerations\ContactType::DEFAULT_;
|
||||
$this->CanBeChanged = false;
|
||||
$this->Display = '';
|
||||
$this->DisplayName = '';
|
||||
$this->DisplayEmail = '';
|
||||
$this->Auto = false;
|
||||
$this->Changed = \time();
|
||||
$this->TagsIds = array();
|
||||
$this->Tags = array();
|
||||
$this->Properties = array();
|
||||
}
|
||||
|
||||
|
|
@ -79,8 +85,11 @@ class Contact
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->DisplayInList = 0 < \strlen($sDisplayName) ? $sDisplayName : (!empty($sDisplayEmail) ? $sDisplayEmail : '');
|
||||
|
||||
$this->DisplayName = $sDisplayName;
|
||||
$this->DisplayEmail = $sDisplayEmail;
|
||||
|
||||
$this->Display = 0 < \strlen($sDisplayName) ? $sDisplayName : (!empty($sDisplayEmail) ? $sDisplayEmail : '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ class Property
|
|||
if ($this->IsPhone())
|
||||
{
|
||||
$sPhone = $this->Value;
|
||||
$sPhone = \preg_replace('^[+]+', '', $sPhone);
|
||||
$sPhone = \preg_replace('[^\d]', '', $sPhone);
|
||||
$sPhone = \preg_replace('/^[+]+/', '', $sPhone);
|
||||
$sPhone = \preg_replace('/[^\d]/', '', $sPhone);
|
||||
$this->ValueClear = $sPhone;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue