mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Merge pull request #973 from RealRancor/fix_undefined_index
Fix "Undefined index: REQUEST_URI" on cron runs
This commit is contained in:
commit
d1fc2e0baa
@ -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')));
|
||||
|
Loading…
Reference in New Issue
Block a user