Fixed add solution that was not compliant with GLPI9.5
Fixed curl issue at form save Fixed task cat that were active after add or updates Added a $DB->escape() to escape special chars before query fixes Added a test to prevent empty IN Removed deprecated functions Set version to 4.0.11
This commit is contained in:
@@ -10,6 +10,5 @@ version 3.6.x is compatible with GLPI 9.4 and needs ProcessMaker 3.3.0-RE-1.x (h
|
||||
|
||||
version 4.0.x is compatible with GLPI 9.5 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
||||
|
||||
This plugin can run classic and bpmn processes
|
||||
This plugin can run classic (ProcessMaker server v2) and BPMN (ProcessMaker server v3 and later) processes
|
||||
|
||||
An IRC channel is available: #processmaker-glpi on https://webchat.freenode.net/
|
||||
|
||||
48
hook.php
48
hook.php
@@ -282,7 +282,6 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$locCase = new PluginProcessmakerCase;
|
||||
$locCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']);
|
||||
$srccase_guid = $locCase->fields['case_guid'];
|
||||
|
||||
//$msg = Toolbox::backtrace(false);
|
||||
//$msg .= ' $locCase: '.str_replace("\n", "\n ", print_r($locCase, true))."\n";
|
||||
//$msg .= ' $task: '.str_replace("\n", "\n ", print_r($parm, true))."\n";
|
||||
@@ -320,6 +319,15 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$casevariables = array_merge( $casevariables, $matches[1] );
|
||||
}
|
||||
}
|
||||
if (preg_match_all( "/@@(\w+)/u", $externalapplication['url'], $matches )) {
|
||||
$casevariables = array_merge( $casevariables, $matches[1] );
|
||||
}
|
||||
if(isset($externalapplication['headers']) && $externalapplication['headers'] != "") {
|
||||
if (preg_match_all( "/@@(\w+)/u", $externalapplication['headers'], $matches )) {
|
||||
$casevariables = array_merge( $casevariables, $matches[1] );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ask for those case variables
|
||||
@@ -327,8 +335,10 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
//$PM_SOAP->login( );
|
||||
// now tries to get the variables to check condition
|
||||
$infoForTasks = $locCase->getVariables($casevariables);
|
||||
$infoForURL = [];
|
||||
foreach ($infoForTasks as $casevar => $varval) {
|
||||
$infoForTasks[ "@@$casevar" ] = "'$varval'";
|
||||
$infoForURL[ "@@$casevar" ] = $varval;
|
||||
unset( $infoForTasks[ $casevar ] );
|
||||
}
|
||||
|
||||
@@ -336,9 +346,7 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
//$msg .= ' $targetTask: '.str_replace("\n", "\n ", print_r($targetTask, true))."\n";
|
||||
|
||||
$targetTask['sourcecondition'] = str_replace( array_keys($infoForTasks), $infoForTasks, $targetTask['sourcecondition'] );
|
||||
|
||||
$eval = eval( "return (".$targetTask['sourcecondition']." ? 1 : 0);" );
|
||||
|
||||
//$msg .= ' $infoForTasks: '.str_replace("\n", "\n ", print_r($infoForTasks, true))."\n";
|
||||
//$msg .= ' $targetTask[\'sourcecondition\']: '.str_replace("\n", "\n ", print_r($targetTask['sourcecondition'], true))."\n";
|
||||
//$msg .= ' $result: '."$eval\n";
|
||||
@@ -366,7 +374,8 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
}
|
||||
$externalapplicationparams['callback'] = $CFG_GLPI["url_base"]."/plugins/processmaker/ajax/asynchronousdatas.php";
|
||||
$ch = curl_init();
|
||||
$externalapplication['url'] = eval( "return '".str_replace( array_keys($infoForTasks), $infoForTasks, $externalapplication['url'])."' ;" ); // '???
|
||||
|
||||
$externalapplication['url'] = str_replace( array_keys($infoForURL), $infoForURL, $externalapplication['url']);
|
||||
curl_setopt($ch, CURLOPT_URL, $externalapplication['url'] );
|
||||
if (isset($externalapplication['method']) && $externalapplication['method'] == 'POST') {
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
@@ -391,7 +400,8 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$pmconfig = $PM_SOAP->config; //PluginProcessmakerConfig::getInstance();
|
||||
|
||||
$cronaction = new PluginProcessmakerCrontaskaction;
|
||||
$cronaction->add( [ 'plugin_processmaker_caselinks_id' => $targetTask['id'],
|
||||
$cronaction->add([
|
||||
'plugin_processmaker_caselinks_id' => $targetTask['id'],
|
||||
'plugin_processmaker_cases_id' => $locCase->getID(),
|
||||
//'itemtype' => $itemtype,
|
||||
//'items_id' => $parm->fields['tickets_id'],
|
||||
@@ -400,9 +410,7 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
'state' => ($targetTask['is_externaldata'] ? PluginProcessmakerCrontaskaction::WAITING_DATA : PluginProcessmakerCrontaskaction::DATA_READY),
|
||||
'postdata' => json_encode( $postdata, JSON_HEX_APOS | JSON_HEX_QUOT),
|
||||
'logs_out' => json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT)
|
||||
],
|
||||
null,
|
||||
false);
|
||||
], [], false);
|
||||
|
||||
if ($externalapplication) {
|
||||
// must call external application in order to get the needed data asynchroneously
|
||||
@@ -415,12 +423,26 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$externalapplicationparams = json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT);
|
||||
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $externalapplicationparams);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: ' . strlen($externalapplicationparams), 'Expect:']);
|
||||
$headers = [
|
||||
'Content-Type: application/json',
|
||||
'Content-Length: ' . strlen($externalapplicationparams),
|
||||
'Expect:'];
|
||||
if(isset($externalapplication['headers']) && $externalapplication['headers'] != "") {
|
||||
$externalapplication['headers'] = eval( "return ".str_replace( array_keys($infoForTasks), $infoForTasks, $externalapplication['headers'])." ;" ); // '???
|
||||
//Can't add an assoicative array in curlopt_httpheader
|
||||
foreach($externalapplication['headers'] as $key => $h) {
|
||||
array_push($headers, $key.": ".$h);
|
||||
}
|
||||
}
|
||||
//$headers = array_merge($headers, $externalapplication['headers']);
|
||||
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
||||
|
||||
if (isset($externalapplication['ssl_verify'])) {
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $externalapplication['ssl_verify']);
|
||||
if (isset($externalapplication['ssl_verify']) && $externalapplication['ssl_verify'] > 0) {
|
||||
//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $externalapplication['ssl_verify']);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $externalapplication['ssl_verify']);
|
||||
}
|
||||
|
||||
@@ -432,7 +454,9 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$response = curl_exec ($ch);
|
||||
if ($response === false) {
|
||||
//throw new Exception(curl_error($ch), curl_errno($ch));
|
||||
Toolbox::logDebug( curl_error($ch).":".curl_errno($ch) );
|
||||
Toolbox::logDebug(curl_error($ch) . ":" . curl_errno($ch));
|
||||
// Set 0 to the crontask action status
|
||||
$cronaction->update(['id ' => $cronaction->getID(), 'state' => PluginProcessmakerCrontaskaction::CURL_ERROR]);
|
||||
}
|
||||
|
||||
curl_close ($ch);
|
||||
|
||||
@@ -14,7 +14,7 @@ class PluginProcessmakerCrontaskaction extends CommonDBTM {
|
||||
// postdata are of the form:
|
||||
// {"form":{"RELEASE_DONE":"0","btnGLPISendRequest":"submit"},"UID":"28421020557bffc5b374850018853291","__DynaformName__":"51126098657bd96b286ded7016691792_28421020557bffc5b374850018853291","__notValidateThisFields__":"[]","DynaformRequiredFields":"[]","APP_UID":"6077575685836f7d89cabe6013770123","DEL_INDEX":"4"}
|
||||
|
||||
|
||||
const CURL_ERROR = 0;
|
||||
const WAITING_DATA = 1;
|
||||
const DATA_READY = 2;
|
||||
const DONE = 3;
|
||||
|
||||
@@ -151,16 +151,16 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
||||
$countElt += $dbu->countElementsInTable( $dbu->getTableForItemType($obj), "taskcategories_id = ".$task['taskcategories_id'] );
|
||||
if ($countElt != 0) {
|
||||
// just set 'is_active' to 0
|
||||
$pmtask->Update( [ 'id' => $task['id'], 'is_start' => 0, 'is_active' => 0 ] );
|
||||
$pmtask->Update(['id' => $task['id'], 'is_start' => 0, 'is_active' => 0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($countElt == 0) {
|
||||
// purge this category as it is not used anywhere
|
||||
$taskCat = new TaskCategory;
|
||||
$taskCat->delete([ 'id' => $task['taskcategories_id'] ], 1);
|
||||
$taskCat->delete(['id' => $task['taskcategories_id']], 1);
|
||||
$pmTaskCat = new PluginProcessmakerTaskCategory;
|
||||
$pmTaskCat->delete([ 'id' => $task['id'] ], 1);
|
||||
$pmTaskCat->delete(['id' => $task['id']], 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,32 +169,52 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
||||
$taskCat = new TaskCategory;
|
||||
if ($pmTaskCat->getFromGUID( $taskGUID )) {
|
||||
// got it then check names, and if != update
|
||||
if ($taskCat->getFromDB( $pmTaskCat->fields['taskcategories_id'] )) {
|
||||
if ($taskCat->getFromDB($pmTaskCat->fields['taskcategories_id'])) {
|
||||
// found it must test if should be updated
|
||||
if ($taskCat->fields['name'] != $task['TAS_TITLE'] || $taskCat->fields['comment'] != $task['TAS_DESCRIPTION']) {
|
||||
$taskCat->update( [ 'id' => $taskCat->getID(), 'name' => $PM_DB->escape($task['TAS_TITLE']), 'comment' => $PM_DB->escape($task['TAS_DESCRIPTION']), 'taskcategories_id' => $this->fields['taskcategories_id'] ] );
|
||||
if ($taskCat->fields['name'] != $task['TAS_TITLE']
|
||||
|| $taskCat->fields['comment'] != $task['TAS_DESCRIPTION']) {
|
||||
$taskCat->update([
|
||||
'id' => $taskCat->getID(),
|
||||
'name' => $PM_DB->escape($task['TAS_TITLE']),
|
||||
'comment' => $PM_DB->escape($task['TAS_DESCRIPTION']),
|
||||
'taskcategories_id' => $this->fields['taskcategories_id'],
|
||||
'is_active' => 0 // to prevent use of this task cat in manual tasks
|
||||
] );
|
||||
}
|
||||
if ($pmTaskCat->fields['is_start'] != $task['is_start']) {
|
||||
$pmTaskCat->update( [ 'id' => $pmTaskCat->getID(), 'is_start' => $task['is_start'] ] );
|
||||
$pmTaskCat->update(['id' => $pmTaskCat->getID(), 'is_start' => $task['is_start']]);
|
||||
}
|
||||
} else {
|
||||
// taskcat must be created
|
||||
$taskCat->add( [ 'is_recursive' => true, 'name' => $PM_DB->escape($task['TAS_TITLE']), 'comment' => $PM_DB->escape($task['TAS_DESCRIPTION']), 'taskcategories_id' => $this->fields['taskcategories_id'] ] );
|
||||
$taskCat->add([
|
||||
'is_recursive' => true,
|
||||
'name' => $PM_DB->escape($task['TAS_TITLE']),
|
||||
'comment' => $PM_DB->escape($task['TAS_DESCRIPTION']),
|
||||
'taskcategories_id' => $this->fields['taskcategories_id'],
|
||||
'is_active' => 0 // to prevent use of this task cat in manual tasks
|
||||
] );
|
||||
// update pmTaskCat
|
||||
$pmTaskCat->update( [ 'id' => $pmTaskCat->getID(), 'taskcategories_id' => $taskCat->getID(), 'is_start' => $task['is_start'] ] );
|
||||
$pmTaskCat->update(['id' => $pmTaskCat->getID(), 'taskcategories_id' => $taskCat->getID(), 'is_start' => $task['is_start']]);
|
||||
}
|
||||
} else {
|
||||
// should create a new one
|
||||
// taskcat must be created
|
||||
$taskCat->add( [ 'is_recursive' => true, 'name' => $PM_DB->escape($task['TAS_TITLE']), 'comment' => $PM_DB->escape($task['TAS_DESCRIPTION']), 'taskcategories_id' => $this->fields['taskcategories_id'] ] );
|
||||
$taskCat->add([
|
||||
'is_recursive' => true,
|
||||
'name' => $PM_DB->escape($task['TAS_TITLE']),
|
||||
'comment' => $PM_DB->escape($task['TAS_DESCRIPTION']),
|
||||
'taskcategories_id' => $this->fields['taskcategories_id'],
|
||||
'is_active' => 0 // to prevent use of this task cat in manual tasks
|
||||
] );
|
||||
// pmTaskCat must be created too
|
||||
$pmTaskCat->add( ['plugin_processmaker_processes_id' => $this->getID(),
|
||||
$pmTaskCat->add([
|
||||
'plugin_processmaker_processes_id' => $this->getID(),
|
||||
'pm_task_guid' => $taskGUID,
|
||||
'taskcategories_id' => $taskCat->getID(),
|
||||
'is_start' => $task['is_start'],
|
||||
'is_active' => 1,
|
||||
'is_subprocess' => $task['is_subprocess']
|
||||
] );
|
||||
]);
|
||||
}
|
||||
// here we should take into account translations if any
|
||||
if (isset($taskArray[ $taskGUID ])) {
|
||||
@@ -371,7 +391,12 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
||||
global $PM_DB;
|
||||
$taskCat = new TaskCategory;
|
||||
if ($taskCat->getFromDB( $this->fields['taskcategories_id'] ) && $taskCat->fields['name'] != $this->fields['name']) {
|
||||
return $taskCat->update( [ 'id' => $taskCat->getID(), 'taskcategories_id' => $pmMainTaskCat, 'name' => $PM_DB->escape($this->fields['name'])] );
|
||||
return $taskCat->update([
|
||||
'id' => $taskCat->getID(),
|
||||
'taskcategories_id' => $pmMainTaskCat,
|
||||
'name' => $PM_DB->escape($this->fields['name']),
|
||||
'is_active' => 0 // to prevent use of this task cat in a manual task
|
||||
] );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -385,7 +410,12 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
||||
function addTaskCategory($pmMainTaskCat) {
|
||||
global $PM_DB;
|
||||
$taskCat = new TaskCategory;
|
||||
if ($taskCat->add( [ 'is_recursive' => true, 'taskcategories_id' => $pmMainTaskCat, 'name' => $PM_DB->escape($this->fields['name'])] )) {
|
||||
if ($taskCat->add([
|
||||
'is_recursive' => true,
|
||||
'taskcategories_id' => $pmMainTaskCat,
|
||||
'name' => $PM_DB->escape($this->fields['name']),
|
||||
'is_active' => 0 // to prevent use of this task cat in a manual task
|
||||
])) {
|
||||
return $this->update( [ 'id' => $this->getID(), 'taskcategories_id' => $taskCat->getID() ] );
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1569,7 +1569,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
||||
'itemtype' => $itemtype,
|
||||
'items_id' => $items_id,
|
||||
'entities_id' => $parm->fields['entities_id'],
|
||||
'name' => $caseInfo->caseName,
|
||||
'name' => $DB->escape($caseInfo->caseName),
|
||||
'case_guid' => $case_guid,
|
||||
'case_status' => $caseInfo->caseStatus,
|
||||
'plugin_processmaker_processes_id' => $parm->input['processmaker_processes_id']
|
||||
@@ -1840,7 +1840,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
||||
$query = "SELECT id AS glpi_group_id FROM glpi_groups WHERE name LIKE '$pmGroupName';";
|
||||
$res = $DB->query($query);
|
||||
if ($DB->numrows($res) > 0) {
|
||||
$row = $DB->fetch_array($res);
|
||||
$row = $DB->fetchArray($res);
|
||||
return $row['glpi_group_id'];
|
||||
}
|
||||
}
|
||||
@@ -1950,13 +1950,12 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
||||
global $DB;
|
||||
|
||||
$dbu = new DbUtils;
|
||||
$item = $dbu->getItemForItemtype( $itemType );
|
||||
if ($item->getFromDB( $itemId )) {
|
||||
$item = $dbu->getItemForItemtype($itemType);
|
||||
if ($item->getFromDB($itemId)) {
|
||||
// default values
|
||||
$solutiontemplates_id = 0;
|
||||
$solutiontypes_id = 0;
|
||||
$solution = '';
|
||||
$to_update = false;
|
||||
$solution_content = '';
|
||||
$to_add = false;
|
||||
|
||||
// check solution template
|
||||
if (array_key_exists( 'GLPI_ITEM_SET_SOLUTION_TEMPLATE_ID', $casevariablevalues )
|
||||
@@ -1968,10 +1967,9 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
||||
$entities = $template->isRecursive() ? $dbu->getSonsOf(Entity::getTable(), $template->getEntityID()) : [$template->getEntityID()];
|
||||
// and check entities
|
||||
if (in_array($item->getEntityID(), $entities)) {
|
||||
$solutiontemplates_id = $template->getID();
|
||||
$solutiontypes_id = $template->fields['solutiontypes_id'];
|
||||
$solution = $template->fields['content'];
|
||||
$to_update = true;
|
||||
$solution_content = $template->fields['content'];
|
||||
$to_add = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1986,22 +1984,28 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
||||
// and check entities
|
||||
if (in_array($item->getEntityID(), $entities)) {
|
||||
$solutiontypes_id = $type->getID();
|
||||
$to_update = true;
|
||||
$to_add = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Check solution description
|
||||
if (array_key_exists( 'GLPI_ITEM_APPEND_TO_SOLUTION_DESCRIPTION', $casevariablevalues )
|
||||
&& $casevariablevalues[ 'GLPI_ITEM_APPEND_TO_SOLUTION_DESCRIPTION' ] != '') {
|
||||
if ($solution != '') {
|
||||
$solution .= "\n";
|
||||
if ($solution_content != '') {
|
||||
$solution_content .= "\n";
|
||||
}
|
||||
$solution .= $DB->escape($casevariablevalues[ 'GLPI_ITEM_APPEND_TO_SOLUTION_DESCRIPTION' ]);
|
||||
$to_update = true;
|
||||
$solution_content .= $DB->escape($casevariablevalues[ 'GLPI_ITEM_APPEND_TO_SOLUTION_DESCRIPTION' ]);
|
||||
$to_add = true;
|
||||
}
|
||||
|
||||
if ($to_update) {
|
||||
$item->update( ['id' => $itemId, 'solutiontemplates_id' => $solutiontemplates_id, 'solutiontypes_id' => $solutiontypes_id, 'solution' => $solution] );
|
||||
if ($to_add) {
|
||||
$solution = new ITILSolution();
|
||||
$solution->add([
|
||||
'itemtype' => $itemType,
|
||||
'items_id' => $itemId,
|
||||
'solutiontypes_id' => $solutiontypes_id,
|
||||
'content' => $solution_content
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2455,7 +2459,7 @@ debugger;
|
||||
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Expect:"]);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->config->fields['ssl_verify']);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->config->fields['ssl_verify']);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, ($this->config->fields['ssl_verify'] > 0 ? 2 : 0));
|
||||
|
||||
//curl_setopt($ch, CURLOPT_HEADERFUNCTION, "HandleHeaderLine");
|
||||
// to store cookies in memory
|
||||
@@ -3039,7 +3043,7 @@ debugger;
|
||||
}
|
||||
|
||||
if ($itemSetStatus != '') {
|
||||
$this->setItemStatus($itemtype, $items_id, $itemSetStatus );
|
||||
$this->setItemStatus($itemtype, $items_id, $itemSetStatus);
|
||||
}
|
||||
|
||||
// get the new case info
|
||||
@@ -3507,9 +3511,11 @@ debugger;
|
||||
// or
|
||||
// as there is only one group per guid
|
||||
// then we should have at maximun 1 record
|
||||
if (isset($queryname)) {
|
||||
foreach ($PM_DB->request($queryname) as $onlyrec) {
|
||||
$groupname = $onlyrec;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($groupname)) {
|
||||
return ['name' => $groupname['GRP_TITLE'],
|
||||
|
||||
@@ -110,6 +110,9 @@ class PluginProcessmakerUser extends CommonDBTM {
|
||||
break;
|
||||
}
|
||||
|
||||
if (count($pmUsers) == 0) { // to prevent add of empty array in where clause
|
||||
$pmUsers = 0;
|
||||
}
|
||||
$query['WHERE']['AND']['glpi_plugin_processmaker_users.pm_users_id'] = $pmUsers;
|
||||
$query['WHERE']['AND']['glpi_users.is_deleted'] = 0;
|
||||
$query['WHERE']['AND']['glpi_users.is_active'] = 1;
|
||||
@@ -132,7 +135,7 @@ class PluginProcessmakerUser extends CommonDBTM {
|
||||
$query['DISTINCT'] = true;
|
||||
|
||||
}
|
||||
$query['FROM'] = 'glpi_plugin_processmaker_users';
|
||||
|
||||
$query['FROM'] = 'glpi_plugin_processmaker_users';
|
||||
$query['INNER JOIN'] = [
|
||||
'glpi_users' => [
|
||||
|
||||
@@ -53,7 +53,7 @@ function update_to_3_2_8() {
|
||||
";
|
||||
$DB->query($query) or die("error adding column processes_id into glpi_plugin_processmaker_cases" . $DB->error());
|
||||
} else {
|
||||
$flds = $DB->list_fields('glpi_plugin_processmaker_cases');
|
||||
$flds = $DB->listFields('glpi_plugin_processmaker_cases');
|
||||
if (strcasecmp( $flds['processes_id']['Type'], 'varchar(32)' ) == 0) {
|
||||
// required because autoload doesn't work for unactive plugin'
|
||||
include_once(GLPI_ROOT."/plugins/processmaker/inc/process.class.php");
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<compatibility>9.4</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>4.0.8</num>
|
||||
<num>4.0.11</num>
|
||||
<compatibility>9.5</compatibility>
|
||||
</version>
|
||||
</versions>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define('PROCESSMAKER_VERSION', '4.0.8');
|
||||
define('PROCESSMAKER_VERSION', '4.0.11');
|
||||
|
||||
// used for case cancellation
|
||||
define("CANCEL", 256);
|
||||
@@ -130,7 +130,7 @@ function plugin_init_processmaker() {
|
||||
// in order to manage the password encryption
|
||||
$pmglpikey = new PluginProcessmakerGlpikey;
|
||||
foreach ($pmglpikey->getFields() as $fld) {
|
||||
$PLUGIN_HOOKS['secured_fields'][] = $fld;
|
||||
$PLUGIN_HOOKS['secured_fields'][] = [$fld];
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user