mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Log issues for #255
This commit is contained in:
parent
e07cf8d11f
commit
c605ff1767
1 changed files with 6 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ class PdoAddressBook
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function prepearDatabaseSyncData(int $iUserID) : array
|
private function prepareDatabaseSyncData(int $iUserID) : array
|
||||||
{
|
{
|
||||||
$aResult = array();
|
$aResult = array();
|
||||||
$oStmt = $this->prepareAndExecute('SELECT id_contact, id_contact_str, changed, deleted, etag FROM rainloop_ab_contacts WHERE id_user = :id_user', array(
|
$oStmt = $this->prepareAndExecute('SELECT id_contact, id_contact_str, changed, deleted, etag FROM rainloop_ab_contacts WHERE id_user = :id_user', array(
|
||||||
|
|
@ -119,12 +119,14 @@ class PdoAddressBook
|
||||||
$iUserID = $this->getUserId($sEmail);
|
$iUserID = $this->getUserId($sEmail);
|
||||||
if (0 >= $iUserID)
|
if (0 >= $iUserID)
|
||||||
{
|
{
|
||||||
|
\SnappyMail\Log::warning('PdoAddressBook', 'Sync() invalid $iUserID');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$oClient = $this->getDavClient($sUrl, $sUser, $sPassword, $sProxy);
|
$oClient = $this->getDavClient($sUrl, $sUser, $sPassword, $sProxy);
|
||||||
if (!$oClient)
|
if (!$oClient)
|
||||||
{
|
{
|
||||||
|
\SnappyMail\Log::warning('PdoAddressBook', 'Sync() invalid DavClient');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,10 +135,11 @@ class PdoAddressBook
|
||||||
$aRemoteSyncData = $this->prepareDavSyncData($oClient, $sPath);
|
$aRemoteSyncData = $this->prepareDavSyncData($oClient, $sPath);
|
||||||
if (false === $aRemoteSyncData)
|
if (false === $aRemoteSyncData)
|
||||||
{
|
{
|
||||||
|
\SnappyMail\Log::info('PdoAddressBook', 'Sync() no data to sync');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aDatabaseSyncData = $this->prepearDatabaseSyncData($iUserID);
|
$aDatabaseSyncData = $this->prepareDatabaseSyncData($iUserID);
|
||||||
|
|
||||||
// $this->oLogger->WriteDump($aRemoteSyncData);
|
// $this->oLogger->WriteDump($aRemoteSyncData);
|
||||||
// $this->oLogger->WriteDump($aDatabaseSyncData);
|
// $this->oLogger->WriteDump($aDatabaseSyncData);
|
||||||
|
|
@ -303,7 +306,7 @@ class PdoAddressBook
|
||||||
$bVcf = 'vcf' === $sType;
|
$bVcf = 'vcf' === $sType;
|
||||||
$bCsvHeader = true;
|
$bCsvHeader = true;
|
||||||
|
|
||||||
$aDatabaseSyncData = $this->prepearDatabaseSyncData($iUserID);
|
$aDatabaseSyncData = $this->prepareDatabaseSyncData($iUserID);
|
||||||
if (\is_array($aDatabaseSyncData) && \count($aDatabaseSyncData))
|
if (\is_array($aDatabaseSyncData) && \count($aDatabaseSyncData))
|
||||||
{
|
{
|
||||||
foreach ($aDatabaseSyncData as $mData)
|
foreach ($aDatabaseSyncData as $mData)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue