Merge remote-tracking branch 'upstream/3.0.1.7' into 3.0.1.7-Gmail

This commit is contained in:
Dante
2015-12-04 11:41:17 -04:00
22 changed files with 259 additions and 71 deletions

View File

@@ -458,8 +458,8 @@ class Consolidated
$dataTask = $oDyna->load($dyn_uid);
if ($dataTask['DYN_VERSION'] > 0) {
G::LoadClass("pmDynaform");
$pmDyna = new \pmDynaform(array('APP_DATA' => array()));
$pmDyna->fields["CURRENT_DYNAFORM"] = $dyn_uid;
$_SESSION['PROCESS'] = $pro_uid;
$pmDyna = new \pmDynaform(array('APP_DATA' => array(), "CURRENT_DYNAFORM" => $dyn_uid));
$json = G::json_decode($dataTask["DYN_CONTENT"]);
$pmDyna->jsonr($json);
$fieldsDyna = $json->items[0]->items;

View File

@@ -147,7 +147,8 @@ class NotificationDevice
* @author Ronald Quenta <ronald.quenta@processmaker.com>
*
*/
public function routeCaseNotification($currentUserId, $processId, $currentTaskId, $appFields, $aTasks, $nextIndex)
public function routeCaseNotification($currentUserId, $processId, $currentTaskId, $appFields, $aTasks,
$nextIndex, $currentDelIndex)
{
try {
$response = array();
@@ -166,7 +167,7 @@ class NotificationDevice
$delIndex = null;
foreach ($nextIndex as $nIndex) {
if($aTask['TAS_UID'] == $nIndex['TAS_UID']){
if ($aTask['TAS_UID'] == $nIndex['TAS_UID']) {
$delIndex = $nIndex['DEL_INDEX'];
break;
}
@@ -184,10 +185,9 @@ class NotificationDevice
);
if ($userIds) {
$oNoti = new \NotificationDevice();
$devices = array();
if (is_array($userIds)){
if (is_array($userIds)) {
$devices = $oNoti->loadUsersArrayId($userIds);
} else {
$devices = $oNoti->loadByUsersId($userIds);
@@ -210,13 +210,15 @@ class NotificationDevice
break;
}
}
if (count($devicesAppleIds) > 0) {
$isExistNextNotifications = $oNoti->isExistNextNotification($appFields['APP_UID'],
$currentDelIndex);
if (count($devicesAppleIds) > 0 && $isExistNextNotifications) {
$oNotification = new PushMessageIOS();
$oNotification->setSettingNotification();
$oNotification->setDevices($devicesAppleIds);
$response['apple'] = $oNotification->send($message, $data);
}
if (count($devicesAndroidIds) > 0) {
if (count($devicesAndroidIds) > 0 && $isExistNextNotifications) {
$oNotification = new PushMessageAndroid();
$oNotification->setSettingNotification();
$oNotification->setDevices($devicesAndroidIds);

View File

@@ -112,7 +112,7 @@ class PushMessageIOS
$fp = stream_socket_client($this->url, $err, $errstr, 60, STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT, $ctx);
if (!$fp) {
throw (new \Exception( G::LoadTranslation( 'ID_FAILED' ).': ' ."$err $errstr"));
throw (new \Exception( \G::LoadTranslation( 'ID_FAILED' ).': ' ."$err $errstr"));
} else {
//echo 'Apple service is online. ' . '<br />';
}