2011-08-06 22:32:06 +02:00
|
|
|
<?php
|
2012-10-25 03:34:12 +02:00
|
|
|
OC::$CLASSPATH['OCA\Contacts\App'] = 'contacts/lib/app.php';
|
|
|
|
OC::$CLASSPATH['OCA\Contacts\Addressbook'] = 'contacts/lib/addressbook.php';
|
|
|
|
OC::$CLASSPATH['OCA\Contacts\VCard'] = 'contacts/lib/vcard.php';
|
|
|
|
OC::$CLASSPATH['OCA\Contacts\Hooks'] = 'contacts/lib/hooks.php';
|
|
|
|
OC::$CLASSPATH['OCA\Contacts\Share_Backend_Contact'] = 'contacts/lib/share/contact.php';
|
|
|
|
OC::$CLASSPATH['OCA\Contacts\Share_Backend_Addressbook'] = 'contacts/lib/share/addressbook.php';
|
2012-12-12 00:07:36 +01:00
|
|
|
OC::$CLASSPATH['OCA\Contacts\AddressbookProvider'] = 'contacts/lib/addressbookprovider.php';
|
2012-10-30 07:25:28 +01:00
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'contacts/lib/sabre/backend.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_AddressBookRoot'] = 'contacts/lib/sabre/addressbookroot.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_UserAddressBooks'] = 'contacts/lib/sabre/useraddressbooks.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_AddressBook'] = 'contacts/lib/sabre/addressbook.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_Card'] = 'contacts/lib/sabre/card.php';
|
2012-10-25 03:34:12 +02:00
|
|
|
OC::$CLASSPATH['OCA\\Contacts\\SearchProvider'] = 'contacts/lib/search.php';
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\Contacts\Hooks', 'createUser');
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\Contacts\Hooks', 'deleteUser');
|
|
|
|
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,
|
2012-05-01 23:19:39 +02:00
|
|
|
'href' => OCP\Util::linkTo( 'contacts', 'index.php' ),
|
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-10-25 03:34:12 +02: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');
|
2012-12-12 00:07:36 +01:00
|
|
|
|
|
|
|
foreach(OCA\Contacts\Addressbook::all(OCP\USER::getUser()) as $addressbook) {
|
|
|
|
OCP\Contacts::registerAddressBook(new OCA\Contacts\AddressbookProvider($addressbook['id']));
|
2012-12-18 15:44:12 +01:00
|
|
|
}
|