diff --git a/appinfo/app.php b/appinfo/app.php index 29c0cf1a..b340942b 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -32,10 +32,13 @@ namespace OCA\Contacts; \OCP\Util::connectHook('OC_Calendar', 'getEvents', 'OCA\Contacts\Hooks', 'getBirthdayEvents'); \OCP\Util::connectHook('OC_Calendar', 'getSources', 'OCA\Contacts\Hooks', 'getCalenderSources'); -$url = \OC::$server->getRequest()->server['REQUEST_URI']; +$request = \OC::$server->getRequest(); +if (isset($request->server['REQUEST_URI'])) { + $url = $request->server['REQUEST_URI']; -if (preg_match('%index.php/apps/files(/.*)?%', $url)) { - \OCP\Util::addscript('contacts', 'loader'); + if (preg_match('%index.php/apps/files(/.*)?%', $url)) { + \OCP\Util::addscript('contacts', 'loader'); + } } \OC::$server->getSearch()->registerProvider('OCA\Contacts\Search\Provider', array('apps' => array('contacts')));