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

This should solve the 404 error

This commit is contained in:
LEDfan 2014-09-07 10:34:25 +02:00
parent 15d3a0b2cc
commit 3d4224a090

View File

@ -190,20 +190,19 @@ class Hooks{
foreach ($addressBookInfos as $addressBookInfo) {
$addressBook = new AddressBook($backend, $addressBookInfo);
while ($contacts = $addressBook->getChildren($limit, $offset, false)) {
\OCP\Util::writeLog('contacts',
__METHOD__ . ', indexing: ' . $limit . ' starting from ' . $offset,
\OCP\Util::DEBUG);
foreach ($contacts as $contact) {
if(!$contact->retrieve()) {
\OCP\Util::writeLog('contacts',
__METHOD__ . ', Error loading contact ' .print_r($contact, true),
\OCP\Util::DEBUG);
}
Utils\Properties::updateIndex($contact->getId(), $contact);
$contacts = $addressBook->getChildren($limit, $offset, false);
\OCP\Util::writeLog('contacts',
__METHOD__ . ', indexing: ' . $limit . ' starting from ' . $offset,
\OCP\Util::DEBUG);
foreach ($contacts as $contact) {
if(!$contact->retrieve()) {
\OCP\Util::writeLog('contacts',
__METHOD__ . ', Error loading contact ' .print_r($contact, true),
\OCP\Util::DEBUG);
}
$offset += $limit;
Utils\Properties::updateIndex($contact->getId(), $contact);
}
$offset += $limit;
}
}