]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add PRODID to vcards created by ownCloud.
authorThomas Tanghus <thomas@tanghus.net>
Thu, 12 Jan 2012 10:26:11 +0000 (11:26 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Thu, 12 Jan 2012 21:50:12 +0000 (22:50 +0100)
apps/contacts/lib/vcard.php

index c61f0dfc1145197d2588a91420b2133ee7f6995a..04b59a040fbc985c0d89012d693bd767cc127bfa 100644 (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