mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 01:17:04 +03:00
Move RawContactsVcf and RawContactsCsv functions to \RainLoop\Actions\Contacts
This commit is contained in:
parent
4645209053
commit
b76a6ad7a7
2 changed files with 30 additions and 30 deletions
|
|
@ -259,4 +259,34 @@ trait Contacts
|
||||||
return $mResult;
|
return $mResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function RawContactsVcf() : bool
|
||||||
|
{
|
||||||
|
$oAccount = $this->getAccountFromToken();
|
||||||
|
|
||||||
|
\header('Content-Type: text/x-vcard; charset=UTF-8');
|
||||||
|
\header('Content-Disposition: attachment; filename="contacts.vcf"', true);
|
||||||
|
\header('Accept-Ranges: none', true);
|
||||||
|
\header('Content-Transfer-Encoding: binary');
|
||||||
|
|
||||||
|
$this->oHttp->ServerNoCache();
|
||||||
|
|
||||||
|
return $this->AddressBookProvider($oAccount)->IsActive() ?
|
||||||
|
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'vcf') : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function RawContactsCsv() : bool
|
||||||
|
{
|
||||||
|
$oAccount = $this->getAccountFromToken();
|
||||||
|
|
||||||
|
\header('Content-Type: text/csv; charset=UTF-8');
|
||||||
|
\header('Content-Disposition: attachment; filename="contacts.csv"', true);
|
||||||
|
\header('Accept-Ranges: none', true);
|
||||||
|
\header('Content-Transfer-Encoding: binary');
|
||||||
|
|
||||||
|
$this->oHttp->ServerNoCache();
|
||||||
|
|
||||||
|
return $this->AddressBookProvider($oAccount)->IsActive() ?
|
||||||
|
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'csv') : false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,36 +112,6 @@ trait Raw
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function RawContactsVcf() : bool
|
|
||||||
{
|
|
||||||
$oAccount = $this->getAccountFromToken();
|
|
||||||
|
|
||||||
\header('Content-Type: text/x-vcard; charset=UTF-8');
|
|
||||||
\header('Content-Disposition: attachment; filename="contacts.vcf"', true);
|
|
||||||
\header('Accept-Ranges: none', true);
|
|
||||||
\header('Content-Transfer-Encoding: binary');
|
|
||||||
|
|
||||||
$this->oHttp->ServerNoCache();
|
|
||||||
|
|
||||||
return $this->AddressBookProvider($oAccount)->IsActive() ?
|
|
||||||
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'vcf') : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function RawContactsCsv() : bool
|
|
||||||
{
|
|
||||||
$oAccount = $this->getAccountFromToken();
|
|
||||||
|
|
||||||
\header('Content-Type: text/csv; charset=UTF-8');
|
|
||||||
\header('Content-Disposition: attachment; filename="contacts.csv"', true);
|
|
||||||
\header('Accept-Ranges: none', true);
|
|
||||||
\header('Content-Transfer-Encoding: binary');
|
|
||||||
|
|
||||||
$this->oHttp->ServerNoCache();
|
|
||||||
|
|
||||||
return $this->AddressBookProvider($oAccount)->IsActive() ?
|
|
||||||
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'csv') : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function rawSmart(bool $bDownload, bool $bThumbnail = false) : bool
|
private function rawSmart(bool $bDownload, bool $bThumbnail = false) : bool
|
||||||
{
|
{
|
||||||
$sRawKey = (string) $this->GetActionParam('RawKey', '');
|
$sRawKey = (string) $this->GetActionParam('RawKey', '');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue