mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Contacts: Use AddressBook to access Contact in controller.
This commit is contained in:
parent
58031b7d86
commit
52a72a080b
@ -116,11 +116,8 @@ class ContactController extends BaseController {
|
||||
$response->debug(__METHOD__ . ', checksum: ' . print_r($checksum, true));
|
||||
|
||||
$app = new App($request->parameters['user']);
|
||||
$contact = $app->getContact(
|
||||
$request->parameters['backend'],
|
||||
$request->parameters['addressbookid'],
|
||||
$request->parameters['contactid']
|
||||
);
|
||||
$addressBook = $app->getAddressBook($params['backend'], $params['addressbookid']);
|
||||
$contact = $addressBook->getChild($params['contactid']);
|
||||
|
||||
if(!$contact) {
|
||||
$response->bailOut(App::$l10n->t('Couldn\'t find contact.'));
|
||||
@ -176,11 +173,9 @@ class ContactController extends BaseController {
|
||||
$response->debug(__METHOD__ . ', checksum: ' . print_r($checksum, true));
|
||||
$response->debug(__METHOD__ . ', parameters: ' . print_r($parameters, true));
|
||||
|
||||
$contact = $app->getContact(
|
||||
$request->parameters['backend'],
|
||||
$request->parameters['addressbookid'],
|
||||
$request->parameters['contactid']
|
||||
);
|
||||
$addressBook = $app->getAddressBook($params['backend'], $params['addressbookid']);
|
||||
$response->debug(__METHOD__ . ', addressBook: ' . print_r($addressBook, true));
|
||||
$contact = $addressBook->getChild($params['contactid']);
|
||||
|
||||
if(!$contact) {
|
||||
$response->bailOut(App::$l10n->t('Couldn\'t find contact.'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user