fix merge conflicts

This commit is contained in:
Rodrigo Quelca
2020-12-18 19:28:38 +00:00
83 changed files with 59072 additions and 233 deletions

View File

@@ -8,6 +8,7 @@ use Criteria;
use DateTime;
use Exception;
use G;
use Illuminate\Support\Facades\DB;
use ProcessMaker\Util\Common;
use ResultSet;
use Roles as ModelRoles;
@@ -664,5 +665,30 @@ class Role
throw $e;
}
}
/**
* Get all active roles.
* @return array
*/
public static function getAllRoles()
{
$lang = defined('SYS_LANG') ? SYS_LANG : 'en';
$roles = DB::table('CONTENT')
->join('RBAC_ROLES', 'CONTENT.CON_ID', '=', 'RBAC_ROLES.ROL_UID')
->where('CONTENT.CON_CATEGORY', '=', 'ROL_NAME')
->where('CONTENT.CON_LANG', '=', $lang)
->where('RBAC_ROLES.ROL_CODE', '<>', 'RBAC_ADMIN')
->where('RBAC_ROLES.ROL_CODE', '<>', 'PROCESSMAKER_GUEST')
->where('RBAC_ROLES.ROL_STATUS', '=', '1')
->select([
'RBAC_ROLES.ROL_UID',
'RBAC_ROLES.ROL_CODE',
'CONTENT.CON_VALUE AS ROL_NAME',
'CONTENT.CON_LANG AS LANG'
])
->get()
->toArray();
return $roles;
}
}

View File

@@ -607,6 +607,10 @@ class TimerEvent
//Create
$cnn = \Propel::getConnection("workflow");
$evnUid = $arrayData['EVN_UID'];
$caseTitle = $arrayData['CASETITLE'];
Task::setTaskDefTitle($evnUid, $caseTitle);
$arrayData = $this->unsetFields($arrayData);
try {

View File

@@ -198,7 +198,6 @@ class Task extends Model
$join->on('ELEMENT_TASK_RELATION.TAS_UID', '=', 'TASK.TAS_UID')
->where('ELEMENT_TASK_RELATION.ELEMENT_UID', '=', $evnUid);
});
$query->update(['TASK.TAS_DEF_TITLE' => $caseTitle]);
return $query;
@@ -219,7 +218,12 @@ class Task extends Model
->where('ELEMENT_TASK_RELATION.ELEMENT_UID', '=', $evnUid);
});
return $query->get()->values()->toArray()['0']['TAS_DEF_TITLE'];
$res = $query->first();
if(is_null($res)) {
return "";
} else {
return $res->TAS_DEF_TITLE;
}
}
/**

View File

@@ -0,0 +1,14 @@
<?php
namespace ProcessMaker\Model;
use Illuminate\Database\Eloquent\Model;
class UserExtendedAttributes extends Model
{
protected $table = "USER_EXTENDED_ATTRIBUTES";
protected $primaryKey = "UEA_ID";
public $incrementing = true;
public $timestamps = false;
}