mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08: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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
$sRawKey = (string) $this->GetActionParam('RawKey', '');
|
||||
|
|
Loading…
Reference in a new issue