diff --git a/api/src/Etemplate/Widget/Url.php b/api/src/Etemplate/Widget/Url.php index afaf2eb7b0..c6324ee8a9 100644 --- a/api/src/Etemplate/Widget/Url.php +++ b/api/src/Etemplate/Widget/Url.php @@ -157,8 +157,9 @@ class Url extends Etemplate\Widget public static function ajax_contact($_email) { $email = \EGroupware\Api\Mail::stripRFC822Addresses(array($_email)); + $response = \EGroupware\Api\Json\Response::get(); $result = $GLOBALS['egw']->contacts->search(array('contact_email'=>$email[0], 'contact_email_home' => $email[0]), array('email','email_home'), '', '', '', false, 'OR', false); - \EGroupware\Api\Json\Response::data($result ? true : false); + $response->data($result ? true : false); } } diff --git a/api/src/Json/Request.php b/api/src/Json/Request.php index 3a2ace84f9..5c3f2a08b9 100644 --- a/api/src/Json/Request.php +++ b/api/src/Json/Request.php @@ -103,6 +103,8 @@ class Request { $this->handleRequest($menuaction, $parameters); } + // check if we have push notifications, if notifications app available + if (class_exists('notifications_push')) notifications_push::get(); } /** @@ -191,7 +193,6 @@ class Request call_user_func_array(array($ajaxClass, $functionName), Api\Translation::convert($parameters, 'utf-8')); - // check if we have push notifications, if notifications app available - if (class_exists('notifications_push')) notifications_push::get(); + } }