mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 14:38:27 +03:00
Rename AddressBook contacts utils convert commands
This commit is contained in:
parent
513b2fcae8
commit
b025bed83c
2 changed files with 5 additions and 5 deletions
|
|
@ -84,9 +84,9 @@ class AddressBook extends AbstractProvider
|
|||
{
|
||||
$iCount = 0;
|
||||
if ($this->IsActive()) {
|
||||
foreach (Utils::CsvArrayToVCards($aCsvData) as $oContact) {
|
||||
foreach (AddressBook\Utils::CsvArrayToContacts($aCsvData) as $oContact) {
|
||||
if ($this->ContactSave($oContact)) {
|
||||
$iCount++;
|
||||
++$iCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ class AddressBook extends AbstractProvider
|
|||
if ($this->IsActive()) {
|
||||
try
|
||||
{
|
||||
foreach (Utils::VcfFileToVCards($sVcfData) as $oContact) {
|
||||
foreach (AddressBook\Utils::VcfFileToContacts($sVcfData) as $oContact) {
|
||||
if ($this->ContactSave($oContact)) {
|
||||
++$iCount;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ class Utils
|
|||
/**
|
||||
* TODO: broken
|
||||
*/
|
||||
public static function CsvArrayToVCards(array $aCsvData) : iterable
|
||||
public static function CsvArrayToContacts(array $aCsvData) : iterable
|
||||
{
|
||||
foreach ($aCsvData as $aItem) {
|
||||
$oContact = new Classes\Contact();
|
||||
|
|
@ -299,7 +299,7 @@ class Utils
|
|||
return $sResult;
|
||||
}
|
||||
|
||||
public static function VcfFileToVCards(string $sVcfData) : iterable
|
||||
public static function VcfFileToContacts(string $sVcfData) : iterable
|
||||
{
|
||||
$sVcfData = \trim($sVcfData);
|
||||
if ("\xef\xbb\xbf" === \substr($sVcfData, 0, 3)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue