diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-08-11 13:20:12 +0400 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-08-15 01:49:09 +0400 |
commit | 39ecef39cd606c7c88b6a99540d09d384de90978 (patch) | |
tree | d7b39d627da08e74af63b40391e0d346a8fb60eb | |
parent | 0e25dd65c0ae3ae9290aa6352bfae00567e02485 (diff) |
Fix creation of UID in contacts
-rw-r--r-- | apps/contacts/lib/addressbook.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php index bab260840d9..9a5dea6f45f 100644 --- a/apps/contacts/lib/addressbook.php +++ b/apps/contacts/lib/addressbook.php @@ -167,7 +167,12 @@ class OC_Contacts_Addressbook{ $uri = $property->value.'.vcf'; } } - if(is_null($uri)) $uri = self::createUID().'.vcf'; + if(is_null($uri)){ + $uid = self::createUID(); + $uri = $uid.'.vcf'; + $card->add(new Sabre_VObject_Property('UID',$uid)); + $data = $card->serialize(); + }; $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_cards (addressbookid,fullname,carddata,uri,lastmodified) VALUES(?,?,?,?,?)' ); $result = $stmt->execute(array($id,$fn,$data,$uri,time())); |