diff --git a/appinfo/app.php b/appinfo/app.php index 6468e797..c673b040 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -37,8 +37,11 @@ $api->connectHook('OCA\Contacts', 'indexProperties', '\OCA\Contacts\Hooks', 'ind $api->connectHook('OC_Calendar', 'getEvents', 'OCA\Contacts\Hooks', 'getBirthdayEvents'); $api->connectHook('OC_Calendar', 'getSources', 'OCA\Contacts\Hooks', 'getCalenderSources'); -\OCP\Util::addscript('contacts', 'loader'); -\OCP\Util::addscript('contacts', 'admin'); +$url = \OC::$server->getRequest()->server['REQUEST_URI']; + +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'))); \OCP\Share::registerBackend('contact', 'OCA\Contacts\Share\Contact'); diff --git a/templates/admin.php b/templates/admin.php index 10ee9118..e8e4f37e 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -10,6 +10,7 @@ * later. */ +script('contacts', 'admin') ?>