diff --git a/appinfo/routes.php b/appinfo/routes.php index a6ceca7c..07f4f05e 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -15,7 +15,7 @@ $this->create('contacts_index', '/') ->get() ->action( function($params){ - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('PageController', 'index'); } @@ -28,7 +28,7 @@ $this->create('contacts_address_books_for_user', 'addressbooks/') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'userAddressBooks'); } @@ -38,7 +38,7 @@ $this->create('contacts_address_book_connectors', 'connectors/{backend}') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('BackendController', 'getConnectors'); } @@ -49,7 +49,7 @@ $this->create('contacts_backend_enable', 'backend/{backend}/{enable}') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('BackendController', 'enableBackend'); } @@ -60,7 +60,7 @@ $this->create('contacts_backend_status', 'backend/{backend}') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('BackendController', 'backendStatus'); } @@ -71,7 +71,7 @@ $this->create('contacts_address_book_add', 'addressbook/{backend}/add') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'addAddressBook'); } @@ -82,7 +82,7 @@ $this->create('contacts_address_book', 'addressbook/{backend}/{addressBookId}') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'getAddressBook'); } @@ -93,7 +93,7 @@ $this->create('contacts_address_book_contacts', 'addressbook/{backend}/{addressB ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'getContacts'); } @@ -104,7 +104,7 @@ $this->create('contacts_address_book_headers', 'addressbook/{backend}/{addressBo ->method('HEAD') ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'getAddressBook'); } @@ -115,7 +115,7 @@ $this->create('contacts_address_book_options', 'addressbook/{backend}/{addressBo ->method('OPTIONS') ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'getAddressBook'); } @@ -126,7 +126,7 @@ $this->create('contacts_address_book_update', 'addressbook/{backend}/{addressBoo ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'updateAddressBook'); } @@ -138,7 +138,7 @@ $this->create('contacts_address_book_delete', 'addressbook/{backend}/{addressBoo ->action( function($params) { $dispatcher = new Dispatcher($params); - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher->dispatch('AddressBookController', 'deleteAddressBook'); } ) @@ -148,7 +148,7 @@ $this->create('contacts_address_book_activate', 'addressbook/{backend}/{addressB ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'activateAddressBook'); } @@ -159,7 +159,7 @@ $this->create('contacts_address_book_add_contact', 'addressbook/{backend}/{addre ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'addChild'); } @@ -170,7 +170,7 @@ $this->create('contacts_address_book_delete_contact', 'addressbook/{backend}/{ad ->delete() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'deleteChild'); } @@ -181,7 +181,7 @@ $this->create('contacts_address_book_delete_contacts', 'addressbook/{backend}/{a ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'deleteChildren'); } @@ -192,7 +192,7 @@ $this->create('contacts_address_book_move_contact', 'addressbook/{backend}/{addr ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('AddressBookController', 'moveChild'); } @@ -203,7 +203,7 @@ $this->create('contacts_import_upload', 'addressbook/{backend}/{addressBookId}/{ ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ImportController', 'upload'); } @@ -214,7 +214,7 @@ $this->create('contacts_import_prepare', 'addressbook/{backend}/{addressBookId}/ ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ImportController', 'prepare'); } @@ -225,7 +225,7 @@ $this->create('contacts_import_start', 'addressbook/{backend}/{addressBookId}/{i ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ImportController', 'start'); } @@ -236,7 +236,7 @@ $this->create('contacts_import_status', 'addressbook/{backend}/{addressBookId}/{ ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ImportController', 'status'); } @@ -247,7 +247,7 @@ $this->create('contacts_address_book_export', 'addressbook/{backend}/{addressBoo ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ExportController', 'exportAddressBook'); } @@ -258,7 +258,7 @@ $this->create('contacts_contact_export', 'addressbook/{backend}/{addressBookId}/ ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ExportController', 'exportContact'); } @@ -269,7 +269,7 @@ $this->create('contacts_export_selected', 'exportSelected') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ExportController', 'exportSelected'); } @@ -279,7 +279,7 @@ $this->create('contacts_contact_photo', 'addressbook/{backend}/{addressBookId}/c ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactPhotoController', 'getPhoto'); } @@ -290,7 +290,7 @@ $this->create('contacts_upload_contact_photo', 'addressbook/{backend}/{addressBo ->put() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactPhotoController', 'uploadPhoto'); } @@ -301,7 +301,7 @@ $this->create('contacts_cache_contact_photo', 'addressbook/{backend}/{addressBoo ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactPhotoController', 'cacheCurrentPhoto'); } @@ -312,7 +312,7 @@ $this->create('contacts_cache_fs_photo', 'addressbook/{backend}/{addressBookId}/ ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactPhotoController', 'cacheFileSystemPhoto'); } @@ -323,7 +323,7 @@ $this->create('contacts_tmp_contact_photo', 'addressbook/{backend}/{addressBookI ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactPhotoController', 'getTempPhoto'); } @@ -334,7 +334,7 @@ $this->create('contacts_crop_contact_photo', 'addressbook/{backend}/{addressBook ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactPhotoController', 'cropPhoto'); } @@ -346,7 +346,7 @@ $this->create('contacts_contact_patch', 'addressbook/{backend}/{addressBookId}/c ->patch() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactController', 'patch'); } @@ -357,7 +357,7 @@ $this->create('contacts_contact_get', 'addressbook/{backend}/{addressBookId}/con ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactController', 'getContact'); } @@ -369,7 +369,7 @@ $this->create('contacts_contact_save_all', 'addressbook/{backend}/{addressBookId ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('ContactController', 'saveContact'); } @@ -380,7 +380,7 @@ $this->create('contacts_categories_list', 'groups/') ->get() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('GroupController', 'getGroups'); } @@ -390,7 +390,7 @@ $this->create('contacts_categories_add', 'groups/add') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('GroupController', 'addGroup'); } @@ -400,7 +400,7 @@ $this->create('contacts_categories_delete', 'groups/delete') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('GroupController', 'deleteGroup'); } @@ -410,7 +410,7 @@ $this->create('contacts_categories_rename', 'groups/rename') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('GroupController', 'renameGroup'); } @@ -420,7 +420,7 @@ $this->create('contacts_categories_addto', 'groups/addto/{categoryId}') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('GroupController', 'addToGroup'); } @@ -430,7 +430,7 @@ $this->create('contacts_categories_removefrom', 'groups/removefrom/{categoryId}' ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('GroupController', 'removeFromGroup'); } @@ -441,7 +441,7 @@ $this->create('contacts_setpreference', 'preference/set') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); $dispatcher = new Dispatcher($params); $dispatcher->dispatch('SettingsController', 'set'); } @@ -451,7 +451,7 @@ $this->create('contacts_index_properties', 'indexproperties/{user}/') ->post() ->action( function($params) { - \OC::$session->close(); + \OC::$server->getSession()->close(); // TODO: Add BackgroundJob for this. \OCP\Util::emitHook('OCA\Contacts', 'indexProperties', array());