mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Merge branch 'contacts_backends' of github.com:owncloud/apps into contacts_backends
This commit is contained in:
commit
4bb6662b25
@ -186,6 +186,10 @@ Class Properties {
|
||||
);
|
||||
}
|
||||
|
||||
public static function generateUID($app = 'contacts') {
|
||||
return date('Ymd\\THis') . '.' . time(). '@' . OCP\Util::getServerHostName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the contact property index.
|
||||
*
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace OCA\Contacts\VObject;
|
||||
|
||||
use OCA\Contacts;
|
||||
use OCA\Contacts\Utils;
|
||||
use Sabre\VObject;
|
||||
|
||||
/**
|
||||
@ -57,7 +57,7 @@ class VCard extends VObject\Component\VCard {
|
||||
*/
|
||||
protected function formatPropertyTypes(&$property) {
|
||||
foreach($property->parameters as $key=>&$parameter) {
|
||||
$types = Contacts\Utils\Properties::getTypesForProperty($property->name);
|
||||
$types = Utils\Properties::getTypesForProperty($property->name);
|
||||
if(is_array($types) && in_array(strtoupper($parameter->name), array_keys($types))
|
||||
|| strtoupper($parameter->name) == 'PREF') {
|
||||
unset($property->parameters[$key]);
|
||||
@ -199,7 +199,7 @@ class VCard extends VObject\Component\VCard {
|
||||
'node' => $this,
|
||||
);
|
||||
if ($options & self::REPAIR) {
|
||||
$this->UID = substr(md5(rand().time()), 0, 10);
|
||||
$this->UID = Utils\Properties::generateUID();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user