2011-08-06 22:32:06 +02:00
|
|
|
<?php
|
2013-03-12 20:00:22 +01:00
|
|
|
//require_once __DIR__ . '/../lib/contact.php';
|
2013-03-10 12:53:01 +01:00
|
|
|
Sabre\VObject\Component::$classMap['VCARD'] = 'OCA\Contacts\Contact';
|
2013-04-08 22:38:18 +02:00
|
|
|
Sabre\VObject\Property::$classMap['FN'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['TITLE'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['ROLE'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['NOTE'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['NICKNAME'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['EMAIL'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['TEL'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['IMPP'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['URL'] = 'OC\VObject\StringProperty';
|
2013-03-13 09:59:12 +01:00
|
|
|
Sabre\VObject\Property::$classMap['GEO'] = 'Sabre\VObject\Property\Compound';
|
2013-02-19 02:21:29 +01:00
|
|
|
|
2013-03-13 08:52:00 +01:00
|
|
|
OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\Contacts\Hooks', 'userCreated');
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\Contacts\Hooks', 'userDeleted');
|
2013-03-29 05:00:03 +01:00
|
|
|
OCP\Util::connectHook('OCA\Contacts', 'pre_deleteAddressBook', 'OCA\Contacts\Hooks', 'addressBookDeletion');
|
2013-03-13 08:52:00 +01:00
|
|
|
OCP\Util::connectHook('OCA\Contacts', 'pre_deleteContact', 'OCA\Contacts\Hooks', 'contactDeletion');
|
|
|
|
OCP\Util::connectHook('OCA\Contacts', 'post_createContact', 'OCA\Contacts\Hooks', 'contactUpdated');
|
|
|
|
OCP\Util::connectHook('OCA\Contacts', 'post_updateContact', 'OCA\Contacts\Hooks', 'contactUpdated');
|
2013-04-01 03:46:45 +02:00
|
|
|
OCP\Util::connectHook('OCA\Contacts', 'scanCategories', 'OCA\Contacts\Hooks', 'scanCategories');
|
|
|
|
OCP\Util::connectHook('OCA\Contacts', 'indexProperties', 'OCA\Contacts\Hooks', 'indexProperties');
|
2012-10-25 03:34:12 +02:00
|
|
|
OCP\Util::connectHook('OC_Calendar', 'getEvents', 'OCA\Contacts\Hooks', 'getBirthdayEvents');
|
|
|
|
OCP\Util::connectHook('OC_Calendar', 'getSources', 'OCA\Contacts\Hooks', 'getCalenderSources');
|
2011-08-06 22:32:06 +02:00
|
|
|
|
2012-05-02 00:50:26 +02:00
|
|
|
OCP\App::addNavigationEntry( array(
|
2011-08-06 22:32:06 +02:00
|
|
|
'id' => 'contacts_index',
|
|
|
|
'order' => 10,
|
2013-03-10 12:53:01 +01:00
|
|
|
'href' => \OC_Helper::linkToRoute('contacts_index'),
|
2012-10-27 17:46:14 +02:00
|
|
|
'icon' => OCP\Util::imagePath( 'contacts', 'contacts.svg' ),
|
2012-05-15 18:48:48 +02:00
|
|
|
'name' => OC_L10N::get('contacts')->t('Contacts') ));
|
2011-09-28 16:05:01 +02:00
|
|
|
|
2012-05-01 20:03:41 +02:00
|
|
|
OCP\Util::addscript('contacts', 'loader');
|
2012-12-12 00:07:36 +01:00
|
|
|
|
2013-03-15 11:48:33 +01:00
|
|
|
OC_Search::registerProvider('OCA\Contacts\SearchProvider');
|
|
|
|
OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
|
|
|
|
OCP\Share::registerBackend('addressbook', 'OCA\Contacts\Share_Backend_Addressbook', 'contact');
|
2013-03-13 20:49:27 +01:00
|
|
|
|
2013-04-17 15:07:59 +02:00
|
|
|
/*
|
2013-03-15 11:48:33 +01:00
|
|
|
if(OCP\User::isLoggedIn()) {
|
2013-03-13 20:49:27 +01:00
|
|
|
foreach(OCA\Contacts\Addressbook::all(OCP\USER::getUser()) as $addressbook) {
|
|
|
|
OCP\Contacts::registerAddressBook(new OCA\Contacts\AddressbookProvider($addressbook['id']));
|
|
|
|
}
|
2013-03-12 20:00:22 +01:00
|
|
|
}*/
|