diff options
Diffstat (limited to 'apps/contacts/ajax/editaddressbook.php')
-rw-r--r-- | apps/contacts/ajax/editaddressbook.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/contacts/ajax/editaddressbook.php b/apps/contacts/ajax/editaddressbook.php index abdad09dea0..ced673ce807 100644 --- a/apps/contacts/ajax/editaddressbook.php +++ b/apps/contacts/ajax/editaddressbook.php @@ -8,11 +8,9 @@ require_once('../../../lib/base.php'); $l10n = new OC_L10N('contacts'); -if(!OC_USER::isLoggedIn()) { - die("<script type=\"text/javascript\">document.location = oc_webroot;</script>"); -} +OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); -$addressbook = OC_Contacts_Addressbook::find($_GET['bookid']); +$addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']); $tmpl = new OC_Template("contacts", "part.editaddressbook"); $tmpl->assign('new', false); $tmpl->assign('addressbook', $addressbook); |