diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php index 581bf4a717b325b85b8a9dbf97b0d55818f741b7..77b3c105deb34e82f1aee6e0338c1f3a106a5200 100644 --- a/apps/contacts/carddav.php +++ b/apps/contacts/carddav.php @@ -32,8 +32,8 @@ $carddavBackend = new OC_Connector_Sabre_CardDAV(); // Root nodes $nodes = array( - new Sabre_DAVACL_PrincipalCollection($principalBackend), - new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend), + new Sabre_DAVACL_PrincipalCollection($principalBackend), + new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend), ); // Fire up server diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php index 8b91cdbd6f5e43442422915490a3cf42cadd4326..bab260840d95a29602c885f4b5eb0f10deb0363b 100644 --- a/apps/contacts/lib/addressbook.php +++ b/apps/contacts/lib/addressbook.php @@ -120,10 +120,10 @@ class OC_Contacts_Addressbook{ } public static function deleteAddressbook($id){ - $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_cards WHERE id = ?' ); + $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE id = ?' ); $stmt->execute(array($id)); - $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE addressbookid = ?' ); + $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_cards WHERE addressbookid = ?' ); $stmt->execute(array($id)); return true; diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index ea76621674aafb1b6fa7fd283bd936ee524c9c89..02b9d976cc43d6b646ab2447fba37d54e0beefca 100644 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -13,5 +13,5 @@ OC_Util::addStyle('contacts','styles'); <?php echo $this->inc("part.details"); ?> </div> <?php if(count($_['addressbooks']) == 1 ): ?> - <?php echo $l->t('The path to this addressbook is %s', array(OC::$WEBROOT.'/apps/contacts/carddav.php/addressbooks/'.$_['addressbooks'][0]['uri'])); ?> + <?php echo $l->t('The path to this addressbook is %s', array(OC::$WEBROOT.'/apps/contacts/carddav.php/addressbooks/'.OC_User::getUser().'/'.$_['addressbooks'][0]['uri'])); ?> <?php endif; ?>