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

Merge remote-tracking branch 'git://github.com/susinths/apps'

Conflicts:
	calendar/ajax/event/edit.form.php
	calendar/lib/object.php
This commit is contained in:
Bart Visscher 2012-10-27 16:36:06 +02:00
commit c2d29f20f7
5 changed files with 10 additions and 10 deletions

View File

@ -133,7 +133,7 @@ switch($name) {
$line = count($vcard->children) - 1;
// Apparently Sabre_VObject_Parameter doesn't do well with
// Apparently Sabre\VObject\Parameter doesn't do well with
// multiple values or I don't know how to do it. Tanghus.
foreach ($parameters as $key=>$element) {
if(is_array($element) /*&& strtoupper($key) == 'TYPE'*/) {
@ -142,13 +142,13 @@ foreach ($parameters as $key=>$element) {
foreach($element as $e) {
if($e != '' && !is_null($e)) {
if(trim($e)) {
$vcard->children[$line]->parameters[] = new Sabre_VObject_Parameter($key, $e);
$vcard->children[$line]->parameters[] = new Sabre\VObject\Parameter($key, $e);
}
}
}
} else {
if(trim($element)) {
$vcard->children[$line]->parameters[] = new Sabre_VObject_Parameter($key, $element);
$vcard->children[$line]->parameters[] = new Sabre\VObject\Parameter($key, $element);
}
}
}

View File

@ -112,7 +112,7 @@ if(!$value) {
$vcard->children[$line]->setValue($value);
$vcard->children[$line]->parameters = array();
$vcard->children[$line]->add(
new Sabre_VObject_Parameter('VALUE', 'DATE')
new Sabre\VObject\Parameter('VALUE', 'DATE')
);
debug('Setting value:'.$name.' '.$vcard->children[$line]);
break;
@ -135,7 +135,7 @@ if(!$value) {
foreach($parameter as $val) {
if(trim($val)) {
debug('Adding parameter: '.$key.'=>'.$val);
$vcard->children[$line]->add(new Sabre_VObject_Parameter(
$vcard->children[$line]->add(new Sabre\VObject\Parameter(
$key,
strtoupper(strip_tags($val)))
);
@ -143,7 +143,7 @@ if(!$value) {
}
} else {
if(trim($parameter)) {
$vcard->children[$line]->add(new Sabre_VObject_Parameter(
$vcard->children[$line]->add(new Sabre\VObject\Parameter(
$key,
strtoupper(strip_tags($parameter)))
);

View File

@ -81,9 +81,9 @@ if($data) {
}
$property->setValue($image->__toString());
$property->parameters[]
= new Sabre_VObject_Parameter('ENCODING', 'b');
= new Sabre\VObject\Parameter('ENCODING', 'b');
$property->parameters[]
= new Sabre_VObject_Parameter('TYPE', $image->mimeType());
= new Sabre\VObject\Parameter('TYPE', $image->mimeType());
$vcard->__set('PHOTO', $property);
} else {
OCP\Util::writeLog('contacts',

View File

@ -92,7 +92,7 @@ class OC_Contacts_Hooks{
$vevent = new OC_VObject('VEVENT');
//$vevent->setDateTime('LAST-MODIFIED', new DateTime($vcard->REV));
$vevent->setDateTime('DTSTART', $date,
Sabre_VObject_Element_DateTime::DATE);
Sabre\VObject\Property\DateTime::DATE);
$vevent->setString('DURATION', 'P1D');
$vevent->setString('UID', substr(md5(rand().time()), 0, 10));
// DESCRIPTION?

View File

@ -132,7 +132,7 @@ class OC_Contacts_VCard {
foreach($property->parameters as $key=>&$parameter) {
$types = OC_Contacts_App::getTypesOfProperty($property->name);
if(is_array($types) && in_array(strtoupper($parameter->name), array_keys($types)) || strtoupper($parameter->name) == 'PREF') {
$property->parameters[] = new Sabre_VObject_Parameter('TYPE', $parameter->name);
$property->parameters[] = new Sabre\VObject\Parameter('TYPE', $parameter->name);
}
unset($property->parameters[$key]);
}