1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-19 08:52:22 +01:00

Contacts: Some status checks

This commit is contained in:
Thomas Tanghus 2013-05-06 01:50:03 +02:00
parent 757bc10216
commit 9df6967ac8

View File

@ -63,8 +63,8 @@ class Contact extends VObject\VCard implements IPIMObject {
if($data instanceof VObject\VCard) { if($data instanceof VObject\VCard) {
foreach($data->children as $child) { foreach($data->children as $child) {
$this->add($child); $this->add($child);
$this->setRetrieved(true);
} }
$this->setRetrieved(true);
} elseif(is_array($data)) { } elseif(is_array($data)) {
foreach($data as $key => $value) { foreach($data as $key => $value) {
switch($key) { switch($key) {
@ -283,7 +283,7 @@ class Contact extends VObject\VCard implements IPIMObject {
public function retrieve() { public function retrieve() {
//error_log(__METHOD__); //error_log(__METHOD__);
//\OCP\Util::writeLog('contacts', __METHOD__.' ' . print_r($this->props, true), \OCP\Util::DEBUG); //\OCP\Util::writeLog('contacts', __METHOD__.' ' . print_r($this->props, true), \OCP\Util::DEBUG);
if($this->isRetrieved()) { if($this->isRetrieved() || count($this->children) > 0) {
//\OCP\Util::writeLog('contacts', __METHOD__. ' children', \OCP\Util::DEBUG); //\OCP\Util::writeLog('contacts', __METHOD__. ' children', \OCP\Util::DEBUG);
return true; return true;
} else { } else {