@@ -2519,11 +2519,13 @@ class wsBase
|
||||
|
||||
// Send notifications Mobile - Start
|
||||
try {
|
||||
$notificationMobile = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
|
||||
if ($notificationMobile->checkMobileNotifications()) {
|
||||
$oLight = new \ProcessMaker\BusinessModel\Light();
|
||||
$nextIndex = $oLight->getInformationDerivatedCase($appFields['APP_UID'], $delIndex);
|
||||
$notificationMobile = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
|
||||
$notificationMobile->routeCaseNotification($userId, $_SESSION["PROCESS"], $appdel['TAS_UID'],
|
||||
$appFields, $nextDelegations, $nextIndex, $delIndex);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
\G::log(G::loadTranslation( 'ID_NOTIFICATION_ERROR' ) . '|' . $e->getMessage() , PATH_DATA, "mobile.log");
|
||||
}
|
||||
|
||||
@@ -201,11 +201,13 @@ try {
|
||||
|
||||
// Send notifications Mobile - Start
|
||||
try {
|
||||
$notificationMobile = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
|
||||
if ($notificationMobile->checkMobileNotifications()) {
|
||||
$oLight = new \ProcessMaker\BusinessModel\Light();
|
||||
$nextIndex = $oLight->getInformationDerivatedCase($appFields['APP_UID'], $appFields['DEL_INDEX']);
|
||||
$notificationMobile = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
|
||||
$notificationMobile->routeCaseNotification($_SESSION['USER_LOGGED'], $_SESSION['PROCESS'], $_SESSION['TASK'],
|
||||
$appFields, $_POST['form']['TASKS'], $nextIndex, $appFields['DEL_INDEX']);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
\G::log(G::loadTranslation( 'ID_NOTIFICATION_ERROR' ) . '|' . $e->getMessage() , PATH_DATA, "mobile.log");
|
||||
}
|
||||
|
||||
@@ -7,6 +7,18 @@ use G;
|
||||
|
||||
class NotificationDevice
|
||||
{
|
||||
|
||||
|
||||
public function checkMobileNotifications()
|
||||
{
|
||||
$conf = \System::getSystemConfiguration('', '', SYS_SYS);
|
||||
$activeNotifications = true;
|
||||
if (isset($conf['mobileNotifications'])) {
|
||||
$activeNotifications = $conf['mobileNotifications'] == 1 ? true : false;
|
||||
}
|
||||
return $activeNotifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post Create register device with userUid
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user