diff --git a/core/datamodel.core.xml b/core/datamodel.core.xml index 6d5154bab..521d6928d 100644 --- a/core/datamodel.core.xml +++ b/core/datamodel.core.xml @@ -155,7 +155,7 @@ public function DoExecute($oTrigger, $aContextArgs) { $oRecipientsSearch = DBObjectSearch::FromOQL($this->Get('recipients')); - $oRecipientsSearch->AllowAllDate(); + $oRecipientsSearch->AllowAllData(); $oRecipientsSet = new DBObjectSet($oRecipientsSearch); [$sPreviousLanguage, $aPreviousPluginProperties] = $this->SetNotificationLanguage(); while ($oRecipient = $oRecipientsSet->Fetch()) { diff --git a/sources/Controller/Newsroom/iTopNewsroomController.php b/sources/Controller/Newsroom/iTopNewsroomController.php index 8523c127b..99ebd2a6b 100644 --- a/sources/Controller/Newsroom/iTopNewsroomController.php +++ b/sources/Controller/Newsroom/iTopNewsroomController.php @@ -34,7 +34,7 @@ class iTopNewsroomController extends Controller } /** - * @return \AjaxPage + * @return \JsonPPage * @throws \ArchivedObjectException * @throws \CoreException * @throws \CoreUnexpectedValue @@ -44,7 +44,7 @@ class iTopNewsroomController extends Controller public function OperationFetchUnreadMessages() { $sCallback = utils::ReadParam('callback', ''); - $oPage = new AjaxPage(''); + $oPage = new JsonPPage($sCallback); $aMessages = []; $iContactId = UserRights::GetContactId(); @@ -78,10 +78,8 @@ HTML; } } - $sOutput = $sCallback . '(' . json_encode($aMessages) . ')'; - echo $sOutput; - $oPage->SetContentType('application/jsonp'); - $oPage->SetAddJSDict(false); + $oPage->SetData($aMessages); + $oPage->SetOutputDataOnly(true); return $oPage; } diff --git a/webservices/cron.php b/webservices/cron.php index 9f98afff5..7c0b98014 100644 --- a/webservices/cron.php +++ b/webservices/cron.php @@ -44,10 +44,11 @@ if (!file_exists($sConfigFile)) require_once(APPROOT.'/application/startup.inc.php'); -//temporary fix until below bug is resolvedd properly: -//N°7008 - Fix missing background tasks in CRON when NOT in "developer_mode" +// Temporary fix until below bug is resolved properly: +// N°7008 - Fix missing background tasks in CRON when NOT in "developer_mode" require_once(APPROOT.'/sources/SessionTracker/SessionGC.php'); require_once(APPROOT.'/sources/Service/TemporaryObjects/TemporaryObjectGC.php'); +require_once(APPROOT.'/sources/Service/Notification/Event/EventiTopNotificationGC.php'); $oCtx = new ContextTag(ContextTag::TAG_CRON);