Added export contacts (vCard)

This commit is contained in:
RainLoop Team 2014-04-29 00:34:34 +04:00
parent c25b5bfef7
commit c248292f07
37 changed files with 489 additions and 237 deletions

View file

@ -6116,6 +6116,42 @@ class Actions
return $this->rawSmart(false);
}
/**
* @return bool
*/
public function RawContactsVcf()
{
$oAccount = $this->getAccountFromToken();
\header('Content-Type: text/directory; 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;
}
/**
* @return bool
*/
public function RawContactsCsv()
{
$oAccount = $this->getAccountFromToken();
\header('Content-Type: ext/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;
}
/**
* @return bool
*/