1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Add PRODID to vcards created by ownCloud.

This commit is contained in:
Thomas Tanghus 2012-01-12 11:26:11 +01:00
parent 2859f5d607
commit 1e9453ea37

View File

@ -114,6 +114,14 @@ class OC_Contacts_VCard{
//$data = $card->serialize();
};
$uri = $uid.'.vcf';
// Add product ID.
$prodid = trim($card->getAsString('PRODID'));
if(!$prodid) {
$appinfo = $info=OC_App::getAppInfo('contacts');
$prodid = 'PRODID:-//ownCloud//NONSGML '.$appinfo['name'].' '.$appinfo['version'].'//EN';
$card->setString('PRODID', $prodid);
}
// VCARD must have a version
$version = $card->getAsString('VERSION');
// Add version if needed