1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-31 20:52:17 +01:00
Thomas Tanghus c3fa18e4a7 Merge branch 'contacts_backends' into contacts_oc6
Conflicts:
	contacts/ajax/categories/add.php
	contacts/ajax/contact/add.php
	contacts/appinfo/app.php
	contacts/appinfo/migrate.php
	contacts/css/contacts.css
	contacts/index.php
	contacts/js/app.js
	contacts/js/contacts.js
	contacts/js/groups.js
	contacts/lib/app.php
	contacts/lib/carddav/addressbook.php
	contacts/lib/sabre/backend.php
	contacts/lib/vcard.php
	contacts/templates/contacts.php
	contacts/thumbnail.php
2013-04-17 15:07:59 +02:00

45 lines
2.5 KiB
PHP

<?php
//require_once __DIR__ . '/../lib/contact.php';
Sabre\VObject\Component::$classMap['VCARD'] = 'OCA\Contacts\Contact';
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';
Sabre\VObject\Property::$classMap['GEO'] = 'Sabre\VObject\Property\Compound';
OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\Contacts\Hooks', 'userCreated');
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\Contacts\Hooks', 'userDeleted');
OCP\Util::connectHook('OCA\Contacts', 'pre_deleteAddressBook', 'OCA\Contacts\Hooks', 'addressBookDeletion');
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');
OCP\Util::connectHook('OCA\Contacts', 'scanCategories', 'OCA\Contacts\Hooks', 'scanCategories');
OCP\Util::connectHook('OCA\Contacts', 'indexProperties', 'OCA\Contacts\Hooks', 'indexProperties');
OCP\Util::connectHook('OC_Calendar', 'getEvents', 'OCA\Contacts\Hooks', 'getBirthdayEvents');
OCP\Util::connectHook('OC_Calendar', 'getSources', 'OCA\Contacts\Hooks', 'getCalenderSources');
OCP\App::addNavigationEntry( array(
'id' => 'contacts_index',
'order' => 10,
'href' => \OC_Helper::linkToRoute('contacts_index'),
'icon' => OCP\Util::imagePath( 'contacts', 'contacts.svg' ),
'name' => OC_L10N::get('contacts')->t('Contacts') ));
OCP\Util::addscript('contacts', 'loader');
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');
/*
if(OCP\User::isLoggedIn()) {
foreach(OCA\Contacts\Addressbook::all(OCP\USER::getUser()) as $addressbook) {
OCP\Contacts::registerAddressBook(new OCA\Contacts\AddressbookProvider($addressbook['id']));
}
}*/