<?php /** * Copyright (c) 2011 Bart Visscher bartv@thisnet.nl * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ /** * This class manages our app actions */ OC_Contacts_App::$l10n = OC_L10N::get('contacts'); OC_Contacts_App::$categories = new OC_VCategories('contacts'); class OC_Contacts_App { /* * @brief language object for calendar app */ public static $l10n; /* * @brief categories of the user */ public static $categories = null; public static function getAddressbook($id) { $addressbook = OC_Contacts_Addressbook::find($id); if ($addressbook === false || $addressbook['userid'] != OCP\USER::getUser()) { if ($addressbook === false) { OCP\Util::writeLog('contacts', 'Addressbook not found: ' . $id, OCP\Util::ERROR); OCP\JSON::error(array('data' => array('message' => self::$l10n->t('Addressbook not found.')))); } else {