N°2039 - Fix some issues with content type, bg task and typos

This commit is contained in:
Stephen Abello
2024-01-03 11:46:38 +01:00
parent cb64dbe79f
commit 135d410a6b
3 changed files with 8 additions and 9 deletions

View File

@@ -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()) {

View File

@@ -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;
}

View File

@@ -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);