GLPI 9.5 compliance
Set version to 4.0.0
This commit is contained in:
17
.gitattributes
vendored
17
.gitattributes
vendored
@@ -1,17 +0,0 @@
|
|||||||
# Auto detect text files and perform LF normalization
|
|
||||||
* text=auto
|
|
||||||
|
|
||||||
# Custom for Visual Studio
|
|
||||||
*.cs diff=csharp
|
|
||||||
|
|
||||||
# Standard to msysgit
|
|
||||||
*.doc diff=astextplain
|
|
||||||
*.DOC diff=astextplain
|
|
||||||
*.docx diff=astextplain
|
|
||||||
*.DOCX diff=astextplain
|
|
||||||
*.dot diff=astextplain
|
|
||||||
*.DOT diff=astextplain
|
|
||||||
*.pdf diff=astextplain
|
|
||||||
*.PDF diff=astextplain
|
|
||||||
*.rtf diff=astextplain
|
|
||||||
*.RTF diff=astextplain
|
|
||||||
216
.gitignore
vendored
216
.gitignore
vendored
@@ -1,216 +0,0 @@
|
|||||||
#################
|
|
||||||
## Eclipse
|
|
||||||
#################
|
|
||||||
|
|
||||||
*.pydevproject
|
|
||||||
.project
|
|
||||||
.metadata
|
|
||||||
bin/
|
|
||||||
tmp/
|
|
||||||
*.tmp
|
|
||||||
*.bak
|
|
||||||
*.swp
|
|
||||||
*~.nib
|
|
||||||
local.properties
|
|
||||||
.classpath
|
|
||||||
.settings/
|
|
||||||
.loadpath
|
|
||||||
|
|
||||||
# External tool builders
|
|
||||||
.externalToolBuilders/
|
|
||||||
|
|
||||||
# Locally stored "Eclipse launch configurations"
|
|
||||||
*.launch
|
|
||||||
|
|
||||||
# CDT-specific
|
|
||||||
.cproject
|
|
||||||
|
|
||||||
# PDT-specific
|
|
||||||
.buildpath
|
|
||||||
|
|
||||||
|
|
||||||
#################
|
|
||||||
## Visual Studio
|
|
||||||
#################
|
|
||||||
|
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
|
||||||
## files generated by popular Visual Studio add-ons.
|
|
||||||
|
|
||||||
# User-specific files
|
|
||||||
*.suo
|
|
||||||
*.user
|
|
||||||
*.sln.docstates
|
|
||||||
|
|
||||||
# Build results
|
|
||||||
|
|
||||||
[Dd]ebug/
|
|
||||||
[Rr]elease/
|
|
||||||
x64/
|
|
||||||
build/
|
|
||||||
[Bb]in/
|
|
||||||
[Oo]bj/
|
|
||||||
|
|
||||||
# MSTest test Results
|
|
||||||
[Tt]est[Rr]esult*/
|
|
||||||
[Bb]uild[Ll]og.*
|
|
||||||
|
|
||||||
*_i.c
|
|
||||||
*_p.c
|
|
||||||
*.ilk
|
|
||||||
*.meta
|
|
||||||
*.obj
|
|
||||||
*.pch
|
|
||||||
*.pdb
|
|
||||||
*.pgc
|
|
||||||
*.pgd
|
|
||||||
*.rsp
|
|
||||||
*.sbr
|
|
||||||
*.tlb
|
|
||||||
*.tli
|
|
||||||
*.tlh
|
|
||||||
*.tmp
|
|
||||||
*.tmp_proj
|
|
||||||
*.log
|
|
||||||
*.vspscc
|
|
||||||
*.vssscc
|
|
||||||
.builds
|
|
||||||
*.pidb
|
|
||||||
*.log
|
|
||||||
*.scc
|
|
||||||
|
|
||||||
# Visual C++ cache files
|
|
||||||
ipch/
|
|
||||||
*.aps
|
|
||||||
*.ncb
|
|
||||||
*.opensdf
|
|
||||||
*.sdf
|
|
||||||
*.cachefile
|
|
||||||
|
|
||||||
# Visual Studio profiler
|
|
||||||
*.psess
|
|
||||||
*.vsp
|
|
||||||
*.vspx
|
|
||||||
|
|
||||||
# Guidance Automation Toolkit
|
|
||||||
*.gpState
|
|
||||||
|
|
||||||
# ReSharper is a .NET coding add-in
|
|
||||||
_ReSharper*/
|
|
||||||
*.[Rr]e[Ss]harper
|
|
||||||
|
|
||||||
# TeamCity is a build add-in
|
|
||||||
_TeamCity*
|
|
||||||
|
|
||||||
# DotCover is a Code Coverage Tool
|
|
||||||
*.dotCover
|
|
||||||
|
|
||||||
# NCrunch
|
|
||||||
*.ncrunch*
|
|
||||||
.*crunch*.local.xml
|
|
||||||
|
|
||||||
# Installshield output folder
|
|
||||||
[Ee]xpress/
|
|
||||||
|
|
||||||
# DocProject is a documentation generator add-in
|
|
||||||
DocProject/buildhelp/
|
|
||||||
DocProject/Help/*.HxT
|
|
||||||
DocProject/Help/*.HxC
|
|
||||||
DocProject/Help/*.hhc
|
|
||||||
DocProject/Help/*.hhk
|
|
||||||
DocProject/Help/*.hhp
|
|
||||||
DocProject/Help/Html2
|
|
||||||
DocProject/Help/html
|
|
||||||
|
|
||||||
# Click-Once directory
|
|
||||||
publish/
|
|
||||||
|
|
||||||
# Publish Web Output
|
|
||||||
*.Publish.xml
|
|
||||||
*.pubxml
|
|
||||||
*.publishproj
|
|
||||||
|
|
||||||
# NuGet Packages Directory
|
|
||||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
|
||||||
#packages/
|
|
||||||
|
|
||||||
# Windows Azure Build Output
|
|
||||||
csx
|
|
||||||
*.build.csdef
|
|
||||||
|
|
||||||
# Windows Store app package directory
|
|
||||||
AppPackages/
|
|
||||||
|
|
||||||
# Others
|
|
||||||
sql/
|
|
||||||
*.Cache
|
|
||||||
ClientBin/
|
|
||||||
[Ss]tyle[Cc]op.*
|
|
||||||
~$*
|
|
||||||
*~
|
|
||||||
*.dbmdl
|
|
||||||
*.[Pp]ublish.xml
|
|
||||||
*.pfx
|
|
||||||
*.publishsettings
|
|
||||||
|
|
||||||
# RIA/Silverlight projects
|
|
||||||
Generated_Code/
|
|
||||||
|
|
||||||
# Backup & report files from converting an old project file to a newer
|
|
||||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
|
||||||
_UpgradeReport_Files/
|
|
||||||
Backup*/
|
|
||||||
UpgradeLog*.XML
|
|
||||||
UpgradeLog*.htm
|
|
||||||
|
|
||||||
# SQL Server files
|
|
||||||
App_Data/*.mdf
|
|
||||||
App_Data/*.ldf
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Windows detritus
|
|
||||||
#############
|
|
||||||
|
|
||||||
# Windows image file caches
|
|
||||||
Thumbs.db
|
|
||||||
ehthumbs.db
|
|
||||||
|
|
||||||
# Folder config file
|
|
||||||
Desktop.ini
|
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
|
||||||
$RECYCLE.BIN/
|
|
||||||
|
|
||||||
# Mac crap
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Python
|
|
||||||
#############
|
|
||||||
|
|
||||||
*.py[cod]
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
*.egg
|
|
||||||
*.egg-info
|
|
||||||
dist/
|
|
||||||
build/
|
|
||||||
eggs/
|
|
||||||
parts/
|
|
||||||
var/
|
|
||||||
sdist/
|
|
||||||
develop-eggs/
|
|
||||||
.installed.cfg
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
.coverage
|
|
||||||
.tox
|
|
||||||
|
|
||||||
#Translations
|
|
||||||
*.mo
|
|
||||||
|
|
||||||
#Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
28
README.md
28
README.md
@@ -1,13 +1,15 @@
|
|||||||
# ProcessMaker plugin
|
# ProcessMaker plugin
|
||||||
|
|
||||||
GLPI plugin that provides an interface with a customized ProcessMaker server (https://github.com/tomolimo/processmaker-server).
|
GLPI plugin that provides an interface with a customized ProcessMaker server (https://github.com/tomolimo/processmaker-server).
|
||||||
|
|
||||||
version 3.4.x is compatible with GLPI 9.2 and needs ProcessMaker either 3.0.1.8-RE-1.12 (https://github.com/tomolimo/processmaker-server/releases/tag/3.0.1.8-RE-1.12) or 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/tag/3.3.0-RE-1.5)
|
version 3.4.x is compatible with GLPI 9.2 and needs ProcessMaker either 3.0.1.8-RE-1.12 (https://github.com/tomolimo/processmaker-server/releases/tag/3.0.1.8-RE-1.12) or 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/tag/3.3.0-RE-1.5)
|
||||||
|
|
||||||
version 3.5.x is compatible with GLPI 9.3 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
version 3.5.x is compatible with GLPI 9.3 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
||||||
|
|
||||||
version 3.6.x is compatible with GLPI 9.4 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
version 3.6.x is compatible with GLPI 9.4 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
|
version 4.0.0 is compatible with GLPI 9.5 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
||||||
|
|
||||||
An IRC channel is available: #processmaker-glpi on https://webchat.freenode.net/
|
This plugin can run classic and bpmn processes
|
||||||
|
|
||||||
|
An IRC channel is available: #processmaker-glpi on https://webchat.freenode.net/
|
||||||
|
|||||||
40
ajax/dropdownTicketCategories.php
Normal file
40
ajax/dropdownTicketCategories.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos($_SERVER['PHP_SELF'], "dropdownTicketCategories.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
} else if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Sorry. You can't access this file directly");
|
||||||
|
}
|
||||||
|
|
||||||
|
$opt['entity'] = $_POST["entity_restrict"] ?? -1;
|
||||||
|
|
||||||
|
if (isset($_POST["condition"])) {
|
||||||
|
$opt['condition'] = $_POST["condition"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$currentcateg = new ITILCategory();
|
||||||
|
$currentcateg->getFromDB($_POST['value']);
|
||||||
|
|
||||||
|
if ($_POST["type"]) {
|
||||||
|
switch ($_POST['type']) {
|
||||||
|
case Ticket::INCIDENT_TYPE :
|
||||||
|
$opt['condition']['is_incident'] = '1';
|
||||||
|
if ($currentcateg->getField('is_incident') == 1) {
|
||||||
|
$opt['value'] = $_POST['value'];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Ticket::DEMAND_TYPE:
|
||||||
|
$opt['condition']['is_request'] = '1';
|
||||||
|
if ($currentcateg->getField('is_request') == 1) {
|
||||||
|
$opt['value'] = $_POST['value'];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ITILCategory::dropdown($opt);
|
||||||
@@ -1,126 +1,118 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Original Author of file: Olivier Moron
|
// Original Author of file: Olivier Moron
|
||||||
// Purpose of file:
|
// Purpose of file:
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
// Direct access to file
|
// Direct access to file
|
||||||
if (strpos($_SERVER['PHP_SELF'], "dropdownUsers.php")) {
|
if (strpos($_SERVER['PHP_SELF'], "dropdownUsers.php")) {
|
||||||
include ("../../../inc/includes.php");
|
include ("../../../inc/includes.php");
|
||||||
header("Content-Type: text/html; charset=UTF-8");
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
Html::header_nocache();
|
Html::header_nocache();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('GLPI_ROOT')) {
|
if (!defined('GLPI_ROOT')) {
|
||||||
die("Can not access directly to this file");
|
die("Can not access directly to this file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Session::checkLoginUser();
|
Session::checkLoginUser();
|
||||||
|
|
||||||
$PM_DB = new PluginProcessmakerDB;
|
$PM_DB = new PluginProcessmakerDB;
|
||||||
$dbu = new DbUtils;
|
$dbu = new DbUtils;
|
||||||
|
|
||||||
if (!isset($_REQUEST['right'])) {
|
if (!isset($_REQUEST['right'])) {
|
||||||
$_REQUEST['right'] = "all";
|
$_REQUEST['right'] = "all";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default view : Nobody
|
// Default view : Nobody
|
||||||
if (!isset($_REQUEST['all'])) {
|
if (!isset($_REQUEST['all'])) {
|
||||||
$_REQUEST['all'] = 0;
|
$_REQUEST['all'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$used = [];
|
$used = [];
|
||||||
|
|
||||||
if (isset($_REQUEST['used'])) {
|
if (isset($_REQUEST['used'])) {
|
||||||
$used = $_REQUEST['used'];
|
$used = $_REQUEST['used'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_REQUEST['value'])) {
|
if (!isset($_REQUEST['value'])) {
|
||||||
$_REQUEST['value'] = 0;
|
$_REQUEST['value'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$one_item = -1;
|
$one_item = -1;
|
||||||
if (isset($_REQUEST['_one_id'])) {
|
if (isset($_REQUEST['_one_id'])) {
|
||||||
$one_item = $_REQUEST['_one_id'];
|
$one_item = $_REQUEST['_one_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_REQUEST['page'])) {
|
if (!isset($_REQUEST['page'])) {
|
||||||
$_REQUEST['page'] = 1;
|
$_REQUEST['page'] = 1;
|
||||||
$_REQUEST['page_limit'] = $CFG_GLPI['dropdown_max'];
|
$_REQUEST['page_limit'] = $CFG_GLPI['dropdown_max'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($one_item < 0) {
|
if ($one_item < 0) {
|
||||||
$start = ($_REQUEST['page']-1)*$_REQUEST['page_limit'];
|
$start = ($_REQUEST['page'] - 1) * $_REQUEST['page_limit'];
|
||||||
$LIMIT = "LIMIT $start,".$_REQUEST['page_limit'];
|
$searchText = isset($_REQUEST['searchText']) ? $_REQUEST['searchText'] : "";
|
||||||
$searchText = isset($_REQUEST['searchText']) ? $_REQUEST['searchText'] : "";
|
$res = PluginProcessmakerUser::getSqlSearchResult( $_REQUEST['specific_tags'], false, $_REQUEST['right'], $_REQUEST["entity_restrict"],
|
||||||
/*$result*/$res = PluginProcessmakerUser::getSqlSearchResult( $_REQUEST['specific_tags']['taskGuid'], false, $_REQUEST['right'], $_REQUEST["entity_restrict"],
|
$_REQUEST['value'], $used, $searchText, $start, $_REQUEST['page_limit']);
|
||||||
$_REQUEST['value'], $used, $searchText, $LIMIT);
|
} else {
|
||||||
} else {
|
$res = $DB->request([
|
||||||
$res = $DB->request([
|
'FIELDS' => 'glpi_users.*',
|
||||||
'SELECT' => 'glpi_users.*',
|
'DISTINCT' => true,
|
||||||
'FROM' => 'glpi_users',
|
'FROM' => 'glpi_users',
|
||||||
'WHERE' => [
|
'WHERE' => [
|
||||||
'glpi_users.id' => $one_item
|
'glpi_users.id' => $one_item
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
//$query = "SELECT DISTINCT `glpi_users`.*
|
}
|
||||||
// FROM `glpi_users`
|
$users = [];
|
||||||
// WHERE `glpi_users`.`id` = '$one_item';";
|
|
||||||
//$result = $DB->query($query);
|
// Count real items returned
|
||||||
}
|
$count = 0;
|
||||||
$users = [];
|
foreach ($res as $data) {
|
||||||
|
$users[$data["id"]] = $dbu->formatUserName($data["id"], $data["name"], $data["realname"],
|
||||||
// Count real items returned
|
$data["firstname"], 0);
|
||||||
$count = 0;
|
$logins[$data["id"]] = $data["name"];
|
||||||
//if ($DB->numrows($result)) {
|
}
|
||||||
// while ($data = $DB->fetch_assoc($result)) {
|
|
||||||
//if ($res->numrows()) {
|
|
||||||
foreach ($res as $data) {
|
$datas = [];
|
||||||
$users[$data["id"]] = $dbu->formatUserName($data["id"], $data["name"], $data["realname"],
|
|
||||||
$data["firstname"]);
|
// Display first if empty search
|
||||||
$logins[$data["id"]] = $data["name"];
|
if ($_REQUEST['page'] == 1 && empty($_REQUEST['searchText'])) {
|
||||||
}
|
if (($one_item < 0) || ($one_item == 0)) {
|
||||||
//}
|
if ($_REQUEST['all'] == 0) {
|
||||||
|
array_push($datas, ['id' => 0,
|
||||||
|
'text' => Dropdown::EMPTY_VALUE]);
|
||||||
$datas = [];
|
} else if ($_REQUEST['all'] == 1) {
|
||||||
|
array_push($datas, ['id' => 0,
|
||||||
// Display first if empty search
|
'text' => __('All')]);
|
||||||
if ($_REQUEST['page'] == 1 && empty($_REQUEST['searchText'])) {
|
}
|
||||||
if (($one_item < 0) || ($one_item == 0)) {
|
}
|
||||||
if ($_REQUEST['all'] == 0) {
|
}
|
||||||
array_push($datas, ['id' => 0,
|
|
||||||
'text' => Dropdown::EMPTY_VALUE]);
|
if (count($users)) {
|
||||||
} else if ($_REQUEST['all'] == 1) {
|
foreach ($users as $ID => $output) {
|
||||||
array_push($datas, ['id' => 0,
|
$title = sprintf('%1$s - %2$s', $output, $logins[$ID]);
|
||||||
'text' => __('All')]);
|
|
||||||
}
|
array_push($datas, ['id' => $ID,
|
||||||
}
|
'text' => $output,
|
||||||
}
|
'title' => $title]);
|
||||||
|
$count++;
|
||||||
if (count($users)) {
|
}
|
||||||
foreach ($users as $ID => $output) {
|
}
|
||||||
$title = sprintf('%1$s - %2$s', $output, $logins[$ID]);
|
|
||||||
|
|
||||||
array_push($datas, ['id' => $ID,
|
if (($one_item >= 0)
|
||||||
'text' => $output,
|
&& isset($datas[0])) {
|
||||||
'title' => $title]);
|
echo json_encode($datas[0]);
|
||||||
$count++;
|
} else {
|
||||||
}
|
$ret['results'] = $datas;
|
||||||
}
|
$ret['count'] = $count;
|
||||||
|
echo json_encode($ret);
|
||||||
|
}
|
||||||
if (($one_item >= 0)
|
|
||||||
&& isset($datas[0])) {
|
|
||||||
echo json_encode($datas[0]);
|
|
||||||
} else {
|
|
||||||
$ret['results'] = $datas;
|
|
||||||
$ret['count'] = $count;
|
|
||||||
echo json_encode($ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,137 +1,148 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Original Author of file: Olivier Moron
|
// Original Author of file: Olivier Moron
|
||||||
// Purpose of file:
|
// Purpose of file:
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
// Direct access to file
|
// Direct access to file
|
||||||
if (strpos($_SERVER['PHP_SELF'], "task_users.php")) {
|
if (strpos($_SERVER['PHP_SELF'], "task_users.php")) {
|
||||||
include ("../../../inc/includes.php");
|
include ("../../../inc/includes.php");
|
||||||
header("Content-Type: text/html; charset=UTF-8");
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
Html::header_nocache();
|
Html::header_nocache();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('GLPI_ROOT')) {
|
if (!defined('GLPI_ROOT')) {
|
||||||
die("Can not access directly to this file");
|
die("Can not access directly to this file");
|
||||||
}
|
}
|
||||||
|
|
||||||
Session::checkLoginUser();
|
Session::checkLoginUser();
|
||||||
|
|
||||||
$commoninputs = "<input type='hidden' name='items_id' value='".$_REQUEST['items_id']."'>".
|
$commoninputs = "<input type='hidden' name='items_id' value='".$_REQUEST['items_id']."'>".
|
||||||
"<input type='hidden' name='itemtype' value='".$_REQUEST['itemtype']."'>".
|
"<input type='hidden' name='itemtype' value='".$_REQUEST['itemtype']."'>".
|
||||||
"<input type='hidden' name='cases_id' value='".$_REQUEST['cases_id']."'>".
|
"<input type='hidden' name='cases_id' value='".$_REQUEST['cases_id']."'>".
|
||||||
"<input type='hidden' name='delIndex' value='".$_REQUEST['delIndex']."'>".
|
"<input type='hidden' name='delIndex' value='".$_REQUEST['delIndex']."'>".
|
||||||
"<input type='hidden' name='users_id' value='".$_REQUEST['users_id']."'>".
|
"<input type='hidden' name='users_id' value='".$_REQUEST['users_id']."'>".
|
||||||
"<input type='hidden' name='taskGuid' value='".$_REQUEST['taskGuid']."'>".
|
"<input type='hidden' name='taskGuid' value='".$_REQUEST['taskGuid']."'>".
|
||||||
"<input type='hidden' name='delThread' value='".$_REQUEST['delThread']."'>".
|
"<input type='hidden' name='delThread' value='".$_REQUEST['delThread']."'>".
|
||||||
"<input type='hidden' name='tasktype' value='".$_REQUEST['tasktype']."'>".
|
"<input type='hidden' name='tasktype' value='".$_REQUEST['tasktype']."'>".
|
||||||
"<input type='hidden' name='tasks_id' value='".$_REQUEST['tasks_id']."'>";
|
"<input type='hidden' name='tasks_id' value='".$_REQUEST['tasks_id']."'>";
|
||||||
|
|
||||||
$PM_SOAP = new PluginProcessmakerProcessmaker; // not used in this context, just here to define the type of $PM_SOAP
|
$PM_SOAP = new PluginProcessmakerProcessmaker;
|
||||||
$PM_DB = new PluginProcessmakerDB;
|
$PM_DB = new PluginProcessmakerDB;
|
||||||
$rand = rand();
|
$rand = rand();
|
||||||
|
|
||||||
echo "<form style='margin-bottom: 0px' name='processmaker_form_task$rand-".$_REQUEST['delIndex']."' id='processmaker_form_task$rand-".$_REQUEST['delIndex']."' method='post' action='".Toolbox::getItemTypeFormURL("PluginProcessmakerProcessmaker")."'>";
|
echo "<form style='margin-bottom: 0px' name='processmaker_form_task$rand-".$_REQUEST['delIndex']."' id='processmaker_form_task$rand-".$_REQUEST['delIndex']."' method='post' action='".Toolbox::getItemTypeFormURL("PluginProcessmakerProcessmaker")."'>";
|
||||||
echo __('Re-assign task to', 'processmaker')." ";
|
echo __('Re-assign task to', 'processmaker')." ";
|
||||||
echo "<input type='hidden' name='action' value='reassign_reminder'>";
|
echo "<input type='hidden' name='action' value='reassign_reminder'>";
|
||||||
echo "<input type='hidden' name='comment' value=''>";
|
echo "<input type='hidden' name='comment' value=''>";
|
||||||
echo $commoninputs;
|
echo $commoninputs;
|
||||||
|
|
||||||
$can_unclaim = false; // by default
|
$can_unclaim = false; // by default
|
||||||
$query = "SELECT TAS_GROUP_VARIABLE FROM TASK WHERE TAS_UID='".$_REQUEST['taskGuid']."' AND TAS_ASSIGN_TYPE='SELF_SERVICE';";
|
$grp = false;
|
||||||
$res = $PM_DB->query($query);
|
$query = "SELECT TAS_GROUP_VARIABLE FROM TASK WHERE TAS_UID='".$_REQUEST['taskGuid']."' AND TAS_ASSIGN_TYPE='SELF_SERVICE';";
|
||||||
if ($PM_DB->numrows($res) > 0) {
|
$res = $PM_DB->query($query);
|
||||||
$can_unclaim = true;
|
if ($PM_DB->numrows($res) > 0 && $row = $PM_DB->fetch_assoc($res)) {
|
||||||
}
|
$can_unclaim = true;
|
||||||
|
if ($row['TAS_GROUP_VARIABLE'] != '') {
|
||||||
PluginProcessmakerUser::dropdown( ['name' => 'users_id_recipient',
|
//self-service value based assignment
|
||||||
'value' => $_REQUEST['users_id'],
|
$PM_SOAP->login(true); // needs to be logged in to be able to call SOAP
|
||||||
'used' => $_REQUEST['used'],
|
$grp = $PM_SOAP->getGLPIGroupIdForSelfServiceTask($_REQUEST['caseGuid'], $_REQUEST['taskGuid']);
|
||||||
'entity' => 0, //$item->fields["entities_id"], // not used, as any user can be assigned to any tasks
|
}
|
||||||
'entity_sons' => false, // not used, as any user can be assigned to any tasks
|
}
|
||||||
'right' => 'all',
|
|
||||||
'rand' => $rand,
|
PluginProcessmakerUser::dropdown( ['name' => 'users_id_recipient',
|
||||||
'width' => '',
|
'value' => $_REQUEST['users_id'],
|
||||||
'specific_tags' => ['taskGuid' => $_REQUEST['taskGuid']]
|
'used' => $_REQUEST['used'],
|
||||||
]);
|
'entity' => 0, //$item->fields["entities_id"], // not used, as any user can be assigned to any tasks
|
||||||
|
'entity_sons' => false, // not used, as any user can be assigned to any tasks
|
||||||
echo " ";
|
'right' => 'all',
|
||||||
echo "<input type='submit' name='reassign$rand' value='".__('Re-assign', 'processmaker')."' class='submit'>";
|
'all' => ($can_unclaim ? 0 : -1),
|
||||||
echo "<input type='submit' name='reassign' value='".__('Re-assign', 'processmaker')."' class='submit' style='display:none'>";
|
'rand' => $rand,
|
||||||
|
'width' => '',
|
||||||
echo HTML::scriptBlock("
|
'specific_tags' => ['taskGuid' => $_REQUEST['taskGuid'], 'grpGuid' => ($grp !== false ? $grp['uid'] : 0)]
|
||||||
$(function () {
|
]);
|
||||||
// Dialog helpers
|
|
||||||
// Create the dialog with \"Re-assign\" button
|
echo " ";
|
||||||
function showCommentDlg(title, content, alttext) {
|
echo "<input type='submit' name='reassign$rand' value='".__s('Re-assign', 'processmaker')."' class='submit'>";
|
||||||
|
echo "<input type='submit' name='reassign' value='".__s('Re-assign', 'processmaker')."' class='submit' style='display:none'>";
|
||||||
var dlgContents = {
|
|
||||||
title: title,
|
echo HTML::scriptBlock("
|
||||||
modal: true,
|
$(function () {
|
||||||
width: 'auto',
|
// Dialog helpers
|
||||||
height: 'auto',
|
// Create the dialog with \"Re-assign\" button
|
||||||
resizable: false,
|
function showCommentDlg(title, content, alttext) {
|
||||||
close: function (event, ui) {
|
|
||||||
$(this).dialog('destroy').remove();
|
var dlgContents = {
|
||||||
},
|
title: title,
|
||||||
buttons: [{
|
modal: true,
|
||||||
text: alttext,
|
width: 'auto',
|
||||||
id: 'submit$rand',
|
height: 'auto',
|
||||||
disabled: 'disabled',
|
resizable: false,
|
||||||
click: function() {
|
close: function (event, ui) {
|
||||||
$('#processmaker_form_task$rand-".$_REQUEST['delIndex']." input[name=comment]').val($('#comment$rand').val());
|
$(this).dialog('destroy').remove();
|
||||||
//$('#processmaker_form_task$rand-".$_REQUEST['delIndex']."').submit();
|
},
|
||||||
$('input[name=reassign').click();
|
buttons: [{
|
||||||
$('#submit$rand').button('disable');
|
text: alttext,
|
||||||
}
|
id: 'submit$rand',
|
||||||
}],
|
disabled: 'disabled',
|
||||||
show: true,
|
click: function() {
|
||||||
hide: true
|
$('#processmaker_form_task$rand-".$_REQUEST['delIndex']." input[name=comment]').val($('#comment$rand').val());
|
||||||
}
|
//$('#processmaker_form_task$rand-".$_REQUEST['delIndex']."').submit();
|
||||||
$('<div id=reassign$rand></div>').appendTo($('#processmaker_form_task$rand-".$_REQUEST['delIndex']."'));
|
$('input[name=reassign').click();
|
||||||
var locDlg = $('#reassign$rand').html(content + '<p><textarea id=comment$rand rows=6 cols=60></textarea></p><font color=red>Input at least 10 words in English to justify.</font>').dialog(dlgContents);
|
$('#submit$rand').button('disable');
|
||||||
$('#comment$rand').focus();
|
}
|
||||||
$('#comment$rand').on('keydown keyup', function(e) {
|
}],
|
||||||
if ($('#comment$rand').val().split(/\W+/).length > 10) {
|
show: true,
|
||||||
$('#submit$rand').button('enable');
|
hide: true
|
||||||
} else {
|
}
|
||||||
$('#submit$rand').button('disable');
|
$('<div id=reassign$rand></div>').appendTo($('#processmaker_form_task$rand-".$_REQUEST['delIndex']."'));
|
||||||
}
|
var locDlg = $('#reassign$rand').html(content + '<p><textarea id=comment$rand rows=6 cols=60></textarea></p><font color=red>".addslashes(__('Input at least 10 words in English to justify.','processmaker'))."</font>').dialog(dlgContents);
|
||||||
});
|
$('#comment$rand').focus();
|
||||||
|
$('#comment$rand').on('keydown keyup', function(e) {
|
||||||
return locDlg;
|
if ($('#comment$rand').val().split(/\W+/).length > 10) {
|
||||||
};
|
$('#submit$rand').button('enable');
|
||||||
|
} else {
|
||||||
$('input[name=reassign$rand]').click(function (e) {
|
$('#submit$rand').button('disable');
|
||||||
e.preventDefault();
|
}
|
||||||
if ($('input[name=users_id]').val() == $('input[name=users_id_recipient]').val()) {
|
});
|
||||||
// task is already assigned to this user
|
|
||||||
alert('".__('Task is already assigned to this user or group!', 'processmaker')."', '".__('Re-assign task', 'processmaker')."');
|
return locDlg;
|
||||||
} else if ($('input[name=users_id_recipient]').val() == 0) {
|
};
|
||||||
// un-claim
|
|
||||||
if (".($can_unclaim ? 1 : 0)." && $('input[name=users_id]').val() != 0) {
|
$('input[name=reassign$rand]').click(function (e) {
|
||||||
showCommentDlg('".__('Un-claim task', 'processmaker')."',
|
e.preventDefault();
|
||||||
'".__('Please input reason to un-claim<br/>(task will be re-assigned to former group):', 'processmaker')."',
|
if ($('input[name=users_id]').val() == $('input[name=users_id_recipient]').val()) {
|
||||||
'".__('Un-claim', 'processmaker')."');
|
// task is already assigned to this user
|
||||||
} else {
|
if ($('input[name=users_id]').val() == 0) {
|
||||||
// task can't be unclaim because it isn't SELF_SERVICE
|
alert('".addslashes(__('Task is already un-assigned!', 'processmaker'))."', '".addslashes(__('Re-assign task', 'processmaker'))."');
|
||||||
alert('".__('Can\\\'t un-assign Task!', 'processmaker')."', '".__('Un-claim task', 'processmaker')."');
|
} else {
|
||||||
}
|
alert('".addslashes(__('Task is already assigned to this user!', 'processmaker'))."', '".addslashes(__('Re-assign task', 'processmaker'))."');
|
||||||
} else {
|
}
|
||||||
showCommentDlg('".__('Re-assign task', 'processmaker')."',
|
} else if ($('input[name=users_id_recipient]').val() == 0) {
|
||||||
'".__('Please input reason to re-assign:', 'processmaker')."',
|
// un-claim
|
||||||
'".__('Re-assign', 'processmaker')."');
|
if (".($can_unclaim ? 1 : 0)." && $('input[name=users_id]').val() != 0) {
|
||||||
}
|
showCommentDlg('".addslashes(__('Un-claim task', 'processmaker'))."',
|
||||||
return false;
|
'".addslashes(__('Please input reason to un-claim<br/>(task will be re-assigned to former group):', 'processmaker'))."',
|
||||||
});
|
'".addslashes(__('Un-claim', 'processmaker'))."');
|
||||||
})
|
} else {
|
||||||
");
|
// task can't be unclaim because it isn't SELF_SERVICE
|
||||||
|
alert('".addslashes(__("Can't un-assign task!", 'processmaker'))."', '".addslashes(__('Un-claim task', 'processmaker'))."');
|
||||||
|
}
|
||||||
if (Session::getLoginUserID() != $_REQUEST['users_id']) {
|
} else {
|
||||||
echo " ";
|
showCommentDlg('".addslashes(__('Re-assign task', 'processmaker'))."',
|
||||||
echo "<input type='submit' name='reminder' value='".__('Send reminder', 'processmaker')."' class='submit'>";
|
'".addslashes(__('Please input reason to re-assign:', 'processmaker'))."',
|
||||||
}
|
'".addslashes(__('Re-assign', 'processmaker'))."');
|
||||||
|
}
|
||||||
Html::closeForm(true);
|
return false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
");
|
||||||
|
|
||||||
|
|
||||||
|
if (Session::getLoginUserID() != $_REQUEST['users_id']) {
|
||||||
|
echo " ";
|
||||||
|
echo "<input type='submit' name='reminder' value='".__s('Send reminder', 'processmaker')."' class='submit'>";
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::closeForm(true);
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once ("../../../inc/includes.php");
|
include_once ("../../../inc/includes.php");
|
||||||
|
|
||||||
Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases");
|
Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases");
|
||||||
|
|
||||||
if (!$PM_SOAP->config->fields['maintenance']) {
|
if (!$PM_SOAP->config->fields['maintenance']) {
|
||||||
if (Session::haveRightsOr("plugin_processmaker_case", [READ, UPDATE])) {
|
if (Session::haveRightsOr("plugin_processmaker_case", [READ, DELETE, CANCEL, ADHOC_REASSIGN])) {
|
||||||
|
|
||||||
Search::show('PluginProcessmakerCase');
|
Search::show('PluginProcessmakerCase');
|
||||||
} else {
|
} else {
|
||||||
Html::displayRightError();
|
Html::displayRightError();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
||||||
}
|
}
|
||||||
|
|
||||||
Html::footer();
|
Html::footer();
|
||||||
|
|
||||||
|
|||||||
@@ -1,273 +1,271 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once ("../../../inc/includes.php");
|
include_once ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of processMakerShowProcessList
|
* Summary of processMakerShowProcessList
|
||||||
* @param mixed $ID
|
* @param mixed $ID
|
||||||
* @param mixed $from_helpdesk
|
* @param mixed $from_helpdesk
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function processMakerShowProcessList ($ID, $from_helpdesk) {
|
function processMakerShowProcessList ($ID, $from_helpdesk) {
|
||||||
global $DB, $CFG_GLPI, $_SESSION;
|
global $DB, $CFG_GLPI, $_SESSION;
|
||||||
|
|
||||||
if (!Session::haveRight("ticket", CREATE)) {
|
if (!Session::haveRight("ticket", CREATE)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rand = rand();
|
$rand = rand();
|
||||||
echo "<form name= 'processmaker_form$rand' id='processmaker_form$rand' method='post' action='".Toolbox::getItemTypeFormURL("PluginProcessmakerProcessmaker")."'>";
|
echo "<form name= 'processmaker_form$rand' id='processmaker_form$rand' method='post' action='".Toolbox::getItemTypeFormURL("PluginProcessmakerProcessmaker")."'>";
|
||||||
echo "<div class='center'><table class='tab_cadre_fixehov'>";
|
echo "<div class='center'><table class='tab_cadre_fixehov'>";
|
||||||
echo "<tr><th colspan='2'>".__('Process - Case', 'processmaker')."</th></tr>";
|
echo "<tr><th colspan='2'>".__('Process - Case', 'processmaker')."</th></tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_2'><td class='right' colspan='1'>";
|
echo "<tr class='tab_bg_2'><td class='right' colspan='1'>";
|
||||||
echo __('Select the process you want to add', 'processmaker');
|
echo __('Select the process you want to add', 'processmaker');
|
||||||
echo "<input type='hidden' name='action' value='newcase'>";
|
echo "<input type='hidden' name='action' value='newcase'>";
|
||||||
echo "<input type='hidden' name='id' value='-1'>";
|
echo "<input type='hidden' name='id' value='-1'>";
|
||||||
echo "<input type='hidden' name='itemtype' value='Ticket'>";
|
echo "<input type='hidden' name='itemtype' value='Ticket'>";
|
||||||
echo "<input type='hidden' name='itilcategories_id' value='".$_REQUEST['itilcategories_id']."'>";
|
echo "<input type='hidden' name='itilcategories_id' value='".$_REQUEST['itilcategories_id']."'>";
|
||||||
echo "<input type='hidden' name='type' value='".$_REQUEST['type']."'>";
|
echo "<input type='hidden' name='type' value='".$_REQUEST['type']."'>";
|
||||||
PluginProcessmakerProcess::dropdown( [ 'value' => 0, 'entity' => $_SESSION['glpiactive_entity'], 'name' => 'plugin_processmaker_processes_id' ]);
|
PluginProcessmakerProcess::dropdown( [ 'value' => 0, 'entity' => $_SESSION['glpiactive_entity'], 'name' => 'plugin_processmaker_processes_id' ]);
|
||||||
echo "</td><td class='center'>";
|
echo "</td><td class='center'>";
|
||||||
echo "<input type='submit' name='additem' value='Start' class='submit'>";
|
echo "<input type='submit' name='additem' value='Start' class='submit'>";
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
Html::closeForm();
|
Html::closeForm();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of processMakerShowCase
|
* Summary of processMakerShowCase
|
||||||
* @param mixed $ID
|
* @param mixed $users_id
|
||||||
* @param mixed $from_helpdesk
|
* @param mixed $from_helpdesk
|
||||||
*/
|
*/
|
||||||
function processMakerShowCase($ID, $from_helpdesk) {
|
function processMakerShowCase($users_id, $from_helpdesk) {
|
||||||
global $CFG_GLPI, $PM_SOAP;
|
global $CFG_GLPI, $PM_SOAP;
|
||||||
|
|
||||||
$caseInfo = $PM_SOAP->getCaseInfo( $_REQUEST['case_guid'] );
|
$caseInfo = $PM_SOAP->getCaseInfo( $_REQUEST['case_guid'] );
|
||||||
if ($caseInfo->status_code == 0) {
|
if ($caseInfo->status_code == 0) {
|
||||||
// case is created
|
// case is created
|
||||||
// Must show it...
|
// Must show it...
|
||||||
|
|
||||||
$rand = rand();
|
$rand = rand();
|
||||||
|
|
||||||
$PM_SOAP->echoDomain();
|
$PM_SOAP->echoDomain();
|
||||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.helpdesk.js?rand=$rand'></script>";
|
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.helpdesk.js?rand=$rand'></script>";
|
||||||
|
|
||||||
$tkt = new Ticket;
|
$tkt = new Ticket;
|
||||||
|
|
||||||
// as showFormHelpdesk uses $_POST, we must set it
|
// as showFormHelpdesk uses $_POST, we must set it
|
||||||
$_POST = $_REQUEST;
|
$_POST = $_REQUEST;
|
||||||
|
|
||||||
// must be using bare text
|
//// must be using bare text
|
||||||
$save_rich_text = $CFG_GLPI["use_rich_text"];
|
//$save_rich_text = $CFG_GLPI["use_rich_text"];
|
||||||
$CFG_GLPI["use_rich_text"] = false;
|
//$CFG_GLPI["use_rich_text"] = false;
|
||||||
|
|
||||||
// to get the HTML code for the helpdesk form
|
// to get the HTML code for the helpdesk form
|
||||||
$saved_ob_level = ob_get_level();
|
$saved_ob_level = ob_get_level();
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$tkt->showFormHelpdesk($ID);
|
$tkt->showFormHelpdesk($users_id);
|
||||||
|
|
||||||
$buffer = ob_get_clean();
|
$buffer = ob_get_clean();
|
||||||
|
|
||||||
$CFG_GLPI["use_rich_text"] = $save_rich_text;
|
//$CFG_GLPI["use_rich_text"] = $save_rich_text;
|
||||||
|
|
||||||
// 9.1 only: hack to fix an issue with the initEditorSystem which calls scriptStart without calling scriptEnd
|
// 9.1 only: hack to fix an issue with the initEditorSystem which calls scriptStart without calling scriptEnd
|
||||||
if (ob_get_level() > $saved_ob_level) {
|
if (ob_get_level() > $saved_ob_level) {
|
||||||
$buffer = ob_get_clean().$buffer;
|
$buffer = ob_get_clean().$buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo $buffer;
|
//echo $buffer;
|
||||||
//return;
|
//return;
|
||||||
|
|
||||||
// to change this HTML code
|
// to change this HTML code
|
||||||
$dom = new DOMDocument();
|
$dom = new DOMDocument();
|
||||||
|
|
||||||
// will convert '&' to '&', '<' to '<' and '>' to '>'
|
// will convert '&' to '&', '<' to '<' and '>' to '>'
|
||||||
$buffer = htmlspecialchars($buffer, ENT_NOQUOTES);
|
$buffer = htmlspecialchars($buffer, ENT_NOQUOTES);
|
||||||
// will restore '<' to '<' and '>' to '>'
|
// will restore '<' to '<' and '>' to '>'
|
||||||
// so that only the already escaped entites will get the double encoding
|
// so that only the already escaped entites will get the double encoding
|
||||||
// will also change </b> end of bold into a local identifier
|
// will also change </b> end of bold into a local identifier
|
||||||
$endOfBold = 'end_of_bold'.rand();
|
$endOfBold = 'end_of_bold'.rand();
|
||||||
$buffer = str_replace(['<', '>', '</b>'], ['<', '>', $endOfBold], $buffer);
|
$endOfSpan = 'end_of_span'.rand();
|
||||||
|
$buffer = str_replace(['<', '>', '</b>', '</span>'], ['<', '>', $endOfBold, $endOfSpan], $buffer);
|
||||||
// will convert any UTF-8 char that can't be expressed in ASCII into an HTML entity
|
|
||||||
$buffer = mb_convert_encoding($buffer, 'HTML-ENTITIES');
|
// will convert any UTF-8 char that can't be expressed in ASCII into an HTML entity
|
||||||
|
$buffer = mb_convert_encoding($buffer, 'HTML-ENTITIES');
|
||||||
$dom->loadHTML($buffer, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
|
|
||||||
$xpath = new DOMXPath($dom);
|
$dom->loadHTML($buffer, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
|
||||||
|
$xpath = new DOMXPath($dom);
|
||||||
// hide some fields
|
|
||||||
$list = [ 'name', 'type', 'locations_id', 'itilcategories_id', 'items_id', 'add' ];
|
// hide some fields
|
||||||
$xpath_str = '//*[@name="'.implode( '"]/ancestor::tr[1] | //*[@name="', $list ).'"]/ancestor::tr[1]';
|
$list = [ 'name', 'type', 'locations_id', 'itilcategories_id', 'items_id', 'add' ];
|
||||||
$res = $xpath->query($xpath_str);
|
$xpath_str = '//*[@name="'.implode( '"]/ancestor::tr[1] | //*[@name="', $list ).'"]/ancestor::tr[1]';
|
||||||
foreach ($res as $elt) {
|
$res = $xpath->query($xpath_str);
|
||||||
$elt->setAttribute( 'style', 'display:none;');
|
foreach ($res as $elt) {
|
||||||
}
|
$elt->setAttribute( 'style', 'display:none;');
|
||||||
|
}
|
||||||
// add an input for processguid in the form
|
|
||||||
$res = $xpath->query('//form[@name="helpdeskform"]');
|
// add an input for processguid in the form
|
||||||
$input = $res->item(0)->appendChild(new DOMElement('input'));
|
$res = $xpath->query('//form[@name="helpdeskform"]');
|
||||||
$input->setAttribute('name', 'processmaker_process_guid');
|
$input = $res->item(0)->appendChild(new DOMElement('input'));
|
||||||
$input->setAttribute('type', 'hidden');
|
$input->setAttribute('name', 'processmaker_process_guid');
|
||||||
$input->setAttribute('value', $caseInfo->processId);
|
$input->setAttribute('type', 'hidden');
|
||||||
|
$input->setAttribute('value', $caseInfo->processId);
|
||||||
// add an input for processid in the form
|
|
||||||
$input = $res->item(0)->appendChild(new DOMElement('input'));
|
// add an input for processid in the form
|
||||||
$input->setAttribute('name', 'processmaker_processes_id');
|
$input = $res->item(0)->appendChild(new DOMElement('input'));
|
||||||
$input->setAttribute('type', 'hidden');
|
$input->setAttribute('name', 'processmaker_processes_id');
|
||||||
$input->setAttribute('value', $_REQUEST['processes_id']);
|
$input->setAttribute('type', 'hidden');
|
||||||
|
$input->setAttribute('value', $_REQUEST['processes_id']);
|
||||||
// special case for content textarea which is in the same tr than the file upload
|
|
||||||
$res = $xpath->query('//*[@name="content"]/ancestor::div[1] | //*[@name="content"]/ancestor::tr[1]/td[1]');
|
// special case for content textarea which is in the same tr than the file upload
|
||||||
foreach ($res as $elt) {
|
$res = $xpath->query('//*[@name="content"]/ancestor::div[1] | //*[@name="content"]/ancestor::tr[1]/td[1]');
|
||||||
$elt->setAttribute( 'style', 'display:none;');
|
foreach ($res as $elt) {
|
||||||
}
|
$elt->setAttribute( 'style', 'display:none;');
|
||||||
|
}
|
||||||
$res = $xpath->query('//*[@name="content"]/ancestor::td[1]');
|
|
||||||
foreach ($res as $elt) {
|
$res = $xpath->query('//*[@name="content"]/ancestor::td[1]');
|
||||||
// there should be only one td
|
foreach ($res as $elt) {
|
||||||
$elt->setAttribute( 'colspan', '2');
|
// there should be only one td
|
||||||
}
|
$elt->setAttribute( 'colspan', '2');
|
||||||
|
}
|
||||||
$res = $xpath->query('//*[@name="content"]/ancestor::tr[1]');
|
|
||||||
//$res = $xpath->query('//*[@name="add"]/ancestor::tr[@class="tab_bg_1"]/preceding-sibling::tr[1]');
|
$res = $xpath->query('//*[@name="content"]/ancestor::tr[1]');
|
||||||
$table = $xpath->query('//*[@name="add"]/ancestor::table[1]');
|
//$res = $xpath->query('//*[@name="add"]/ancestor::tr[@class="tab_bg_1"]/preceding-sibling::tr[1]');
|
||||||
|
$table = $xpath->query('//*[@name="add"]/ancestor::table[1]');
|
||||||
$tr = $table->item(0)->insertBefore(new DOMElement('tr'), $res->item(0));
|
|
||||||
//$tr = $table->item(0)->appendChild(new DOMElement('tr'));
|
$tr = $table->item(0)->insertBefore(new DOMElement('tr'), $res->item(0));
|
||||||
|
//$tr = $table->item(0)->appendChild(new DOMElement('tr'));
|
||||||
$td = $tr->appendChild(new DOMElement('td'));
|
|
||||||
$td->setAttribute('colspan', '2');
|
$td = $tr->appendChild(new DOMElement('td'));
|
||||||
|
$td->setAttribute('colspan', '2');
|
||||||
$iframe = $td->appendChild(new DOMElement('iframe'));
|
|
||||||
|
$iframe = $td->appendChild(new DOMElement('iframe'));
|
||||||
$pmCaseUser = $caseInfo->currentUsers[0]; // by default
|
|
||||||
$paramsURL = "DEL_INDEX={$pmCaseUser->delIndex}&action={$caseInfo->caseStatus}";
|
$pmCaseUser = $caseInfo->currentUsers[0]; // by default
|
||||||
|
$paramsURL = "DEL_INDEX={$pmCaseUser->delIndex}&action={$caseInfo->caseStatus}";
|
||||||
$iframe->setAttribute('id', 'caseiframe' );
|
|
||||||
$iframe->setAttribute('onload', "onLoadFrame( event, '{$caseInfo->caseId}', {$pmCaseUser->delIndex}, {$caseInfo->caseNumber}, '{$caseInfo->processName}') ;" );
|
$iframe->setAttribute('id', 'caseiframe' );
|
||||||
$iframe->setAttribute('width', '100%' );
|
$iframe->setAttribute('onload', "onLoadFrame( event, '{$caseInfo->caseId}', {$pmCaseUser->delIndex}, {$caseInfo->caseNumber}, '{$caseInfo->processName}') ;" );
|
||||||
$iframe->setAttribute('style', 'border:none;' );
|
$iframe->setAttribute('width', '100%' );
|
||||||
$iframe->setAttribute('src', "{$PM_SOAP->serverURL}/cases/cases_Open?sid={$PM_SOAP->getPMSessionID()}&APP_UID={$caseInfo->caseId}&{$paramsURL}&rand=$rand&glpi_domain={$PM_SOAP->config->fields['domain']}" );
|
$iframe->setAttribute('style', 'border:none;' );
|
||||||
|
$iframe->setAttribute('src', "{$PM_SOAP->serverURL}/cases/cases_Open?sid={$PM_SOAP->getPMSessionID()}&APP_UID={$caseInfo->caseId}&{$paramsURL}&rand=$rand&glpi_domain={$PM_SOAP->config->fields['domain']}" );
|
||||||
// set the width and the title of the first table th
|
|
||||||
$th = $xpath->query('//*[@name="add"]/ancestor::table[1]/*/th[1]');
|
// set the width and the title of the first table th
|
||||||
$th->item(0)->setAttribute('width', '30%');
|
$th = $xpath->query('//*[@name="add"]/ancestor::table[1]/*/th[1]');
|
||||||
$th->item(0)->nodeValue = $caseInfo->processName;
|
$th->item(0)->setAttribute('width', '30%');
|
||||||
|
$th->item(0)->nodeValue = $caseInfo->processName;
|
||||||
$buffer = $dom->saveHTML();
|
|
||||||
|
$buffer = $dom->saveHTML();
|
||||||
// revert back </b>
|
|
||||||
$buffer = str_replace($endOfBold, '</b>', $buffer);
|
// revert back </b> and </span>
|
||||||
|
$buffer = str_replace([$endOfSpan, $endOfBold], ['</span>', '</b>'], $buffer);
|
||||||
// will revert back any char converted above
|
|
||||||
$buffer = mb_convert_encoding($buffer, 'UTF-8', 'HTML-ENTITIES');
|
// will revert back any char converted above
|
||||||
echo $buffer;
|
$buffer = mb_convert_encoding($buffer, 'UTF-8', 'HTML-ENTITIES');
|
||||||
}
|
echo $buffer;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
function in_array_recursive($needle, $haystack) {
|
|
||||||
|
function in_array_recursive($needle, $haystack) {
|
||||||
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($haystack));
|
|
||||||
|
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($haystack));
|
||||||
foreach ($it AS $element) {
|
|
||||||
if ($element == $needle) {
|
foreach ($it AS $element) {
|
||||||
return true;
|
if ($element == $needle) {
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Change profile system
|
|
||||||
if (isset($_POST['newprofile'])) {
|
// Change profile system
|
||||||
if (isset($_SESSION["glpiprofiles"][$_POST['newprofile']])) {
|
if (isset($_POST['newprofile'])) {
|
||||||
Session::changeProfile($_POST['newprofile']);
|
if (isset($_SESSION["glpiprofiles"][$_POST['newprofile']])) {
|
||||||
|
Session::changeProfile($_POST['newprofile']);
|
||||||
if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
|
|
||||||
Html::redirect($CFG_GLPI['root_doc']."/front/central.php");
|
if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
|
||||||
} else {
|
Html::redirect($CFG_GLPI['root_doc']."/front/central.php");
|
||||||
Html::redirect($_SERVER['PHP_SELF']);
|
} else {
|
||||||
}
|
Html::redirect($_SERVER['PHP_SELF']);
|
||||||
|
}
|
||||||
} else {
|
|
||||||
Html::redirect(preg_replace("/entities_id=.*/", "", $_SERVER['HTTP_REFERER']));
|
} else {
|
||||||
}
|
Html::redirect(preg_replace("/entities_id=.*/", "", $_SERVER['HTTP_REFERER']));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Manage entity change
|
|
||||||
if (isset($_GET["active_entity"])) {
|
// Manage entity change
|
||||||
if (!isset($_GET["is_recursive"])) {
|
if (isset($_GET["active_entity"])) {
|
||||||
$_GET["is_recursive"] = 0;
|
if (!isset($_GET["is_recursive"])) {
|
||||||
}
|
$_GET["is_recursive"] = 0;
|
||||||
if (Session::changeActiveEntities($_GET["active_entity"], $_GET["is_recursive"])) {
|
}
|
||||||
if ($_GET["active_entity"] == $_SESSION["glpiactive_entity"]) {
|
if (Session::changeActiveEntities($_GET["active_entity"], $_GET["is_recursive"])) {
|
||||||
Html::redirect(preg_replace("/entities_id.*/", "", $_SERVER['HTTP_REFERER']));
|
if ($_GET["active_entity"] == $_SESSION["glpiactive_entity"]) {
|
||||||
}
|
Html::redirect(preg_replace("/entities_id.*/", "", $_SERVER['HTTP_REFERER']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Redirect management
|
|
||||||
if (isset($_GET["redirect"])) {
|
// Redirect management
|
||||||
Toolbox::manageRedirect($_GET["redirect"]);
|
if (isset($_GET["redirect"])) {
|
||||||
}
|
Toolbox::manageRedirect($_GET["redirect"]);
|
||||||
|
}
|
||||||
// redirect if no create ticket right
|
|
||||||
if (!Session::haveRight('ticket', CREATE)
|
// redirect if no create ticket right
|
||||||
&& !Session::haveRight('reminder_public', READ)
|
if (!Session::haveRight('ticket', CREATE)
|
||||||
&& !Session::haveRight("rssfeed_public", READ)) {
|
&& !Session::haveRight('reminder_public', READ)
|
||||||
|
&& !Session::haveRight("rssfeed_public", READ)) {
|
||||||
if (Session::haveRight('followup', ITILFollowup::SEEPUBLIC) //TicketFollowup::SEEPUBLIC
|
|
||||||
|| Session::haveRight('task', TicketTask::SEEPUBLIC)
|
if (Session::haveRight('followup', ITILFollowup::SEEPUBLIC) //TicketFollowup::SEEPUBLIC
|
||||||
|| Session::haveRightsOr('ticketvalidation', [TicketValidation::VALIDATEREQUEST,
|
|| Session::haveRight('task', TicketTask::SEEPUBLIC)
|
||||||
TicketValidation::VALIDATEINCIDENT])) {
|
|| Session::haveRightsOr('ticketvalidation', [TicketValidation::VALIDATEREQUEST,
|
||||||
Html::redirect($CFG_GLPI['root_doc']."/front/ticket.php");
|
TicketValidation::VALIDATEINCIDENT])) {
|
||||||
|
Html::redirect($CFG_GLPI['root_doc']."/front/ticket.php");
|
||||||
} else if (Session::haveRight('reservation', ReservationItem::RESERVEANITEM)) {
|
|
||||||
Html::redirect($CFG_GLPI['root_doc']."/front/reservationitem.php");
|
} else if (Session::haveRight('reservation', ReservationItem::RESERVEANITEM)) {
|
||||||
|
Html::redirect($CFG_GLPI['root_doc']."/front/reservationitem.php");
|
||||||
} else if (Session::haveRight('knowbase', KnowbaseItem::READFAQ)) {
|
|
||||||
Html::redirect($CFG_GLPI['root_doc']."/front/helpdesk.faq.php");
|
} else if (Session::haveRight('knowbase', KnowbaseItem::READFAQ)) {
|
||||||
}
|
Html::redirect($CFG_GLPI['root_doc']."/front/helpdesk.faq.php");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Session::checkHelpdeskAccess();
|
|
||||||
|
Session::checkHelpdeskAccess();
|
||||||
Html::helpHeader(__('New ticket'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
|
|
||||||
|
Html::helpHeader(__('New ticket'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
|
||||||
|
|
||||||
if (isset($_REQUEST['case_guid'])) {
|
|
||||||
$res = $DB->request(
|
if (isset($_REQUEST['case_guid'])) {
|
||||||
'glpi_plugin_processmaker_cases', [
|
$res = $DB->request('glpi_plugin_processmaker_cases', ['case_guid' => $_REQUEST['case_guid']]);
|
||||||
'case_guid'=>$_REQUEST['case_guid']
|
//$query = "SELECT * FROM glpi_plugin_processmaker_cases WHERE case_guid='".$_REQUEST['case_guid']."'";
|
||||||
]);
|
//$res = $DB->query( $query );
|
||||||
$query = "SELECT * FROM glpi_plugin_processmaker_cases WHERE case_guid='".$_REQUEST['case_guid']."'";
|
//if ($DB->numrows( $res )) { // a ticket already exists for this case, then show new cases
|
||||||
//$res = $DB->query( $query );
|
if ($res->numrows()) { // a ticket already exists for this case, then show new cases
|
||||||
//if ($DB->numrows( $res )) { // a ticket already exists for this case, then show new cases
|
processMakerShowProcessList(Session::getLoginUserID(), 1);
|
||||||
if ($res->numrows()) { // a ticket already exists for this case, then show new cases
|
} else {
|
||||||
processMakerShowProcessList(Session::getLoginUserID(), 1);
|
// before showing the case, we must check the rights for this user to view it, if entity has been changed in the meanwhile
|
||||||
} else {
|
// and must check if entity of the ticket is in the tree of authorized entities for current profile
|
||||||
// before showing the case, we must check the rights for this user to view it, if entity has been changed in the meanwhile
|
$processList = PluginProcessmakerProcessmaker::getProcessesWithCategoryAndProfile( $_REQUEST["itilcategories_id"], $_REQUEST["type"], $_SESSION['glpiactiveprofile']['id'], $_REQUEST['entities_id'] );
|
||||||
// and must check if entity of the ticket is in the tree of authorized entities for current profile
|
if (in_array( $_REQUEST['entities_id'], $_SESSION['glpiactiveentities']) && in_array_recursive( $_REQUEST['processes_id'], $processList )) {
|
||||||
$processList = PluginProcessmakerProcessmaker::getProcessesWithCategoryAndProfile( $_REQUEST["itilcategories_id"], $_REQUEST["type"], $_SESSION['glpiactiveprofile']['id'], $_REQUEST['entities_id'] );
|
processMakerShowCase(Session::getLoginUserID(), 1);
|
||||||
if (in_array( $_REQUEST['entities_id'], $_SESSION['glpiactiveentities']) && in_array_recursive( $_REQUEST['processes_id'], $processList )) {
|
} else {
|
||||||
processMakerShowCase(Session::getLoginUserID(), 1);
|
Html::redirect($CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1");
|
||||||
} else {
|
}
|
||||||
Html::redirect($CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1");
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
processMakerShowProcessList(Session::getLoginUserID(), 1);
|
||||||
} else {
|
}
|
||||||
processMakerShowProcessList(Session::getLoginUserID(), 1);
|
|
||||||
}
|
Html::helpFooter();
|
||||||
|
|
||||||
Html::helpFooter();
|
|
||||||
|
|
||||||
|
|||||||
960
hook.php
960
hook.php
@@ -1,474 +1,486 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once 'inc/processmaker.class.php';
|
include_once 'inc/processmaker.class.php';
|
||||||
|
|
||||||
function plugin_processmaker_MassiveActions($type) {
|
function plugin_processmaker_MassiveActions($type) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'PluginProcessmakerProcess' :
|
case 'PluginProcessmakerProcess' :
|
||||||
if (plugin_processmaker_haveRight('config', UPDATE)) {
|
if (plugin_processmaker_haveRight('config', UPDATE)) {
|
||||||
return ['plugin_processmaker_taskrefresh' => __('Synchronize Task List', 'processmaker')];
|
return ['plugin_processmaker_taskrefresh' => __('Synchronize Task List', 'processmaker')];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'PluginProcessmakerProcess_Profile' :
|
case 'PluginProcessmakerProcess_Profile' :
|
||||||
if (plugin_processmaker_haveRight('config', UPDATE)) {
|
if (plugin_processmaker_haveRight('config', UPDATE)) {
|
||||||
return ['purge' => __('Delete permanently')];
|
return ['purge' => __('Delete permanently')];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//case 'PluginProcessmakerCase' :
|
//case 'PluginProcessmakerCase' :
|
||||||
// if (plugin_processmaker_haveRight("case", DELETE)) {
|
// if (plugin_processmaker_haveRight("case", DELETE)) {
|
||||||
// return array('purge' => __('Delete permanently'));
|
// return array('purge' => __('Delete permanently'));
|
||||||
// }
|
// }
|
||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of plugin_processmaker_install
|
* Summary of plugin_processmaker_install
|
||||||
* Creates tables and initializes tasks, "GLPI Requesters" group
|
* Creates tables and initializes tasks, "GLPI Requesters" group
|
||||||
* and so on
|
* and so on
|
||||||
* @return true or die!
|
* @return true or die!
|
||||||
*/
|
*/
|
||||||
function plugin_processmaker_install() {
|
function plugin_processmaker_install() {
|
||||||
global $DB;
|
global $DB;
|
||||||
if (!$DB->tableExists("glpi_plugin_processmaker_cases")) {
|
if (!$DB->tableExists("glpi_plugin_processmaker_cases")) {
|
||||||
// new installation
|
// new installation
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/install.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/install.php");
|
||||||
processmaker_install();
|
processmaker_install();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// upgrade installation
|
// upgrade installation
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update.php");
|
||||||
processmaker_update();
|
processmaker_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// To be called for each task managed by the plugin
|
// To be called for each task managed by the plugin
|
||||||
// task in class
|
// task in class
|
||||||
CronTask::Register('PluginProcessmakerProcessmaker', 'pmusers', DAY_TIMESTAMP, [ 'state' => CronTask::STATE_DISABLE, 'mode' => CronTask::MODE_EXTERNAL]);
|
CronTask::Register('PluginProcessmakerProcessmaker', 'pmusers', DAY_TIMESTAMP, [ 'state' => CronTask::STATE_DISABLE, 'mode' => CronTask::MODE_EXTERNAL]);
|
||||||
CronTask::Register('PluginProcessmakerProcessmaker', 'pmorphancases', DAY_TIMESTAMP, ['param' => 10, 'state' => CronTask::STATE_DISABLE, 'mode' => CronTask::MODE_EXTERNAL]);
|
CronTask::Register('PluginProcessmakerProcessmaker', 'pmorphancases', DAY_TIMESTAMP, ['param' => 10, 'state' => CronTask::STATE_DISABLE, 'mode' => CronTask::MODE_EXTERNAL]);
|
||||||
CronTask::Register('PluginProcessmakerProcessmaker', 'pmtaskactions', MINUTE_TIMESTAMP, ['state' => CronTask::STATE_DISABLE, 'mode' => CronTask::MODE_EXTERNAL]);
|
CronTask::Register('PluginProcessmakerProcessmaker', 'pmtaskactions', MINUTE_TIMESTAMP, ['state' => CronTask::STATE_DISABLE, 'mode' => CronTask::MODE_EXTERNAL]);
|
||||||
|
|
||||||
// required because autoload doesn't work for unactive plugin'
|
// required because autoload doesn't work for unactive plugin'
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/inc/profile.class.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/inc/profile.class.php");
|
||||||
PluginProcessmakerProfile::createAdminAccess($_SESSION['glpiactiveprofile']['id']);
|
PluginProcessmakerProfile::createAdminAccess($_SESSION['glpiactiveprofile']['id']);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function plugin_processmaker_uninstall() {
|
function plugin_processmaker_uninstall() {
|
||||||
|
|
||||||
CronTask::Unregister('PluginProcessmakerProcessmaker');
|
CronTask::Unregister('PluginProcessmakerProcessmaker');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function plugin_processmaker_getAddSearchOptions($itemtype) {
|
function plugin_processmaker_getAddSearchOptions($itemtype) {
|
||||||
|
|
||||||
$sopt = [];
|
$sopt = [];
|
||||||
// TODO add Change and Problem + other fields to the search
|
// TODO add Change and Problem + other fields to the search
|
||||||
if ($itemtype == 'Ticket') {
|
if ($itemtype == 'Ticket') {
|
||||||
$sopt[10001]['table'] = 'glpi_plugin_processmaker_cases';
|
$sopt[10001]['table'] = 'glpi_plugin_processmaker_cases';
|
||||||
$sopt[10001]['field'] = 'case_status';
|
$sopt[10001]['field'] = 'case_status';
|
||||||
//$sopt[1001]['linkfield'] = 'id';
|
//$sopt[1001]['linkfield'] = 'id';
|
||||||
$sopt[10001]['massiveaction'] = false;
|
$sopt[10001]['massiveaction'] = false;
|
||||||
$sopt[10001]['name'] = __('Case', 'processmaker').' - '.__('Status', 'processmaker');
|
$sopt[10001]['name'] = __('Case', 'processmaker').' - '.__('Status', 'processmaker');
|
||||||
$sopt[10001]['datatype'] = 'text';
|
$sopt[10001]['datatype'] = 'text';
|
||||||
$sopt[10001]['forcegroupby'] = true;
|
$sopt[10001]['forcegroupby'] = true;
|
||||||
//$sopt[10001]['searchtype'] = 'equals';
|
//$sopt[10001]['searchtype'] = 'equals';
|
||||||
|
|
||||||
//$sopt[1001]['itemlink_type'] = 'PluginProcessmakerTicketcase';
|
//$sopt[1001]['itemlink_type'] = 'PluginProcessmakerTicketcase';
|
||||||
|
|
||||||
//$sopt[1001]['table'] = 'glpi_plugin_processmaker_ticketcase';
|
//$sopt[1001]['table'] = 'glpi_plugin_processmaker_ticketcase';
|
||||||
//$sopt[1001]['field'] = 'case_status';
|
//$sopt[1001]['field'] = 'case_status';
|
||||||
//$sopt[1001]['massiveaction'] = false;
|
//$sopt[1001]['massiveaction'] = false;
|
||||||
//$sopt[1001]['name'] = 'Case - Status';
|
//$sopt[1001]['name'] = 'Case - Status';
|
||||||
//$sopt[1001]['forcegroupby'] = true;
|
//$sopt[1001]['forcegroupby'] = true;
|
||||||
//$sopt[1001]['datatype'] = 'itemlink';
|
//$sopt[1001]['datatype'] = 'itemlink';
|
||||||
// $sopt[1001]['itemlink_type'] = 'PluginProcessmakerProcessmaker';
|
// $sopt[1001]['itemlink_type'] = 'PluginProcessmakerProcessmaker';
|
||||||
//$sopt[1001]['joinparams'] = array('beforejoin'
|
//$sopt[1001]['joinparams'] = array('beforejoin'
|
||||||
// => array('table' => 'glpi_plugin_processmaker_ticketcase',
|
// => array('table' => 'glpi_plugin_processmaker_ticketcase',
|
||||||
// 'linkfield' => 'ticket_id'));
|
// 'linkfield' => 'ticket_id'));
|
||||||
|
|
||||||
//$sopt[1001]['joinparams']['jointype'] = "itemtype_id";
|
//$sopt[1001]['joinparams']['jointype'] = "itemtype_id";
|
||||||
//$sopt[1001]['pfields_type'] = ;
|
//$sopt[1001]['pfields_type'] = ;
|
||||||
}
|
}
|
||||||
return $sopt;
|
return $sopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
function plugin_processmaker_addLeftJoin($type, $ref_table, $new_table, $linkfield, &$already_link_tables) {
|
function plugin_processmaker_addLeftJoin($type, $ref_table, $new_table, $linkfield, &$already_link_tables) {
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
|
||||||
case 'Ticket':
|
case 'Ticket':
|
||||||
switch ($new_table) {
|
switch ($new_table) {
|
||||||
|
|
||||||
case "glpi_plugin_processmaker_cases" :
|
case "glpi_plugin_processmaker_cases" :
|
||||||
$out= " LEFT JOIN `glpi_plugin_processmaker_cases`
|
$out= " LEFT JOIN `glpi_plugin_processmaker_cases`
|
||||||
ON (`$ref_table`.`id` = `glpi_plugin_processmaker_cases`.`items_id` AND `glpi_plugin_processmaker_cases`.`itemtype` like 'Ticket') ";
|
ON (`$ref_table`.`id` = `glpi_plugin_processmaker_cases`.`items_id` AND `glpi_plugin_processmaker_cases`.`itemtype` like 'Ticket') ";
|
||||||
return $out;
|
return $out;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of plugin_pre_item_update_processmaker
|
* Summary of plugin_pre_item_update_processmaker
|
||||||
* @param CommonITILObject $parm is an object
|
* @param CommonITILObject $parm is an object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function plugin_pre_item_update_processmaker(CommonITILObject $parm) {
|
function plugin_pre_item_update_processmaker(CommonITILObject $parm) {
|
||||||
global $DB;//, $PM_SOAP;
|
//global $DB;//, $PM_SOAP;
|
||||||
|
|
||||||
if (isset($_SESSION['glpiname'])) { // && $parm->getType() == 'Ticket') {
|
// look at previous status
|
||||||
$locVar = [ ];
|
if (isset($parm->input['status'])
|
||||||
foreach ($parm->input as $key => $val) {
|
&& $parm->input['status'] == CommonITILObject::SOLVED
|
||||||
switch ($key) {
|
&& !in_array($parm->fields['status'], [CommonITILObject::SOLVED, CommonITILObject::CLOSED])
|
||||||
case 'global_validation' :
|
&& !PluginProcessmakerCase::canSolve(['item' => $parm])) {
|
||||||
$locVar[ 'GLPI_TICKET_GLOBAL_VALIDATION' ] = $val;
|
$parm->input = []; // empty array... to prevent item update
|
||||||
$locVar[ 'GLPI_ITEM_GLOBAL_VALIDATION' ] = $val;
|
Session::addMessageAfterRedirect(__('At least one \'Process case\' is running!<br/>Solving is currently disabled!', 'processmaker'), false, ERROR);
|
||||||
break;
|
return;
|
||||||
case 'itilcategories_id' :
|
}
|
||||||
$locVar[ 'GLPI_ITEM_ITIL_CATEGORY_ID' ] = $val;
|
|
||||||
break;
|
|
||||||
case 'date' :
|
if (isset($_SESSION['glpiname'])) {
|
||||||
$locVar[ 'GLPI_ITEM_OPENING_DATE' ] = $val;
|
$locVar = [ ];
|
||||||
break;
|
foreach ($parm->input as $key => $val) {
|
||||||
case 'time_to_resolve' :
|
switch ($key) {
|
||||||
$locVar[ 'GLPI_TICKET_DUE_DATE' ] = $val;
|
case 'global_validation' :
|
||||||
$locVar[ 'GLPI_ITEM_DUE_DATE' ] = $val;
|
$locVar[ 'GLPI_TICKET_GLOBAL_VALIDATION' ] = $val;
|
||||||
break;
|
$locVar[ 'GLPI_ITEM_GLOBAL_VALIDATION' ] = $val;
|
||||||
case 'urgency' :
|
break;
|
||||||
$locVar[ 'GLPI_TICKET_URGENCY' ] = $val;
|
case 'itilcategories_id' :
|
||||||
$locVar[ 'GLPI_ITEM_URGENCY' ] = $val;
|
$locVar[ 'GLPI_ITEM_ITIL_CATEGORY_ID' ] = $val;
|
||||||
break;
|
break;
|
||||||
case 'impact' :
|
case 'date' :
|
||||||
$locVar[ 'GLPI_ITEM_IMPACT' ] = $val;
|
$locVar[ 'GLPI_ITEM_OPENING_DATE' ] = $val;
|
||||||
break;
|
break;
|
||||||
case 'priority' :
|
case 'time_to_resolve' :
|
||||||
$locVar[ 'GLPI_ITEM_PRIORITY' ] = $val;
|
$locVar[ 'GLPI_TICKET_DUE_DATE' ] = $val;
|
||||||
break;
|
$locVar[ 'GLPI_ITEM_DUE_DATE' ] = $val;
|
||||||
}
|
break;
|
||||||
}
|
case 'urgency' :
|
||||||
|
$locVar[ 'GLPI_TICKET_URGENCY' ] = $val;
|
||||||
$itemId = $parm->getID();
|
$locVar[ 'GLPI_ITEM_URGENCY' ] = $val;
|
||||||
$itemType = $parm->getType();
|
break;
|
||||||
|
case 'impact' :
|
||||||
$locCase = new PluginProcessmakerCase;
|
$locVar[ 'GLPI_ITEM_IMPACT' ] = $val;
|
||||||
foreach (PluginProcessmakerCase::getIDsFromItem($itemType, $itemId ) as $cases_id) {
|
break;
|
||||||
$locCase->getFromDB($cases_id);
|
case 'priority' :
|
||||||
$locCase->sendVariables($locVar);
|
$locVar[ 'GLPI_ITEM_PRIORITY' ] = $val;
|
||||||
|
break;
|
||||||
// if entities_id of item has been changed, then must update case
|
}
|
||||||
if (isset($parm->input['entities_id']) && $parm->input['entities_id'] != $parm->fields['entities_id']) {
|
}
|
||||||
$locCase->update(['id' => $cases_id, 'entities_id' => $parm->input['entities_id']]);
|
|
||||||
}
|
$itemId = $parm->getID();
|
||||||
}
|
$itemType = $parm->getType();
|
||||||
}
|
|
||||||
|
$locCase = new PluginProcessmakerCase;
|
||||||
}
|
foreach (PluginProcessmakerCase::getIDsFromItem($itemType, $itemId) as $cases_id) {
|
||||||
|
$locCase->getFromDB($cases_id);
|
||||||
/**
|
$locCase->sendVariables($locVar);
|
||||||
* Summary of plugin_item_update_processmaker_satisfaction
|
|
||||||
* inject satisfaction survey into case
|
// if entities_id of item has been changed, then must update case
|
||||||
* @param mixed $parm is the object
|
if (isset($parm->input['entities_id']) && $parm->input['entities_id'] != $parm->fields['entities_id']) {
|
||||||
*/
|
$locCase->update(['id' => $cases_id, 'entities_id' => $parm->input['entities_id']]);
|
||||||
function plugin_item_update_processmaker_satisfaction($parm) {
|
}
|
||||||
global $PM_SOAP;
|
}
|
||||||
if (Session::isCron()) { // Task cron log with user admin
|
}
|
||||||
$PM_SOAP->login(true);
|
|
||||||
}
|
}
|
||||||
$cases = PluginProcessmakerCase::getIDsFromItem('Ticket', $parm->fields['tickets_id']);
|
|
||||||
foreach ($cases as $cases_id) {
|
/**
|
||||||
$locCase = new PluginProcessmakerCase;
|
* Summary of plugin_item_update_processmaker_satisfaction
|
||||||
if ($locCase->getFromDB($cases_id)) {
|
* inject satisfaction survey into case
|
||||||
// case is existing for this item
|
* @param mixed $parm is the object
|
||||||
$locCase->sendVariables( ['GLPI_SATISFACTION_QUALITY' => $parm->fields['satisfaction']] );
|
*/
|
||||||
}
|
function plugin_item_update_processmaker_satisfaction($parm) {
|
||||||
}
|
global $PM_SOAP;
|
||||||
}
|
if (Session::isCron()) { // Task cron log with user admin
|
||||||
|
$PM_SOAP->login(true);
|
||||||
|
}
|
||||||
/**
|
$cases = PluginProcessmakerCase::getIDsFromItem('Ticket', $parm->fields['tickets_id']);
|
||||||
* Summary of plugin_item_update_processmaker_user
|
foreach ($cases as $cases_id) {
|
||||||
* When a user login is changed, then must change it in the PM tables
|
$locCase = new PluginProcessmakerCase;
|
||||||
* @param User $param is the user being changed
|
if ($locCase->getFromDB($cases_id)) {
|
||||||
*/
|
// case is existing for this item
|
||||||
function plugin_item_update_processmaker_user(User $param) {
|
$locCase->sendVariables( ['GLPI_SATISFACTION_QUALITY' => $parm->fields['satisfaction']] );
|
||||||
// Must test if user login has been changed
|
}
|
||||||
// if yes, must change the login in the PM tables:
|
}
|
||||||
// USERS and RBAC_USERS, othewise the link in the processmaker_users table will be invalid
|
}
|
||||||
if (in_array('name', $param->updates)) {
|
|
||||||
// check if user is in the processmaker_user table
|
|
||||||
$pm_user = PluginProcessmakerUser::getPMUserId($param->getID());
|
/**
|
||||||
if ($pm_user) {
|
* Summary of plugin_item_update_processmaker_user
|
||||||
// must update the user in PM tables
|
* When a user login is changed, then must change it in the PM tables
|
||||||
global $PM_SOAP;
|
* @param User $param is the user being changed
|
||||||
if ($param->fields['is_active'] == 0 || $param->fields['is_deleted'] == 1) {
|
*/
|
||||||
$status = "INACTIVE";
|
function plugin_item_update_processmaker_user(User $param) {
|
||||||
} else {
|
// Must test if user login has been changed
|
||||||
$status = "ACTIVE";
|
// if yes, must change the login in the PM tables:
|
||||||
}
|
// USERS and RBAC_USERS, othewise the link in the processmaker_users table will be invalid
|
||||||
$PM_SOAP->login(true);
|
if (in_array('name', $param->updates)) {
|
||||||
$pmResult = $PM_SOAP->updateUser( $pm_user, $param->fields['name'], $param->fields['firstname'], $param->fields['realname'], $status );
|
// check if user is in the processmaker_user table
|
||||||
}
|
$pm_user = PluginProcessmakerUser::getPMUserId($param->getID());
|
||||||
}
|
if ($pm_user) {
|
||||||
}
|
// must update the user in PM tables
|
||||||
|
global $PM_SOAP;
|
||||||
|
if ($param->fields['is_active'] == 0 || $param->fields['is_deleted'] == 1) {
|
||||||
function plugin_processmaker_post_init() {
|
$status = "INACTIVE";
|
||||||
global $PM_DB, $PM_SOAP;
|
} else {
|
||||||
if (!isset($PM_DB)) {
|
$status = "ACTIVE";
|
||||||
$PM_DB = new PluginProcessmakerDB;
|
}
|
||||||
}
|
$PM_SOAP->login(true);
|
||||||
if (!isset($PM_SOAP)) {
|
$pmResult = $PM_SOAP->updateUser( $pm_user, $param->fields['name'], $param->fields['firstname'], $param->fields['realname'], $status );
|
||||||
$PM_SOAP = new PluginProcessmakerProcessmaker;
|
}
|
||||||
// and default login is current running user if any
|
}
|
||||||
if (Session::getLoginUserID()) {
|
}
|
||||||
$PM_SOAP->login();
|
|
||||||
}
|
|
||||||
}
|
function plugin_processmaker_post_init() {
|
||||||
}
|
global $PM_DB, $PM_SOAP;
|
||||||
|
if (!isset($PM_DB)) {
|
||||||
|
$PM_DB = new PluginProcessmakerDB;
|
||||||
function plugin_processmaker_giveItem($itemtype, $ID, $data, $num) {
|
}
|
||||||
|
if (!isset($PM_SOAP)) {
|
||||||
return;
|
$PM_SOAP = new PluginProcessmakerProcessmaker;
|
||||||
}
|
// and default login is current running user if any
|
||||||
|
if (Session::getLoginUserID()) {
|
||||||
function plugin_processmaker_change_profile() {
|
$PM_SOAP->login();
|
||||||
if ($_SESSION['glpiactiveprofile']['interface'] == "helpdesk") {
|
}
|
||||||
// must add the rights for simplified interface
|
}
|
||||||
$_SESSION['glpiactiveprofile']['plugin_processmaker_case'] = READ;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
function plugin_processmaker_giveItem($itemtype, $ID, $data, $num) {
|
||||||
/**
|
|
||||||
* Summary of plugin_item_add_update_processmaker_tasks
|
return;
|
||||||
* @param mixed $parm
|
}
|
||||||
*/
|
|
||||||
function plugin_item_update_processmaker_tasks($parm) {
|
|
||||||
global $DB, $CFG_GLPI, $PM_SOAP;
|
function plugin_processmaker_change_profile() {
|
||||||
|
if ($_SESSION['glpiactiveprofile']['interface'] == "helpdesk") {
|
||||||
$pmTaskCat = new PluginProcessmakerTaskCategory;
|
// must add the rights for simplified interface
|
||||||
if ($pmTaskCat->getFromDBbyCategory( $parm->fields['taskcategories_id'] )
|
$_SESSION['glpiactiveprofile']['plugin_processmaker_case'] = READ;
|
||||||
&& in_array( 'state', $parm->updates )
|
}
|
||||||
&& $parm->input['state'] == Planning::DONE
|
}
|
||||||
&& $parm->oldvalues['state'] == Planning::TODO) { // the task has just been set to DONE state
|
|
||||||
|
/**
|
||||||
//$itemtype = str_replace( 'Task', '', $parm->getType() );
|
* Summary of plugin_item_add_update_processmaker_tasks
|
||||||
|
* @param mixed $parm
|
||||||
$pmTask = new PluginProcessmakerTask($parm->getType());
|
*/
|
||||||
$pmTask->getFromDB($parm->fields['id']);
|
function plugin_item_update_processmaker_tasks($parm) {
|
||||||
|
global $DB, $CFG_GLPI, $PM_SOAP;
|
||||||
$locCase = new PluginProcessmakerCase;
|
|
||||||
$locCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']);
|
$pmTaskCat = new PluginProcessmakerTaskCategory;
|
||||||
$srccase_guid = $locCase->fields['case_guid'];
|
if ($pmTaskCat->getFromDBbyCategory( $parm->fields['taskcategories_id'] )
|
||||||
|
&& in_array( 'state', $parm->updates )
|
||||||
//$msg = Toolbox::backtrace(false);
|
&& $parm->input['state'] == Planning::DONE
|
||||||
//$msg .= ' $locCase: '.str_replace("\n", "\n ", print_r($locCase, true))."\n";
|
&& $parm->oldvalues['state'] == Planning::TODO) { // the task has just been set to DONE state
|
||||||
//$msg .= ' $task: '.str_replace("\n", "\n ", print_r($parm, true))."\n";
|
|
||||||
//$msg .= ' $pmTask: '.str_replace("\n", "\n ", print_r($pmTask, true))."\n";
|
//$itemtype = str_replace( 'Task', '', $parm->getType() );
|
||||||
//$msg .= "\n";
|
|
||||||
|
$pmTask = new PluginProcessmakerTask($parm->getType());
|
||||||
foreach ($DB->request( 'glpi_plugin_processmaker_caselinks', "is_active = 1 AND sourcetask_guid='".$pmTaskCat->fields['pm_task_guid']."'") as $targetTask) {
|
$pmTask->getFromDB($parm->fields['id']);
|
||||||
|
|
||||||
// Must check the condition
|
$locCase = new PluginProcessmakerCase;
|
||||||
$casevariables = [];
|
$locCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']);
|
||||||
|
$srccase_guid = $locCase->fields['case_guid'];
|
||||||
$matches = [];
|
|
||||||
if (preg_match_all( "/@@(\w+)/u", $targetTask['sourcecondition'], $matches )) {
|
//$msg = Toolbox::backtrace(false);
|
||||||
$casevariables = $matches[1];
|
//$msg .= ' $locCase: '.str_replace("\n", "\n ", print_r($locCase, true))."\n";
|
||||||
}
|
//$msg .= ' $task: '.str_replace("\n", "\n ", print_r($parm, true))."\n";
|
||||||
|
//$msg .= ' $pmTask: '.str_replace("\n", "\n ", print_r($pmTask, true))."\n";
|
||||||
$targetTask['targetactions'] = []; // empty array by default
|
//$msg .= "\n";
|
||||||
foreach ($DB->request( 'glpi_plugin_processmaker_caselinkactions', 'plugin_processmaker_caselinks_id = '.$targetTask['id']) as $actionvalue) {
|
|
||||||
$targetTask['targetactions'][$actionvalue['name']] = $actionvalue['value'];
|
foreach ($DB->request( 'glpi_plugin_processmaker_caselinks', "is_active = 1 AND sourcetask_guid='".$pmTaskCat->fields['pm_task_guid']."'") as $targetTask) {
|
||||||
if (preg_match_all( "/@@(\w+)/u", $actionvalue['value'], $matches )) {
|
|
||||||
$casevariables = array_merge( $casevariables, $matches[1] );
|
// Must check the condition
|
||||||
}
|
$casevariables = [];
|
||||||
}
|
|
||||||
$externalapplication = false; // by default
|
$matches = [];
|
||||||
if ($targetTask['is_externaldata'] && isset($targetTask['externalapplication'])) {
|
if (preg_match_all( "/@@(\w+)/u", $targetTask['sourcecondition'], $matches )) {
|
||||||
// must read some values
|
$casevariables = $matches[1];
|
||||||
$externalapplication = json_decode( $targetTask['externalapplication'], true );
|
}
|
||||||
// must be of the form
|
|
||||||
// {"method":"POST","url":"urloftheservice","params":json_object}
|
$targetTask['targetactions'] = []; // empty array by default
|
||||||
// Where method is the POST, GET, ... method
|
foreach ($DB->request( 'glpi_plugin_processmaker_caselinkactions', 'plugin_processmaker_caselinks_id = '.$targetTask['id']) as $actionvalue) {
|
||||||
// url is the URL to be called
|
$targetTask['targetactions'][$actionvalue['name']] = $actionvalue['value'];
|
||||||
// params is a list of parameters to get from running case
|
if (preg_match_all( "/@@(\w+)/u", $actionvalue['value'], $matches )) {
|
||||||
foreach ($externalapplication['params'] as $paramname => $variable) {
|
$casevariables = array_merge( $casevariables, $matches[1] );
|
||||||
if (preg_match_all( "/@@(\w+)/u", $variable, $matches )) {
|
}
|
||||||
$casevariables = array_merge( $casevariables, $matches[1] );
|
}
|
||||||
}
|
$externalapplication = false; // by default
|
||||||
}
|
if ($targetTask['is_externaldata'] && isset($targetTask['externalapplication'])) {
|
||||||
}
|
// must read some values
|
||||||
|
$externalapplication = json_decode( $targetTask['externalapplication'], true );
|
||||||
// ask for those case variables
|
// must be of the form
|
||||||
//$PM_SOAP = new PluginProcessmakerProcessmaker();
|
// {"method":"POST","url":"urloftheservice","params":json_object}
|
||||||
//$PM_SOAP->login( );
|
// Where method is the POST, GET, ... method
|
||||||
// now tries to get the variables to check condition
|
// url is the URL to be called
|
||||||
$infoForTasks = $locCase->getVariables($casevariables);
|
// params is a list of parameters to get from running case
|
||||||
foreach ($infoForTasks as $casevar => $varval) {
|
foreach ($externalapplication['params'] as $paramname => $variable) {
|
||||||
$infoForTasks[ "@@$casevar" ] = "'$varval'";
|
if (preg_match_all( "/@@(\w+)/u", $variable, $matches )) {
|
||||||
unset( $infoForTasks[ $casevar ] );
|
$casevariables = array_merge( $casevariables, $matches[1] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//$msg .= " ***********\n";
|
}
|
||||||
//$msg .= ' $targetTask: '.str_replace("\n", "\n ", print_r($targetTask, true))."\n";
|
|
||||||
|
// ask for those case variables
|
||||||
$targetTask['sourcecondition'] = str_replace( array_keys($infoForTasks), $infoForTasks, $targetTask['sourcecondition'] );
|
//$PM_SOAP = new PluginProcessmakerProcessmaker();
|
||||||
|
//$PM_SOAP->login( );
|
||||||
$eval = eval( "return (".$targetTask['sourcecondition']." ? 1 : 0);" );
|
// now tries to get the variables to check condition
|
||||||
|
$infoForTasks = $locCase->getVariables($casevariables);
|
||||||
//$msg .= ' $infoForTasks: '.str_replace("\n", "\n ", print_r($infoForTasks, true))."\n";
|
foreach ($infoForTasks as $casevar => $varval) {
|
||||||
//$msg .= ' $targetTask[\'sourcecondition\']: '.str_replace("\n", "\n ", print_r($targetTask['sourcecondition'], true))."\n";
|
$infoForTasks[ "@@$casevar" ] = "'$varval'";
|
||||||
//$msg .= ' $result: '."$eval\n";
|
unset( $infoForTasks[ $casevar ] );
|
||||||
//$msg .= "\n";
|
}
|
||||||
|
|
||||||
if ($eval) {
|
//$msg .= " ***********\n";
|
||||||
// look at each linked ticket if a case is attached and then if a task like $val is TO_DO
|
//$msg .= ' $targetTask: '.str_replace("\n", "\n ", print_r($targetTask, true))."\n";
|
||||||
// then will try to routeCase for each tasks in $val
|
|
||||||
|
$targetTask['sourcecondition'] = str_replace( array_keys($infoForTasks), $infoForTasks, $targetTask['sourcecondition'] );
|
||||||
$postdata = [];
|
|
||||||
foreach ($targetTask['targetactions'] as $action => $actionvalue) {
|
$eval = eval( "return (".$targetTask['sourcecondition']." ? 1 : 0);" );
|
||||||
$postdata['form'][$action] = eval( "return ".str_replace( array_keys($infoForTasks), $infoForTasks, $actionvalue)." ;" );
|
|
||||||
}
|
//$msg .= ' $infoForTasks: '.str_replace("\n", "\n ", print_r($infoForTasks, true))."\n";
|
||||||
$postdata['UID'] = $targetTask['targetdynaform_guid'];
|
//$msg .= ' $targetTask[\'sourcecondition\']: '.str_replace("\n", "\n ", print_r($targetTask['sourcecondition'], true))."\n";
|
||||||
$postdata['__DynaformName__'] = $targetTask['targetprocess_guid']."_".$targetTask['targetdynaform_guid'];
|
//$msg .= ' $result: '."$eval\n";
|
||||||
$postdata['__notValidateThisFields__'] = '[]';
|
//$msg .= "\n";
|
||||||
$postdata['DynaformRequiredFields'] = '[]';
|
|
||||||
$postdata['form']['btnGLPISendRequest'] = 'submit';
|
if ($eval) {
|
||||||
|
// look at each linked ticket if a case is attached and then if a task like $val is TO_DO
|
||||||
$externalapplicationparams = [];
|
// then will try to routeCase for each tasks in $val
|
||||||
if ($externalapplication) {
|
|
||||||
// must call curl
|
$postdata = [];
|
||||||
foreach ($externalapplication['params'] as $paramname => $variable) {
|
foreach ($targetTask['targetactions'] as $action => $actionvalue) {
|
||||||
$externalapplicationparams[$paramname] = eval( "return ".str_replace( array_keys($infoForTasks), $infoForTasks, $variable)." ;" );
|
$postdata['form'][$action] = eval( "return ".str_replace( array_keys($infoForTasks), $infoForTasks, $actionvalue)." ;" );
|
||||||
}
|
}
|
||||||
$externalapplicationparams['callback'] = $CFG_GLPI["url_base"]."/plugins/processmaker/ajax/asynchronousdatas.php";
|
$postdata['UID'] = $targetTask['targetdynaform_guid'];
|
||||||
$ch = curl_init();
|
$postdata['__DynaformName__'] = $targetTask['targetprocess_guid']."_".$targetTask['targetdynaform_guid'];
|
||||||
$externalapplication['url'] = eval( "return '".str_replace( array_keys($infoForTasks), $infoForTasks, $externalapplication['url'])."' ;" ); // '???
|
$postdata['__notValidateThisFields__'] = '[]';
|
||||||
curl_setopt($ch, CURLOPT_URL, $externalapplication['url'] );
|
$postdata['DynaformRequiredFields'] = '[]';
|
||||||
if (isset($externalapplication['method']) && $externalapplication['method'] == 'POST') {
|
$postdata['form']['btnGLPISendRequest'] = 'submit';
|
||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
|
||||||
}
|
$externalapplicationparams = [];
|
||||||
}
|
if ($externalapplication) {
|
||||||
|
// must call curl
|
||||||
if ($targetTask['is_self']) {
|
foreach ($externalapplication['params'] as $paramname => $variable) {
|
||||||
$PM_SOAP->login(true);
|
$externalapplicationparams[$paramname] = eval( "return ".str_replace( array_keys($infoForTasks), $infoForTasks, $variable)." ;" );
|
||||||
$taskCase = $PM_SOAP->taskCase( $srccase_guid );
|
}
|
||||||
foreach ($taskCase as $task) {
|
$externalapplicationparams['callback'] = $CFG_GLPI["url_base"]."/plugins/processmaker/ajax/asynchronousdatas.php";
|
||||||
// search for target task guid
|
$ch = curl_init();
|
||||||
if ($task->guid == $targetTask['targettask_guid']) {
|
$externalapplication['url'] = eval( "return '".str_replace( array_keys($infoForTasks), $infoForTasks, $externalapplication['url'])."' ;" ); // '???
|
||||||
break;
|
curl_setopt($ch, CURLOPT_URL, $externalapplication['url'] );
|
||||||
}
|
if (isset($externalapplication['method']) && $externalapplication['method'] == 'POST') {
|
||||||
}
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
$PM_SOAP->login();
|
}
|
||||||
|
}
|
||||||
$postdata['APP_UID'] = $srccase_guid;
|
|
||||||
$postdata['DEL_INDEX'] = $task->delegate;
|
if ($targetTask['is_self']) {
|
||||||
|
$PM_SOAP->login(true);
|
||||||
//need to get the 'ProcessMaker' user
|
$taskCase = $PM_SOAP->taskCase( $srccase_guid );
|
||||||
$pmconfig = $PM_SOAP->config; //PluginProcessmakerConfig::getInstance();
|
foreach ($taskCase as $task) {
|
||||||
|
// search for target task guid
|
||||||
$cronaction = new PluginProcessmakerCrontaskaction;
|
if ($task->guid == $targetTask['targettask_guid']) {
|
||||||
$cronaction->add( [ 'plugin_processmaker_caselinks_id' => $targetTask['id'],
|
break;
|
||||||
'plugin_processmaker_cases_id' => $locCase->getID(),
|
}
|
||||||
//'itemtype' => $itemtype,
|
}
|
||||||
//'items_id' => $parm->fields['tickets_id'],
|
$PM_SOAP->login();
|
||||||
'users_id' => $pmconfig->fields['users_id'],
|
|
||||||
'is_targettoclaim' => $targetTask['is_targettoclaim'],
|
$postdata['APP_UID'] = $srccase_guid;
|
||||||
'state' => ($targetTask['is_externaldata'] ? PluginProcessmakerCrontaskaction::WAITING_DATA : PluginProcessmakerCrontaskaction::DATA_READY),
|
$postdata['DEL_INDEX'] = $task->delegate;
|
||||||
'postdata' => json_encode( $postdata, JSON_HEX_APOS | JSON_HEX_QUOT),
|
|
||||||
'logs_out' => json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT)
|
//need to get the 'ProcessMaker' user
|
||||||
],
|
$pmconfig = $PM_SOAP->config; //PluginProcessmakerConfig::getInstance();
|
||||||
null,
|
|
||||||
false);
|
$cronaction = new PluginProcessmakerCrontaskaction;
|
||||||
|
$cronaction->add( [ 'plugin_processmaker_caselinks_id' => $targetTask['id'],
|
||||||
if ($externalapplication) {
|
'plugin_processmaker_cases_id' => $locCase->getID(),
|
||||||
// must call external application in order to get the needed data asynchroneously
|
//'itemtype' => $itemtype,
|
||||||
// must be of the form
|
//'items_id' => $parm->fields['tickets_id'],
|
||||||
// {"url":"urloftheservice","params":{"user":"@@USER_ID","system":"GPP","list":"@@ROLE_LIST"}}
|
'users_id' => $pmconfig->fields['users_id'],
|
||||||
// url is the URL to be called
|
'is_targettoclaim' => $targetTask['is_targettoclaim'],
|
||||||
|
'state' => ($targetTask['is_externaldata'] ? PluginProcessmakerCrontaskaction::WAITING_DATA : PluginProcessmakerCrontaskaction::DATA_READY),
|
||||||
$externalapplicationparams['id'] = $cronaction->getID();
|
'postdata' => json_encode( $postdata, JSON_HEX_APOS | JSON_HEX_QUOT),
|
||||||
|
'logs_out' => json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT)
|
||||||
$externalapplicationparams = json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT);
|
],
|
||||||
|
null,
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $externalapplicationparams);
|
false);
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: ' . strlen($externalapplicationparams), 'Expect:']);
|
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
|
if ($externalapplication) {
|
||||||
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
// must call external application in order to get the needed data asynchroneously
|
||||||
|
// must be of the form
|
||||||
if (isset($externalapplication['ssl_verify'])) {
|
// {"url":"urloftheservice","params":{"user":"@@USER_ID","system":"GPP","list":"@@ROLE_LIST"}}
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $externalapplication['ssl_verify']);
|
// url is the URL to be called
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $externalapplication['ssl_verify']);
|
|
||||||
}
|
$externalapplicationparams['id'] = $cronaction->getID();
|
||||||
|
|
||||||
if (isset($externalapplication['proxy'])) {
|
$externalapplicationparams = json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT);
|
||||||
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1 ) ;
|
|
||||||
curl_setopt($ch, CURLOPT_PROXY, $externalapplication['proxy']);
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $externalapplicationparams);
|
||||||
}
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: ' . strlen($externalapplicationparams), 'Expect:']);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
|
||||||
$response = curl_exec ($ch);
|
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
||||||
if ($response === false) {
|
|
||||||
//throw new Exception(curl_error($ch), curl_errno($ch));
|
if (isset($externalapplication['ssl_verify'])) {
|
||||||
Toolbox::logDebug( curl_error($ch).":".curl_errno($ch) );
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $externalapplication['ssl_verify']);
|
||||||
}
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $externalapplication['ssl_verify']);
|
||||||
|
}
|
||||||
curl_close ($ch);
|
|
||||||
}
|
if (isset($externalapplication['proxy'])) {
|
||||||
// }
|
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1 ) ;
|
||||||
} else {
|
curl_setopt($ch, CURLOPT_PROXY, $externalapplication['proxy']);
|
||||||
// TODO to review this part of code as it is no longer usable like this !!!
|
}
|
||||||
foreach (Ticket_Ticket::getLinkedTicketsTo( $parm->fields['tickets_id'] ) as $tlink) {
|
|
||||||
if ($tlink['link'] == Ticket_Ticket::LINK_TO) {
|
$response = curl_exec ($ch);
|
||||||
$query = "SELECT glpi_plugin_processmaker_cases.id, MAX(glpi_plugin_processmaker_tasks.del_index) AS del_index FROM glpi_tickettasks
|
if ($response === false) {
|
||||||
JOIN glpi_plugin_processmaker_taskcategories ON glpi_plugin_processmaker_taskcategories.taskcategories_id=glpi_tickettasks.taskcategories_id
|
//throw new Exception(curl_error($ch), curl_errno($ch));
|
||||||
JOIN glpi_plugin_processmaker_cases ON glpi_plugin_processmaker_cases.processes_id=glpi_plugin_processmaker_taskcategories.processes_id
|
Toolbox::logDebug( curl_error($ch).":".curl_errno($ch) );
|
||||||
RIGHT JOIN glpi_plugin_processmaker_tasks ON glpi_plugin_processmaker_tasks.items_id=glpi_tickettasks.id AND glpi_plugin_processmaker_tasks.case_id=glpi_plugin_processmaker_cases.id
|
}
|
||||||
WHERE glpi_plugin_processmaker_taskcategories.pm_task_guid = '".$targetTask['targettask_guid']."' AND glpi_tickettasks.state = 1 AND glpi_tickettasks.tickets_id=".$tlink['tickets_id'];
|
|
||||||
foreach ($DB->request($query) as $case) {
|
curl_close ($ch);
|
||||||
// must be only one row
|
}
|
||||||
|
// }
|
||||||
$postdata['APP_UID'] = $case['id'];
|
} else {
|
||||||
$postdata['DEL_INDEX'] = $case['del_index'];
|
// TODO to review this part of code as it is no longer usable like this !!!
|
||||||
|
foreach (Ticket_Ticket::getLinkedTicketsTo( $parm->fields['tickets_id'] ) as $tlink) {
|
||||||
$cronaction = new PluginProcessmakerCrontaskaction;
|
if ($tlink['link'] == Ticket_Ticket::LINK_TO) {
|
||||||
$cronaction->add( [ 'plugin_processmaker_caselinks_id' => $targetTask['id'],
|
$query = "SELECT glpi_plugin_processmaker_cases.id, MAX(glpi_plugin_processmaker_tasks.del_index) AS del_index FROM glpi_tickettasks
|
||||||
'plugin_processmaker_cases_id' => $locCase->getID(),
|
JOIN glpi_plugin_processmaker_taskcategories ON glpi_plugin_processmaker_taskcategories.taskcategories_id=glpi_tickettasks.taskcategories_id
|
||||||
//'itemtype' => $itemtype,
|
JOIN glpi_plugin_processmaker_cases ON glpi_plugin_processmaker_cases.processes_id=glpi_plugin_processmaker_taskcategories.processes_id
|
||||||
//'items_id' => $parm->fields['tickets_id'],
|
RIGHT JOIN glpi_plugin_processmaker_tasks ON glpi_plugin_processmaker_tasks.items_id=glpi_tickettasks.id AND glpi_plugin_processmaker_tasks.case_id=glpi_plugin_processmaker_cases.id
|
||||||
'users_id' => Session::getLoginUserID(),
|
WHERE glpi_plugin_processmaker_taskcategories.pm_task_guid = '".$targetTask['targettask_guid']."' AND glpi_tickettasks.state = 1 AND glpi_tickettasks.tickets_id=".$tlink['tickets_id'];
|
||||||
'is_targettoclaim' => $targetTask['is_targettoclaim'],
|
foreach ($DB->request($query) as $case) {
|
||||||
'state' => ($targetTask['is_externaldata'] ? PluginProcessmakerCrontaskaction::WAITING_DATA : PluginProcessmakerCrontaskaction::DATA_READY),
|
// must be only one row
|
||||||
'postdata' => json_encode( $postdata, JSON_HEX_APOS | JSON_HEX_QUOT),
|
|
||||||
'logs_out' => json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT)
|
$postdata['APP_UID'] = $case['id'];
|
||||||
],
|
$postdata['DEL_INDEX'] = $case['del_index'];
|
||||||
null,
|
|
||||||
false);
|
$cronaction = new PluginProcessmakerCrontaskaction;
|
||||||
}
|
$cronaction->add( [ 'plugin_processmaker_caselinks_id' => $targetTask['id'],
|
||||||
}
|
'plugin_processmaker_cases_id' => $locCase->getID(),
|
||||||
}
|
//'itemtype' => $itemtype,
|
||||||
}
|
//'items_id' => $parm->fields['tickets_id'],
|
||||||
|
'users_id' => Session::getLoginUserID(),
|
||||||
if ($targetTask['is_synchronous']) {
|
'is_targettoclaim' => $targetTask['is_targettoclaim'],
|
||||||
// must call PluginProcessmakerProcessmaker::cronPMTaskActions()
|
'state' => ($targetTask['is_externaldata'] ? PluginProcessmakerCrontaskaction::WAITING_DATA : PluginProcessmakerCrontaskaction::DATA_READY),
|
||||||
PluginProcessmakerProcessmaker::cronPMTaskActions();
|
'postdata' => json_encode( $postdata, JSON_HEX_APOS | JSON_HEX_QUOT),
|
||||||
}
|
'logs_out' => json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT)
|
||||||
}
|
],
|
||||||
|
null,
|
||||||
}
|
false);
|
||||||
|
}
|
||||||
//$msg .= "================\n";
|
}
|
||||||
//Toolbox::logInFile("processmaker", $msg);
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
}
|
if ($targetTask['is_synchronous']) {
|
||||||
|
// must call PluginProcessmakerProcessmaker::cronPMTaskActions()
|
||||||
|
PluginProcessmakerProcessmaker::cronPMTaskActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//$msg .= "================\n";
|
||||||
|
//Toolbox::logInFile("processmaker", $msg);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
3272
inc/case.class.php
3272
inc/case.class.php
File diff suppressed because it is too large
Load Diff
@@ -1,392 +1,383 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PluginProcessmakerConfig extends CommonDBTM {
|
class PluginProcessmakerConfig extends CommonDBTM {
|
||||||
|
|
||||||
static $rightname = '';
|
static $rightname = '';
|
||||||
|
|
||||||
static private $_instance = null;
|
static private $_instance = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of canCreate
|
* Summary of canCreate
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
static function canCreate() {
|
static function canCreate() {
|
||||||
return Session::haveRight('config', UPDATE);
|
return Session::haveRight('config', UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of canView
|
* Summary of canView
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
static function canView() {
|
static function canView() {
|
||||||
return Session::haveRight('config', READ);
|
return Session::haveRight('config', READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of canUpdate
|
* Summary of canUpdate
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
static function canUpdate() {
|
static function canUpdate() {
|
||||||
return Session::haveRight('config', UPDATE);
|
return Session::haveRight('config', UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of getTypeName
|
* Summary of getTypeName
|
||||||
* @param mixed $nb plural
|
* @param mixed $nb plural
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
static function getTypeName($nb = 0) {
|
static function getTypeName($nb = 0) {
|
||||||
return __('ProcessMaker setup', 'processmaker');
|
return __('ProcessMaker setup', 'processmaker');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of getName
|
* Summary of getName
|
||||||
* @param mixed $with_comment with comment
|
* @param mixed $with_comment with comment
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function getName($with_comment = 0) {
|
function getName($with_comment = 0) {
|
||||||
return __('ProcessMaker', 'processmaker');
|
return __('ProcessMaker', 'processmaker');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of getInstance
|
* Summary of getInstance
|
||||||
* @return PluginProcessmakerConfig
|
* @return PluginProcessmakerConfig
|
||||||
*/
|
*/
|
||||||
static function getInstance() {
|
static function getInstance() {
|
||||||
|
|
||||||
if (!isset(self::$_instance)) {
|
if (!isset(self::$_instance)) {
|
||||||
self::$_instance = new self();
|
self::$_instance = new self();
|
||||||
if (!self::$_instance->getFromDB(1)) {
|
if (!self::$_instance->getFromDB(1)) {
|
||||||
self::$_instance->getEmpty();
|
self::$_instance->getEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return self::$_instance;
|
return self::$_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare input datas for updating the item
|
* Prepare input datas for updating the item
|
||||||
* @param array $input used to update the item
|
* @param array $input used to update the item
|
||||||
* @return array the modified $input array
|
* @return array the modified $input array
|
||||||
**/
|
**/
|
||||||
function prepareInputForUpdate($input) {
|
function prepareInputForUpdate($input) {
|
||||||
global $CFG_GLPI;
|
global $CFG_GLPI;
|
||||||
|
|
||||||
if (!isset($input["maintenance"])) {
|
if (!isset($input["maintenance"])) {
|
||||||
$input["maintenance"] = 0;
|
$input["maintenance"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($input["pm_dbserver_passwd"])) {
|
if (isset($input["pm_dbserver_passwd"])) {
|
||||||
if (empty($input["pm_dbserver_passwd"])) {
|
if (empty($input["pm_dbserver_passwd"])) {
|
||||||
unset($input["pm_dbserver_passwd"]);
|
unset($input["pm_dbserver_passwd"]);
|
||||||
} else {
|
} else {
|
||||||
$input["pm_dbserver_passwd"] = Toolbox::encrypt(stripslashes($input["pm_dbserver_passwd"]), GLPIKEY);
|
$input["pm_dbserver_passwd"] = Toolbox::sodiumEncrypt(stripslashes($input["pm_dbserver_passwd"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($input["_blank_pm_dbserver_passwd"]) && $input["_blank_pm_dbserver_passwd"]) {
|
if (isset($input["_blank_pm_dbserver_passwd"]) && $input["_blank_pm_dbserver_passwd"]) {
|
||||||
$input['pm_dbserver_passwd'] = '';
|
$input['pm_dbserver_passwd'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($input["pm_admin_passwd"])) {
|
if (isset($input["pm_admin_passwd"])) {
|
||||||
if (empty($input["pm_admin_passwd"])) {
|
if (empty($input["pm_admin_passwd"])) {
|
||||||
unset($input["pm_admin_passwd"]);
|
unset($input["pm_admin_passwd"]);
|
||||||
} else {
|
} else {
|
||||||
$input["pm_admin_passwd"] = Toolbox::encrypt(stripslashes($input["pm_admin_passwd"]), GLPIKEY);
|
$input["pm_admin_passwd"] = Toolbox::sodiumEncrypt(stripslashes($input["pm_admin_passwd"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($input["_blank_pm_admin_passwd"]) && $input["_blank_pm_admin_passwd"]) {
|
if (isset($input["_blank_pm_admin_passwd"]) && $input["_blank_pm_admin_passwd"]) {
|
||||||
$input['pm_admin_passwd'] = '';
|
$input['pm_admin_passwd'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($input['pm_server_URL'])) {
|
if (isset($input['pm_server_URL'])) {
|
||||||
$input['domain'] = self::getCommonDomain( $CFG_GLPI['url_base'], $input['pm_server_URL'] );
|
$input['domain'] = self::getCommonDomain( $CFG_GLPI['url_base'], $input['pm_server_URL'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $input;
|
return $input;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of getCommonDomain
|
* Summary of getCommonDomain
|
||||||
* @param mixed $url1 first url
|
* @param mixed $url1 first url
|
||||||
* @param mixed $url2 second url
|
* @param mixed $url2 second url
|
||||||
* @return string the common domain part of the given urls
|
* @return string the common domain part of the given urls
|
||||||
*/
|
*/
|
||||||
static function getCommonDomain($url1, $url2) {
|
static function getCommonDomain($url1, $url2) {
|
||||||
$domain = '';
|
$domain = '';
|
||||||
try {
|
try {
|
||||||
$glpi = explode(".", parse_url($url1, PHP_URL_HOST));
|
$glpi = explode(".", parse_url($url1, PHP_URL_HOST));
|
||||||
$pm = explode( ".", parse_url($url2, PHP_URL_HOST));
|
$pm = explode( ".", parse_url($url2, PHP_URL_HOST));
|
||||||
$cglpi = array_pop( $glpi );
|
$cglpi = array_pop( $glpi );
|
||||||
$cpm = array_pop( $pm );
|
$cpm = array_pop( $pm );
|
||||||
while ($cglpi && $cpm && $cglpi == $cpm) {
|
while ($cglpi && $cpm && $cglpi == $cpm) {
|
||||||
$domain = $cglpi.($domain==''?'':'.'.$domain);
|
$domain = $cglpi.($domain==''?'':'.'.$domain);
|
||||||
$cglpi = array_pop( $glpi );
|
$cglpi = array_pop( $glpi );
|
||||||
$cpm = array_pop( $pm );
|
$cpm = array_pop( $pm );
|
||||||
}
|
}
|
||||||
if ($domain != '') {
|
if ($domain != '') {
|
||||||
return $domain;
|
return $domain;
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$domain = '';
|
$domain = '';
|
||||||
}
|
}
|
||||||
return $domain;
|
return $domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of showConfigForm
|
* Summary of showConfigForm
|
||||||
* @param mixed $item is the config
|
* @param mixed $item is the config
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
static function showConfigForm($item) {
|
static function showConfigForm($item) {
|
||||||
global $PM_DB, $CFG_GLPI, $PM_SOAP;
|
global $PM_DB, $CFG_GLPI, $PM_SOAP;
|
||||||
|
|
||||||
$setup_ok = false;
|
$setup_ok = false;
|
||||||
|
|
||||||
$ui_theme = [
|
$ui_theme = [
|
||||||
'glpi_classic' => 'glpi_classic',
|
'glpi_classic' => 'glpi_classic',
|
||||||
'glpi_neoclassic' => 'glpi_neoclassic'
|
'glpi_neoclassic' => 'glpi_neoclassic'
|
||||||
];
|
];
|
||||||
|
|
||||||
$config = $PM_SOAP->config;
|
$config = $PM_SOAP->config;
|
||||||
$config->showFormHeader(['colspan' => 4]);
|
$config->showFormHeader(['colspan' => 2]);
|
||||||
|
|
||||||
if (!$config->fields['maintenance']) {
|
if (!$config->fields['maintenance']) {
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Server URL (must be in same domain than GLPI, if GLPI is using HTTPS, PM server must also use HTTPS)', 'processmaker')."</td><td >";
|
echo "<td >".__('Server URL (must be in same domain than GLPI, if GLPI is using HTTPS, PM server must also use HTTPS)', 'processmaker')."</td><td >";
|
||||||
echo "<input size='50' type='text' name='pm_server_URL' value='".$config->fields['pm_server_URL']."'>";
|
echo "<input size='50' type='text' name='pm_server_URL' value='".$config->fields['pm_server_URL']."'>";
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td>".__('Common domain with GLPI', 'processmaker')."</td>";
|
echo "<td>".__('Common domain with GLPI', 'processmaker')."</td>";
|
||||||
echo "<td><font color='red'><div name='domain'>".$config->fields['domain']."</div></font>";
|
echo "<td><font color='red'><div name='domain'>".$config->fields['domain']."</div></font>";
|
||||||
|
|
||||||
echo Html::scriptBlock("
|
echo Html::scriptBlock("
|
||||||
function setCommonDomain() {
|
function setCommonDomain() {
|
||||||
|
|
||||||
function parseUrl( url ) {
|
function parseUrl( url ) {
|
||||||
var a = document.createElement('a');
|
var a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
// debugger;
|
//debugger;
|
||||||
return { host: a.hostname, port: a.port, scheme: a.protocol.slice(0, -1), path: a.pathname, query: a.search.slice(1), fragment: a.hash.slice(1) } ;
|
return { host: a.hostname, port: a.port, scheme: a.protocol.slice(0, -1), path: a.pathname, query: a.search.slice(1), fragment: a.hash.slice(1) } ;
|
||||||
}
|
}
|
||||||
var domain = '';
|
var domain = '';
|
||||||
try {
|
try {
|
||||||
var glpi = parseUrl( '".$CFG_GLPI['url_base']."' ).host.split('.') ;
|
var glpi = parseUrl( '".$CFG_GLPI['url_base']."' ).host.split('.') ;
|
||||||
var pm = parseUrl( $('input[name=pm_server_URL]').val()).host.split('.');
|
var pm = parseUrl( $('input[name=pm_server_URL]').val()).host.split('.');
|
||||||
var cglpi = glpi.pop() ;
|
var cglpi = glpi.pop() ;
|
||||||
var cpm = pm.pop() ;
|
var cpm = pm.pop() ;
|
||||||
while( cglpi && cpm && cglpi == cpm ) {
|
while( cglpi && cpm && cglpi == cpm ) {
|
||||||
domain = cglpi + (domain==''?'':'.' + domain) ;
|
domain = cglpi + (domain==''?'':'.' + domain) ;
|
||||||
cglpi = glpi.pop() ;
|
cglpi = glpi.pop() ;
|
||||||
cpm = pm.pop() ;
|
cpm = pm.pop() ;
|
||||||
}
|
}
|
||||||
if (domain != '' && domain.split('.').length > 1) { // common domain must be at least 'domain.com' and not 'com', otherwise some browser will not accept the CORS javascript
|
if (domain != '' && domain.split('.').length > 1) { // common domain must be at least 'domain.com' and not 'com', otherwise some browser will not accept the CORS javascript
|
||||||
$('div[name=domain]').text(domain) ;
|
$('div[name=domain]').text(domain) ;
|
||||||
$('div[name=domain]').parent().attr('color', 'green');
|
$('div[name=domain]').parent().attr('color', 'green');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch(ex) {}
|
} catch(ex) {}
|
||||||
$('div[name=domain]').text('".__('None!', 'processmaker')."') ;
|
$('div[name=domain]').text('".__('None!', 'processmaker')."') ;
|
||||||
$('div[name=domain]').parent().attr('color', 'red');
|
$('div[name=domain]').parent().attr('color', 'red');
|
||||||
};
|
};
|
||||||
$('input[name=pm_server_URL]').on('keyup', setCommonDomain ) ;
|
$('input[name=pm_server_URL]').on('keyup', setCommonDomain ) ;
|
||||||
setCommonDomain() ;
|
setCommonDomain() ;
|
||||||
");
|
");
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Verify SSL certificate', 'processmaker')."</td><td >";
|
echo "<td >".__('Verify SSL certificate', 'processmaker')."</td><td >";
|
||||||
Dropdown::showYesNo("ssl_verify", $config->fields['ssl_verify']);
|
Dropdown::showYesNo("ssl_verify", $config->fields['ssl_verify']);
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Workspace Name', 'processmaker')."</td><td >";
|
echo "<td >".__('Workspace Name', 'processmaker')."</td><td >";
|
||||||
echo "<input type='text' name='pm_workspace' value='".$config->fields['pm_workspace']."'>";
|
echo "<input type='text' name='pm_workspace' value='".$config->fields['pm_workspace']."'>";
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Server administrator name', 'processmaker')."</td>";
|
echo "<td >".__('Server administrator name', 'processmaker')."</td>";
|
||||||
echo "<td ><input type='text' name='pm_admin_user' value='".$config->fields["pm_admin_user"]."'>";
|
echo "<td ><input type='text' name='pm_admin_user' value='".$config->fields["pm_admin_user"]."'>";
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Server administrator password', 'processmaker')."</td>";
|
echo "<td >".__('Server administrator password', 'processmaker')."</td>";
|
||||||
echo "<td ><input type='password' name='pm_admin_passwd' value='' autocomplete='off'>";
|
echo "<td ><input type='password' name='pm_admin_passwd' value='' autocomplete='off'>";
|
||||||
echo " <input type='checkbox' name='_blank_pm_admin_passwd'> ".__('Clear');
|
echo " <input type='checkbox' name='_blank_pm_admin_passwd'> ".__('Clear');
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Connection status', 'processmaker')."</td><td >";
|
echo "<td >".__('Connection status', 'processmaker')."</td><td >";
|
||||||
//$pm = new PluginProcessmakerProcessmaker;
|
//$pm = new PluginProcessmakerProcessmaker;
|
||||||
|
|
||||||
if ($config->fields['pm_server_URL'] != ''
|
if ($config->fields['pm_server_URL'] != ''
|
||||||
&& $config->fields['pm_workspace'] != ''
|
&& $config->fields['pm_workspace'] != ''
|
||||||
&& $config->fields["pm_admin_user"] != ''
|
&& $config->fields["pm_admin_user"] != ''
|
||||||
// && ($pm->login(true))) {
|
&& ($PM_SOAP->login(true))) {
|
||||||
&& ($PM_SOAP->login(true))) {
|
echo "<font color='green'>".__('Test successful');
|
||||||
echo "<font color='green'>".__('Test successful');
|
$setup_ok = true;
|
||||||
$setup_ok = true;
|
} else {
|
||||||
} else {
|
// echo "<font color='red'>".__('Test failed')."<br>".print_r($pm->lasterror, true);
|
||||||
// echo "<font color='red'>".__('Test failed')."<br>".print_r($pm->lasterror, true);
|
echo "<font color='red'>".__('Test failed')."<br>".print_r($PM_SOAP->lasterror, true);
|
||||||
echo "<font color='red'>".__('Test failed')."<br>".print_r($PM_SOAP->lasterror, true);
|
}
|
||||||
}
|
echo "</font></span></td></tr>\n";
|
||||||
echo "</font></span></td></tr>\n";
|
|
||||||
|
echo "<tr><th colspan='2'>".__('SQL server setup', 'processmaker')."</th></tr>";
|
||||||
echo "<tr><td colspan='4' class='center b'>".__('SQL server setup', 'processmaker')."</td></tr>";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >" . __('SQL server (MariaDB or MySQL)', 'processmaker') . "</td>";
|
||||||
echo "<td >" . __('SQL server (MariaDB or MySQL)', 'processmaker') . "</td>";
|
echo "<td ><input type='text' size=50 name='pm_dbserver_name' value='".$config->fields["pm_dbserver_name"]."'>";
|
||||||
echo "<td ><input type='text' size=50 name='pm_dbserver_name' value='".$config->fields["pm_dbserver_name"]."'>";
|
echo "</td></tr>\n";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >" . __('Database name', 'processmaker') . "</td>";
|
||||||
echo "<td >" . __('Database name', 'processmaker') . "</td>";
|
echo "<td ><input type='text' size=50 name='pm_dbname' value='".$config->fields['pm_dbname']."'>";
|
||||||
echo "<td ><input type='text' size=50 name='pm_dbname' value='".$config->fields['pm_dbname']."'>";
|
echo "</td></tr>\n";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >" . __('SQL user', 'processmaker') . "</td>";
|
||||||
echo "<td >" . __('SQL user', 'processmaker') . "</td>";
|
echo "<td ><input type='text' name='pm_dbserver_user' value='".$config->fields["pm_dbserver_user"]."'>";
|
||||||
echo "<td ><input type='text' name='pm_dbserver_user' value='".$config->fields["pm_dbserver_user"]."'>";
|
echo "</td></tr>\n";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >" . __('SQL password', 'processmaker') . "</td>";
|
||||||
echo "<td >" . __('SQL password', 'processmaker') . "</td>";
|
echo "<td ><input type='password' name='pm_dbserver_passwd' value='' autocomplete='off'>";
|
||||||
echo "<td ><input type='password' name='pm_dbserver_passwd' value='' autocomplete='off'>";
|
echo " <input type='checkbox' name='_blank_pm_dbserver_passwd'> ".__('Clear');
|
||||||
echo " <input type='checkbox' name='_blank_pm_dbserver_passwd'> ".__('Clear');
|
echo "</td></tr>\n";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >".__('Connection status', 'processmaker')."</td><td >";
|
||||||
echo "<td >".__('Connection status', 'processmaker')."</td><td >";
|
if ($PM_DB->connected && isset($PM_DB->dbdefault) && $PM_DB->dbdefault != '') {
|
||||||
if ($PM_DB->connected && isset($PM_DB->dbdefault) && $PM_DB->dbdefault != '') {
|
echo "<font color='green'>".__('Test successful');
|
||||||
echo "<font color='green'>".__('Test successful');
|
} else {
|
||||||
} else {
|
echo "<font color='red'>".__('Test failed');
|
||||||
echo "<font color='red'>".__('Test failed');
|
}
|
||||||
}
|
echo "</font></span></td></tr>\n";
|
||||||
echo "</font></span></td></tr>\n";
|
|
||||||
|
echo "<tr><th colspan='2' >".__('Settings')."</th></tr>";
|
||||||
echo "<tr><td colspan='4' class='center b'>".__('Settings')."</td></tr>";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >".__('Theme Name', 'processmaker')."</td><td >";
|
||||||
echo "<td >".__('Theme Name', 'processmaker')."</td><td >";
|
Dropdown::showFromArray('pm_theme', $ui_theme,
|
||||||
Dropdown::showFromArray('pm_theme', $ui_theme,
|
['value' => $config->fields['pm_theme']]);
|
||||||
['value' => $config->fields['pm_theme']]);
|
echo "</td></tr>";
|
||||||
echo "</td></tr>";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >".__('Main Task Category (edit to change name)', 'processmaker')."</td><td >";
|
||||||
echo "<td >".__('Main Task Category (edit to change name)', 'processmaker')."</td><td >";
|
TaskCategory::dropdown(['name' => 'taskcategories_id',
|
||||||
TaskCategory::dropdown(['name' => 'taskcategories_id',
|
'display_emptychoice' => true,
|
||||||
'display_emptychoice' => true,
|
'value' => $config->fields['taskcategories_id']]);
|
||||||
'value' => $config->fields['taskcategories_id']]);
|
echo "</td></tr>\n";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >".__('Task writer (edit to change name)', 'processmaker')."</td><td >";
|
||||||
echo "<td >".__('Task Writer (edit to change name)', 'processmaker')."</td><td >";
|
$rand = mt_rand();
|
||||||
$rand = mt_rand();
|
User::dropdown(['name' => 'users_id',
|
||||||
User::dropdown(['name' => 'users_id',
|
'display_emptychoice' => true,
|
||||||
'display_emptychoice' => true,
|
'right' => 'all',
|
||||||
'right' => 'all',
|
'rand' => $rand,
|
||||||
'rand' => $rand,
|
'value' => $config->fields['users_id']]);
|
||||||
'value' => $config->fields['users_id']]);
|
|
||||||
|
// this code adds the + sign to the form
|
||||||
// this code adds the + sign to the form
|
echo "<img alt='' title=\"".__s('Add')."\" src='".$CFG_GLPI["root_doc"].
|
||||||
echo "<img alt='' title=\"".__s('Add')."\" src='".$CFG_GLPI["root_doc"].
|
"/pics/add_dropdown.png' style='cursor:pointer; margin-left:2px;'
|
||||||
"/pics/add_dropdown.png' style='cursor:pointer; margin-left:2px;'
|
onClick=\"".Html::jsGetElementbyID('add_dropdown'.$rand).".dialog('open');\">";
|
||||||
onClick=\"".Html::jsGetElementbyID('add_dropdown'.$rand).".dialog('open');\">";
|
echo Ajax::createIframeModalWindow('add_dropdown'.$rand,
|
||||||
echo Ajax::createIframeModalWindow('add_dropdown'.$rand,
|
User::getFormURL(),
|
||||||
User::getFormURL(),
|
['display' => false]);
|
||||||
['display' => false]);
|
// end of + sign
|
||||||
// end of + sign
|
|
||||||
|
echo "</td></tr>\n";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<td >".__('Group in ProcessMaker which will contain all GLPI users', 'processmaker')."</td><td >";
|
||||||
echo "<td >".__('Group in ProcessMaker which will contain all GLPI users', 'processmaker')."</td><td >";
|
|
||||||
|
$pmGroups = [ 0 => Dropdown::EMPTY_VALUE ];
|
||||||
$pmGroups = [ 0 => Dropdown::EMPTY_VALUE ];
|
if ($PM_DB->connected) {
|
||||||
//$res = $PM_DB->request([
|
$res = $PM_DB->request([
|
||||||
// 'SELECT DISTINCT' => 'CON_ID',
|
'DISTINCT' => 'CON_ID',
|
||||||
// 'FIELDS' => 'CON_VALUE',
|
'FIELDS' => ['CON_ID', 'CON_VALUE'],
|
||||||
// 'FROM' => 'CONTENT',
|
'FROM' => 'CONTENT',
|
||||||
// 'WHERE' => ['CON_CATEGORY' => 'GRP_TITLE'],
|
'WHERE' => ['CON_CATEGORY' => 'GRP_TITLE'],
|
||||||
// 'ORDER' => 'CON_VALUE'
|
'ORDER' => 'CON_VALUE'
|
||||||
// ]);
|
]);
|
||||||
//$query = "SELECT DISTINCT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='GRP_TITLE' ORDER BY CON_VALUE;";
|
foreach ($res as $row) {
|
||||||
if ($PM_DB->connected) {
|
$pmGroups[ $row['CON_ID'] ] = $row['CON_VALUE'];
|
||||||
$res = $PM_DB->request([
|
}
|
||||||
'SELECT DISTINCT' => 'CON_ID',
|
Dropdown::showFromArray('pm_group_guid', $pmGroups, ['value' => $config->fields['pm_group_guid']]);
|
||||||
'FIELDS' => 'CON_VALUE',
|
} else {
|
||||||
'FROM' => 'CONTENT',
|
echo "<font color='red'>".__('Not connected');
|
||||||
'WHERE' => ['CON_CATEGORY' => 'GRP_TITLE'],
|
}
|
||||||
'ORDER' => 'CON_VALUE'
|
echo "</td></tr>\n";
|
||||||
]);
|
|
||||||
foreach ($res as $row) {
|
echo "<tr class='tab_bg_1'>";
|
||||||
$pmGroups[ $row['CON_ID'] ] = $row['CON_VALUE'];
|
echo "<td >" . __('Max cases per item (0=unlimited)', 'processmaker') . "</td>";
|
||||||
}
|
echo "<td ><input type='text' name='max_cases_per_item' value='".$config->fields["max_cases_per_item"]."'>";
|
||||||
Dropdown::showFromArray( 'pm_group_guid', $pmGroups, ['value' => $config->fields['pm_group_guid']] );
|
echo "</td></tr>\n";
|
||||||
} else {
|
|
||||||
echo "<font color='red'>".__('Not connected');
|
} else {
|
||||||
}
|
echo "<tr><td colspan='2' class='center b'>";
|
||||||
echo "</td></tr>\n";
|
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
||||||
|
echo "</td></tr>";
|
||||||
echo "<tr class='tab_bg_1'>";
|
}
|
||||||
echo "<td >" . __('Max cases per item (0=unlimited)', 'processmaker') . "</td>";
|
|
||||||
echo "<td ><input type='text' name='max_cases_per_item' value='".$config->fields["max_cases_per_item"]."'>";
|
echo "<tr><th colspan='2'>".__('Maintenance')."</th></tr>";
|
||||||
echo "</td></tr>\n";
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
} else {
|
echo "<td >".__('Maintenance mode')."</td><td >";
|
||||||
echo "<tr><td colspan='4' class='center b'>";
|
Dropdown::showYesNo("maintenance", $config->fields['maintenance']);
|
||||||
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
echo "</td></tr>";
|
||||||
echo "</td></tr>";
|
|
||||||
}
|
echo "<tr><td colspan='2'></td></tr>";
|
||||||
|
|
||||||
echo "<tr><td colspan='4' class='center b'>".__('Maintenance')."</td></tr>";
|
echo "<tr><th colspan='2'>".__('ProcessMaker system information', 'processmaker')."</th></tr>";
|
||||||
|
if ($setup_ok) {
|
||||||
echo "<tr class='tab_bg_1'>";
|
$info = $PM_SOAP->systemInformation( );
|
||||||
echo "<td >".__('Maintenance mode')."</td><td >";
|
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.$info->version.'</td></tr>';
|
||||||
Dropdown::showYesNo("maintenance", $config->fields['maintenance']);
|
echo '<tr><td>'.__('Web server', 'processmaker').'</td><td>'.$info->webServer.'</td></tr>';
|
||||||
echo "</td></tr>";
|
echo '<tr><td>'.__('Server name', 'processmaker').'</td><td>'.$info->serverName.'</td></tr>';
|
||||||
|
echo '<tr><td>'.__('PHP version', 'processmaker').'</td><td>'.$info->phpVersion.'</td></tr>';
|
||||||
echo "<tr><td colspan='4'></td></tr>";
|
echo '<tr><td>'.__('DB version', 'processmaker').'</td><td>'.$info->databaseVersion.'</td></tr>';
|
||||||
|
echo '<tr><td>'.__('DB server IP', 'processmaker').'</td><td>'.$info->databaseServerIp.'</td></tr>';
|
||||||
echo "<tr><th colspan='4'>".__('Processmaker system information', 'processmaker')."</th></tr>";
|
echo '<tr><td>'.__('DB name', 'processmaker').'</td><td>'.$info->databaseName.'</td></tr>';
|
||||||
if ($setup_ok) {
|
echo '<tr><td>'.__('User browser', 'processmaker').'</td><td>'.$info->userBrowser.'</td></tr>';
|
||||||
$info = $PM_SOAP->systemInformation( );
|
echo '<tr><td>'.__('User IP', 'processmaker').'</td><td>'.$info->userIp.'</td></tr>';
|
||||||
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.$info->version.'</td></tr>';
|
} else {
|
||||||
echo '<tr><td>'.__('Web server', 'processmaker').'</td><td>'.$info->webServer.'</td></tr>';
|
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.__('Not yet!', 'processmaker').'</td></tr>';
|
||||||
echo '<tr><td>'.__('Server name', 'processmaker').'</td><td>'.$info->serverName.'</td></tr>';
|
}
|
||||||
echo '<tr><td>'.__('PHP version', 'processmaker').'</td><td>'.$info->phpVersion.'</td></tr>';
|
$config->showFormButtons(['candel' => false, 'colspan' => 1]);
|
||||||
echo '<tr><td>'.__('DB version', 'processmaker').'</td><td>'.$info->databaseVersion.'</td></tr>';
|
|
||||||
echo '<tr><td>'.__('DB server IP', 'processmaker').'</td><td>'.$info->databaseServerIp.'</td></tr>';
|
return false;
|
||||||
echo '<tr><td>'.__('DB name', 'processmaker').'</td><td>'.$info->databaseName.'</td></tr>';
|
}
|
||||||
echo '<tr><td>'.__('User browser', 'processmaker').'</td><td>'.$info->userBrowser.'</td></tr>';
|
|
||||||
echo '<tr><td>'.__('User IP', 'processmaker').'</td><td>'.$info->userIp.'</td></tr>';
|
|
||||||
} else {
|
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
||||||
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.__('Not yet!', 'processmaker').'</td></tr>';
|
if ($item->getType()=='Config') {
|
||||||
}
|
return __('ProcessMaker', 'processmaker');
|
||||||
$config->showFormButtons(['candel' => false]);
|
}
|
||||||
|
return '';
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||||
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
|
||||||
if ($item->getType()=='Config') {
|
if ($item->getType()=='Config') {
|
||||||
return __('ProcessMaker', 'processmaker');
|
self::showConfigForm($item);
|
||||||
}
|
}
|
||||||
return '';
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
|
||||||
|
|
||||||
if ($item->getType()=='Config') {
|
|
||||||
self::showConfigForm($item);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class PluginProcessmakerDB extends DBmysql {
|
class PluginProcessmakerDB extends DBmysql {
|
||||||
|
|
||||||
var $dbhost;
|
var $dbhost;
|
||||||
|
|
||||||
var $dbuser;
|
var $dbuser;
|
||||||
|
|
||||||
var $dbpassword;
|
var $dbpassword;
|
||||||
|
|
||||||
var $dbdefault;
|
var $dbdefault;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$config = PluginProcessmakerConfig::getInstance();
|
$config = PluginProcessmakerConfig::getInstance();
|
||||||
if ($config->fields['pm_dbserver_name'] != ''
|
if ($config->fields['pm_dbserver_name'] != ''
|
||||||
&& $config->fields['pm_dbserver_user'] != ''
|
&& $config->fields['pm_dbserver_user'] != ''
|
||||||
&& $config->fields['pm_workspace'] != '' ) {
|
&& $config->fields['pm_workspace'] != '' ) {
|
||||||
$this->dbhost = $config->fields['pm_dbserver_name'];
|
$this->dbhost = $config->fields['pm_dbserver_name'];
|
||||||
$this->dbuser = $config->fields['pm_dbserver_user'];
|
$this->dbuser = $config->fields['pm_dbserver_user'];
|
||||||
$this->dbpassword = Toolbox::decrypt($config->fields['pm_dbserver_passwd'], GLPIKEY);
|
$this->dbpassword = Toolbox::sodiumDecrypt($config->fields['pm_dbserver_passwd']);
|
||||||
$this->dbdefault = isset($config->fields['pm_dbname']) ? $config->fields['pm_dbname'] : '';
|
$this->dbdefault = isset($config->fields['pm_dbname']) ? $config->fields['pm_dbname'] : '';
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
48
inc/glpikey.class.php
Normal file
48
inc/glpikey.class.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PluginProcessmakerGlpikey short summary.
|
||||||
|
*
|
||||||
|
* PluginProcessmakerGlpikey description.
|
||||||
|
*
|
||||||
|
* @version 1.0
|
||||||
|
* @author MoronO
|
||||||
|
*/
|
||||||
|
class PluginProcessmakerGlpikey extends GLPIKey {
|
||||||
|
|
||||||
|
protected $fields = [
|
||||||
|
'glpi_plugin_processmaker_configs.pm_admin_passwd',
|
||||||
|
'glpi_plugin_processmaker_configs.pm_dbserver_passwd',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fields
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getFields() :array {
|
||||||
|
return $this->fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate GLPI security key used for decryptable passwords
|
||||||
|
* and update values in DB if necessary.
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function migratePasswords() {
|
||||||
|
global $DB;
|
||||||
|
|
||||||
|
// Fetch old key and migrate
|
||||||
|
$sodium_key = null;
|
||||||
|
$old_key = $this->getLegacyKey();
|
||||||
|
|
||||||
|
if ($DB instanceof DBmysql) {
|
||||||
|
return $this->migrateFieldsInDb($sodium_key, $old_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,58 +1,59 @@
|
|||||||
<?php
|
<?php
|
||||||
class PluginProcessmakerMenu extends CommonGLPI {
|
class PluginProcessmakerMenu extends CommonGLPI {
|
||||||
static $rightname = 'plugin_processmaker_config';
|
static $rightname = 'plugin_processmaker_config';
|
||||||
|
|
||||||
static function getMenuName() {
|
static function getMenuName() {
|
||||||
return 'ProcessMaker';
|
return 'ProcessMaker';
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getMenuContent() {
|
static function getMenuContent() {
|
||||||
|
|
||||||
if (!Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
if (!Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
||||||
return;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$front_page = "/plugins/processmaker/front";
|
$front_page = "/plugins/processmaker/front";
|
||||||
$menu = [];
|
$menu = [];
|
||||||
$menu['title'] = self::getMenuName();
|
$menu['title'] = self::getMenuName();
|
||||||
$menu['page'] = "$front_page/process.php";
|
$menu['page'] = "$front_page/process.php";
|
||||||
$menu['links']['search'] = PluginProcessmakerProcess::getSearchURL(false);
|
$menu['links']['search'] = PluginProcessmakerProcess::getSearchURL(false);
|
||||||
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
||||||
$menu['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
$menu['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
||||||
}
|
}
|
||||||
|
$menu['icon'] = "'></i><img src=\"/plugins/processmaker/pics/processmaker-xxs.png\" style=\"vertical-align: middle;\"/><i class='";
|
||||||
$itemtypes = ['PluginProcessmakerProcess' => 'processes',
|
|
||||||
'PluginProcessmakerCaselink' => 'caselinks'
|
$itemtypes = ['PluginProcessmakerProcess' => 'processes',
|
||||||
];
|
'PluginProcessmakerCaselink' => 'caselinks'
|
||||||
|
];
|
||||||
foreach ($itemtypes as $itemtype => $option) {
|
|
||||||
$menu['options'][$option]['title'] = $itemtype::getTypeName(Session::getPluralNumber());
|
foreach ($itemtypes as $itemtype => $option) {
|
||||||
$menu['options'][$option]['page'] = $itemtype::getSearchURL(false);
|
$menu['options'][$option]['title'] = $itemtype::getTypeName(Session::getPluralNumber());
|
||||||
$menu['options'][$option]['links']['search'] = $itemtype::getSearchURL(false);
|
$menu['options'][$option]['page'] = $itemtype::getSearchURL(false);
|
||||||
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
$menu['options'][$option]['links']['search'] = $itemtype::getSearchURL(false);
|
||||||
$menu['options'][$option]['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
||||||
}
|
$menu['options'][$option]['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
||||||
switch ($itemtype) {
|
}
|
||||||
case 'PluginProcessmakerProcess':
|
switch ($itemtype) {
|
||||||
|
case 'PluginProcessmakerProcess':
|
||||||
//if ($itemtype::canCreate()) {
|
|
||||||
// $menu['options'][$option]['links']['add'] = $itemtype::getFormURL(false);
|
//if ($itemtype::canCreate()) {
|
||||||
//}
|
// $menu['options'][$option]['links']['add'] = $itemtype::getFormURL(false);
|
||||||
break;
|
//}
|
||||||
case 'PluginProcessmakerCaselink':
|
break;
|
||||||
if (Session::haveRight("plugin_processmaker_config", UPDATE)) {
|
case 'PluginProcessmakerCaselink':
|
||||||
$menu['options'][$option]['links']['add'] = $itemtype::getFormURL(false);
|
if (Session::haveRight("plugin_processmaker_config", UPDATE)) {
|
||||||
}
|
$menu['options'][$option]['links']['add'] = $itemtype::getFormURL(false);
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
default :
|
|
||||||
$menu['options'][$option]['page'] = PluginProcessmakerProcess::getSearchURL(false);
|
default :
|
||||||
break;
|
$menu['options'][$option]['page'] = PluginProcessmakerProcess::getSearchURL(false);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
}
|
|
||||||
return $menu;
|
}
|
||||||
}
|
return $menu;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,219 +1,204 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* process_profile short summary.
|
* process_profile short summary.
|
||||||
*
|
*
|
||||||
* process_profile description.
|
* process_profile description.
|
||||||
*
|
*
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @author MoronO
|
* @author MoronO
|
||||||
*/
|
*/
|
||||||
class PluginProcessmakerProcess_Profile extends CommonDBTM
|
class PluginProcessmakerProcess_Profile extends CommonDBTM
|
||||||
{
|
{
|
||||||
|
|
||||||
static $rightname = '';
|
static $rightname = '';
|
||||||
|
|
||||||
function can($ID, $right, array &$input = null) {
|
function can($ID, $right, array &$input = null) {
|
||||||
switch ($right) {
|
switch ($right) {
|
||||||
case DELETE :
|
case DELETE :
|
||||||
case PURGE :
|
case PURGE :
|
||||||
return (Session::haveRight('plugin_processmaker_config', UPDATE));
|
return (Session::haveRight('plugin_processmaker_config', UPDATE));
|
||||||
}
|
}
|
||||||
return Session::haveRight('plugin_processmaker_config', $right);
|
return Session::haveRight('plugin_processmaker_config', $right);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
||||||
return __('Authorizations', 'processmaker');
|
return __('Authorizations', 'processmaker');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||||
|
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
$ID = $item->getField('id');
|
$ID = $item->getField('id');
|
||||||
|
|
||||||
$canshowentity = Session::haveRight("entity", READ);
|
$canshowentity = Session::haveRight("entity", READ);
|
||||||
$canedit = Session::haveRight('plugin_processmaker_config', UPDATE);
|
$canedit = Session::haveRight('plugin_processmaker_config', UPDATE);
|
||||||
|
|
||||||
$rand=mt_rand();
|
$rand=mt_rand();
|
||||||
|
|
||||||
if ($canedit) {
|
if ($canedit) {
|
||||||
echo "<div class='firstbloc'>";
|
echo "<div class='firstbloc'>";
|
||||||
echo "<form name='entityprocess_form$rand' id='entityprocess_form$rand' method='post' action='";
|
echo "<form name='entityprocess_form$rand' id='entityprocess_form$rand' method='post' action='";
|
||||||
echo Toolbox::getItemTypeFormURL(__CLASS__)."'>";
|
echo Toolbox::getItemTypeFormURL(__CLASS__)."'>";
|
||||||
echo "<table class='tab_cadre_fixe'>";
|
echo "<table class='tab_cadre_fixe'>";
|
||||||
echo "<tr class='tab_bg_1'><th colspan='6'>".__('Authorizations', 'processmaker')."</tr>";
|
echo "<tr class='tab_bg_1'><th colspan='6'>".__('Authorizations', 'processmaker')."</tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_2'><td class='center'>";
|
echo "<tr class='tab_bg_2'><td class='center'>";
|
||||||
echo "<input type='hidden' name='plugin_processmaker_processes_id' value='$ID'>";
|
echo "<input type='hidden' name='plugin_processmaker_processes_id' value='$ID'>";
|
||||||
Entity::Dropdown( ['entity' => $_SESSION['glpiactiveentities']]);
|
Entity::Dropdown( ['entity' => $_SESSION['glpiactiveentities']]);
|
||||||
echo "</td><td class='center'>".Profile::getTypeName(1)."</td><td>";
|
echo "</td><td class='center'>".Profile::getTypeName(1)."</td><td>";
|
||||||
Profile::dropdownUnder(['value' => Profile::getDefault()]);
|
Profile::dropdownUnder(['value' => Profile::getDefault()]);
|
||||||
echo "</td><td class='center'>".__('Recursive')."</td><td>";
|
echo "</td><td class='center'>".__('Recursive')."</td><td>";
|
||||||
Dropdown::showYesNo("is_recursive", 0);
|
Dropdown::showYesNo("is_recursive", 0);
|
||||||
echo "</td><td class='center'>";
|
echo "</td><td class='center'>";
|
||||||
echo "<input type='submit' name='add' value=\""._sx('button', 'Add')."\" class='submit'>";
|
echo "<input type='submit' name='add' value=\""._sx('button', 'Add')."\" class='submit'>";
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
Html::closeForm();
|
Html::closeForm();
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
$res = $DB->request([
|
$res = $DB->request([
|
||||||
'SELECT DISTINCT' => 'gpp.id AS linkID',
|
'SELECT' => [
|
||||||
'FIELDS' => [
|
'gpp.id AS linkID',
|
||||||
'gpp.id AS linkID',
|
'glpi_profiles.id',
|
||||||
'glpi_profiles.id',
|
'glpi_profiles.name',
|
||||||
'glpi_profiles.name',
|
'gpp.is_recursive',
|
||||||
'gpp.is_recursive',
|
'glpi_entities.completename',
|
||||||
'glpi_entities.completename',
|
'gpp.entities_id'
|
||||||
'gpp.entities_id'
|
],
|
||||||
],
|
'DISTINCT' => true,
|
||||||
'FROM' => self::getTable() .' AS gpp',
|
'FROM' => self::getTable() .' AS gpp',
|
||||||
'LEFT JOIN' => [
|
'LEFT JOIN' => [
|
||||||
'glpi_profiles' => [
|
'glpi_profiles' => [
|
||||||
'FKEY' => [
|
'FKEY' => [
|
||||||
'glpi_profiles' => 'id',
|
'glpi_profiles' => 'id',
|
||||||
'gpp' => 'profiles_id'
|
'gpp' => 'profiles_id'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'glpi_entities' => [
|
'glpi_entities' => [
|
||||||
'FKEY' => [
|
'FKEY' => [
|
||||||
'glpi_entities' => 'id',
|
'glpi_entities' => 'id',
|
||||||
'gpp' => 'entities_id'
|
'gpp' => 'entities_id'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'WHERE' => [ 'gpp.plugin_processmaker_processes_id' => $ID ],
|
'WHERE' => [ 'gpp.plugin_processmaker_processes_id' => $ID ],
|
||||||
'ORDER' => [ 'glpi_profiles.name', 'glpi_entities.completename' ]
|
'ORDER' => [ 'glpi_profiles.name', 'glpi_entities.completename' ]
|
||||||
]);
|
]);
|
||||||
//$query = "SELECT DISTINCT gpp.`id` AS linkID,
|
$num = $res->numrows();
|
||||||
// `glpi_profiles`.`id`,
|
echo "<div class='spaced'>";
|
||||||
// `glpi_profiles`.`name`,
|
Html::openMassiveActionsForm('mass'.__CLASS__.$rand);
|
||||||
// `gpp`.`is_recursive`,
|
|
||||||
// `glpi_entities`.`completename`,
|
if ($canedit && $num) {
|
||||||
// `gpp`.`entities_id`
|
$massiveactionparams = ['num_displayed' => $num,
|
||||||
// FROM `". self::getTable() ."` as gpp
|
'container' => 'mass'.__CLASS__.$rand];
|
||||||
// LEFT JOIN `glpi_profiles`
|
Html::showMassiveActions($massiveactionparams);
|
||||||
// ON (`gpp`.`profiles_id` = `glpi_profiles`.`id`)
|
}
|
||||||
// LEFT JOIN `glpi_entities`
|
|
||||||
// ON (`gpp`.`entities_id` = `glpi_entities`.`id`)
|
if ($num > 0) {
|
||||||
// WHERE `gpp`.`plugin_processmaker_processes_id` = '$ID'
|
echo "<table class='tab_cadre_fixehov'>";
|
||||||
// ORDER BY `glpi_profiles`.`name`, `glpi_entities`.`completename`";
|
$header_begin = "<tr>";
|
||||||
//$result = $DB->query($query);
|
$header_top = '';
|
||||||
//$num = $DB->numrows($result);
|
$header_bottom = '';
|
||||||
$num = $res->numrows();
|
$header_end = '';
|
||||||
echo "<div class='spaced'>";
|
if ($canedit) {
|
||||||
Html::openMassiveActionsForm('mass'.__CLASS__.$rand);
|
$header_begin .= "<th>";
|
||||||
|
$header_top .= Html::getCheckAllAsCheckbox('mass'.__CLASS__.$rand);
|
||||||
if ($canedit && $num) {
|
$header_bottom .= Html::getCheckAllAsCheckbox('mass'.__CLASS__.$rand);
|
||||||
$massiveactionparams = ['num_displayed' => $num,
|
$header_end .= "</th>";
|
||||||
'container' => 'mass'.__CLASS__.$rand];
|
}
|
||||||
Html::showMassiveActions($massiveactionparams);
|
$header_end .= "<th>"._n('Entity', 'Entities', Session::getPluralNumber())."</th>";
|
||||||
}
|
$header_end .= "<th>".sprintf('%1$s (%2$s)', Profile::getTypeName(Session::getPluralNumber()),
|
||||||
|
__('D=Dynamic, R=Recursive'));
|
||||||
if ($num > 0) {
|
$header_end .= "</th></tr>";
|
||||||
echo "<table class='tab_cadre_fixehov'>";
|
echo $header_begin.$header_top.$header_end;
|
||||||
$header_begin = "<tr>";
|
|
||||||
$header_top = '';
|
//while ($data = $DB->fetch_assoc($result)) {
|
||||||
$header_bottom = '';
|
foreach ($res as $data) {
|
||||||
$header_end = '';
|
echo "<tr class='tab_bg_1'>";
|
||||||
if ($canedit) {
|
if ($canedit) {
|
||||||
$header_begin .= "<th>";
|
echo "<td width='10'>";
|
||||||
$header_top .= Html::getCheckAllAsCheckbox('mass'.__CLASS__.$rand);
|
if (in_array($data["entities_id"], $_SESSION['glpiactiveentities'])) {
|
||||||
$header_bottom .= Html::getCheckAllAsCheckbox('mass'.__CLASS__.$rand);
|
Html::showMassiveActionCheckBox(__CLASS__, $data["linkID"]);
|
||||||
$header_end .= "</th>";
|
} else {
|
||||||
}
|
echo " ";
|
||||||
$header_end .= "<th>"._n('Entity', 'Entities', Session::getPluralNumber())."</th>";
|
}
|
||||||
$header_end .= "<th>".sprintf('%1$s (%2$s)', Profile::getTypeName(Session::getPluralNumber()),
|
echo "</td>";
|
||||||
__('D=Dynamic, R=Recursive'));
|
}
|
||||||
$header_end .= "</th></tr>";
|
echo "<td>";
|
||||||
echo $header_begin.$header_top.$header_end;
|
|
||||||
|
$link = $data["completename"];
|
||||||
//while ($data = $DB->fetch_assoc($result)) {
|
if ($_SESSION["glpiis_ids_visible"]) {
|
||||||
foreach ($res as $data) {
|
$link = sprintf('%1$s (%2$s)', $link, $data["entities_id"]);
|
||||||
echo "<tr class='tab_bg_1'>";
|
}
|
||||||
if ($canedit) {
|
|
||||||
echo "<td width='10'>";
|
if ($canshowentity) {
|
||||||
if (in_array($data["entities_id"], $_SESSION['glpiactiveentities'])) {
|
echo "<a href='".Toolbox::getItemTypeFormURL('Entity')."?id=".
|
||||||
Html::showMassiveActionCheckBox(__CLASS__, $data["linkID"]);
|
$data["entities_id"]."'>";
|
||||||
} else {
|
}
|
||||||
echo " ";
|
echo $link.($canshowentity ? "</a>" : '');
|
||||||
}
|
echo "</td>";
|
||||||
echo "</td>";
|
|
||||||
}
|
if (Profile::canView()) {
|
||||||
echo "<td>";
|
$entname = "<a href='".Toolbox::getItemTypeFormURL('Profile')."?id=".$data["id"]."'>".
|
||||||
|
$data["name"]."</a>";
|
||||||
$link = $data["completename"];
|
} else {
|
||||||
if ($_SESSION["glpiis_ids_visible"]) {
|
$entname = $data["name"];
|
||||||
$link = sprintf('%1$s (%2$s)', $link, $data["entities_id"]);
|
}
|
||||||
}
|
|
||||||
|
if ($data["is_recursive"]) {
|
||||||
if ($canshowentity) {
|
$entname = sprintf('%1$s %2$s', $entname, "<span class='b'>(");
|
||||||
echo "<a href='".Toolbox::getItemTypeFormURL('Entity')."?id=".
|
if ($data["is_recursive"]) {
|
||||||
$data["entities_id"]."'>";
|
//TRANS: letter 'R' for Recursive
|
||||||
}
|
$entname = sprintf('%1$s%2$s', $entname, __('R'));
|
||||||
echo $link.($canshowentity ? "</a>" : '');
|
}
|
||||||
echo "</td>";
|
$entname = sprintf('%1$s%2$s', $entname, ")</span>");
|
||||||
|
}
|
||||||
if (Profile::canView()) {
|
echo "<td>".$entname."</td>";
|
||||||
$entname = "<a href='".Toolbox::getItemTypeFormURL('Profile')."?id=".$data["id"]."'>".
|
echo "</tr>";
|
||||||
$data["name"]."</a>";
|
}
|
||||||
} else {
|
echo $header_begin.$header_bottom.$header_end;
|
||||||
$entname = $data["name"];
|
echo "</table>";
|
||||||
}
|
} else {
|
||||||
|
echo "<table class='tab_cadre_fixe'>";
|
||||||
if ($data["is_recursive"]) {
|
echo "<tr><th>".__('No item found')."</th></tr>";
|
||||||
$entname = sprintf('%1$s %2$s', $entname, "<span class='b'>(");
|
echo "</table>\n";
|
||||||
if ($data["is_recursive"]) {
|
}
|
||||||
//TRANS: letter 'R' for Recursive
|
|
||||||
$entname = sprintf('%1$s%2$s', $entname, __('R'));
|
if ($canedit && $num) {
|
||||||
}
|
$massiveactionparams['ontop'] = false;
|
||||||
$entname = sprintf('%1$s%2$s', $entname, ")</span>");
|
Html::showMassiveActions($massiveactionparams);
|
||||||
}
|
}
|
||||||
echo "<td>".$entname."</td>";
|
Html::closeForm();
|
||||||
echo "</tr>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
echo $header_begin.$header_bottom.$header_end;
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
/**
|
||||||
echo "<table class='tab_cadre_fixe'>";
|
* Summary of prepareInputForAdd
|
||||||
echo "<tr><th>".__('No item found')."</th></tr>";
|
* @param mixed $input
|
||||||
echo "</table>\n";
|
* @return mixed
|
||||||
}
|
*/
|
||||||
|
function prepareInputForAdd($input) {
|
||||||
if ($canedit && $num) {
|
$tmp = new self;
|
||||||
$massiveactionparams['ontop'] = false;
|
$restrict=[
|
||||||
Html::showMassiveActions($massiveactionparams);
|
'WHERE' => [
|
||||||
}
|
'plugin_processmaker_processes_id' => $input['plugin_processmaker_processes_id'],
|
||||||
Html::closeForm();
|
'entities_id' => $input['entities_id'],
|
||||||
echo "</div>";
|
'profiles_id' => $input['profiles_id']
|
||||||
}
|
],
|
||||||
|
];
|
||||||
|
if ($tmp->getFromDBByRequest($restrict)) {
|
||||||
/**
|
//// then update existing
|
||||||
* Summary of prepareInputForAdd
|
//$tmp->update(['id' => $tmp->getID(),
|
||||||
* @param mixed $input
|
// 'is_recursive' => $input['is_recursive']]);
|
||||||
* @return mixed
|
Session::addMessageAfterRedirect(__('Authorization not added: already existing!', 'processmaker'), true, WARNING);
|
||||||
*/
|
|
||||||
function prepareInputForAdd($input) {
|
return []; // to cancel add
|
||||||
$tmp = new self;
|
}
|
||||||
$restrict=[
|
return $input;
|
||||||
'WHERE' => [
|
}
|
||||||
'plugin_processmaker_processes_id' => $input['plugin_processmaker_processes_id'],
|
|
||||||
'entities_id' => $input['entities_id'],
|
}
|
||||||
'profiles_id' => $input['profiles_id']
|
|
||||||
],
|
|
||||||
];
|
|
||||||
if ($tmp->getFromDBByRequest($restrict)) {
|
|
||||||
//// then update existing
|
|
||||||
//$tmp->update(['id' => $tmp->getID(),
|
|
||||||
// 'is_recursive' => $input['is_recursive']]);
|
|
||||||
Session::addMessageAfterRedirect(__('Authorization not added: already existing!', 'processmaker'), true, WARNING);
|
|
||||||
|
|
||||||
return []; // to cancel add
|
|
||||||
}
|
|
||||||
return $input;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1059
inc/task.class.php
1059
inc/task.class.php
File diff suppressed because it is too large
Load Diff
@@ -1,385 +1,385 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PluginProcessmakerTaskCategory short summary.
|
* PluginProcessmakerTaskCategory short summary.
|
||||||
*
|
*
|
||||||
* PluginProcessmakerTaskCategory description.
|
* PluginProcessmakerTaskCategory description.
|
||||||
*
|
*
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @author MoronO
|
* @author MoronO
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('GLPI_ROOT')) {
|
if (!defined('GLPI_ROOT')) {
|
||||||
die("Sorry. You can't access directly to this file");
|
die("Sorry. You can't access directly to this file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class PluginProcessmakerTaskCategory extends CommonDBTM
|
class PluginProcessmakerTaskCategory extends CommonDBTM
|
||||||
{
|
{
|
||||||
|
|
||||||
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
||||||
if ($item->getType() == 'TaskCategory') {
|
if ($item->getType() == 'TaskCategory') {
|
||||||
$pmtaskcat = new PluginProcessmakerTaskCategory;
|
$pmtaskcat = new PluginProcessmakerTaskCategory;
|
||||||
if ($pmtaskcat->getFromDBbyCategory($item->fields['id'])) {
|
if ($pmtaskcat->getFromDBbyCategory($item->fields['id'])) {
|
||||||
return __('Process task', 'processmaker');
|
return __('Process task', 'processmaker');
|
||||||
} else {
|
} else {
|
||||||
return ''; // means no tab
|
return ''; // means no tab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return __('Task list', 'processmaker');
|
return __('Task list', 'processmaker');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static function displayTabContentForProcess(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
static function displayTabContentForProcess(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||||
global $DB, $CFG_GLPI;
|
global $DB, $CFG_GLPI;
|
||||||
|
|
||||||
self::title($item);
|
self::title($item);
|
||||||
|
|
||||||
echo "<div class='center'><br><table class='tab_cadre_fixehov'>";
|
echo "<div class='center'><br><table class='tab_cadre_fixehov'>";
|
||||||
echo "<tr><th colspan='7'>".__('Task List', 'processmaker')."</th></tr>";
|
echo "<tr><th colspan='7'>".__('Task list', 'processmaker')."</th></tr>";
|
||||||
echo "<tr><th>".__('Task name', 'processmaker')."</th>".
|
echo "<tr><th>".__('Task name', 'processmaker')."</th>".
|
||||||
"<th>".__('Complete name')."</th>" .
|
"<th>".__('Complete name')."</th>" .
|
||||||
"<th>".__('Start', 'processmaker')."</th>" .
|
"<th>".__('Start', 'processmaker')."</th>" .
|
||||||
"<th>".__('Task GUID', 'processmaker')."</th>" .
|
"<th>".__('Task guid', 'processmaker')."</th>" .
|
||||||
"<th>".__('Comments')."</th>" .
|
"<th>".__('Comments')."</th>" .
|
||||||
"<th>".__('Active')."</th>" .
|
"<th>".__('Active')."</th>" .
|
||||||
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
||||||
"</tr>";
|
"</tr>";
|
||||||
|
|
||||||
$res = $DB->request([
|
$res = $DB->request([
|
||||||
'SELECT' => [
|
'SELECT' => [
|
||||||
'pm.pm_task_guid',
|
'pm.pm_task_guid',
|
||||||
'pm.taskcategories_id',
|
'pm.taskcategories_id',
|
||||||
'pm.is_start',
|
'pm.is_start',
|
||||||
'gl.name',
|
'gl.name',
|
||||||
'gl.completename',
|
'gl.completename',
|
||||||
'gl.comment',
|
'gl.comment',
|
||||||
'pm.is_active',
|
'pm.is_active',
|
||||||
'pm.is_subprocess'
|
'pm.is_subprocess'
|
||||||
],
|
],
|
||||||
'FROM' => 'glpi_plugin_processmaker_taskcategories AS pm',
|
'FROM' => 'glpi_plugin_processmaker_taskcategories AS pm',
|
||||||
'LEFT JOIN' => [
|
'LEFT JOIN' => [
|
||||||
'glpi_taskcategories AS gl' => [
|
'glpi_taskcategories AS gl' => [
|
||||||
'FKEY' => [
|
'FKEY' => [
|
||||||
'gl' => 'id',
|
'gl' => 'id',
|
||||||
'pm' => 'taskcategories_id'
|
'pm' => 'taskcategories_id'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'WHERE' => [
|
'WHERE' => [
|
||||||
'pm.plugin_processmaker_processes_id' => $item->getId()
|
'pm.plugin_processmaker_processes_id' => $item->getId()
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
//$query = "SELECT pm.pm_task_guid, pm.taskcategories_id, pm.`is_start`, gl.name, gl.completename, gl.`comment`, pm.is_active, pm.is_subprocess FROM glpi_plugin_processmaker_taskcategories AS pm
|
//$query = "SELECT pm.pm_task_guid, pm.taskcategories_id, pm.`is_start`, gl.name, gl.completename, gl.`comment`, pm.is_active, pm.is_subprocess FROM glpi_plugin_processmaker_taskcategories AS pm
|
||||||
// LEFT JOIN glpi_taskcategories AS gl ON pm.taskcategories_id=gl.id
|
// LEFT JOIN glpi_taskcategories AS gl ON pm.taskcategories_id=gl.id
|
||||||
// WHERE pm.plugin_processmaker_processes_id=".$item->getID().";";
|
// WHERE pm.plugin_processmaker_processes_id=".$item->getID().";";
|
||||||
|
|
||||||
//foreach ($DB->request($query) as $taskCat) {
|
//foreach ($DB->request($query) as $taskCat) {
|
||||||
foreach ($res as $taskCat) {
|
foreach ($res as $taskCat) {
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
|
|
||||||
echo "<td class='b'><a href='".
|
echo "<td class='b'><a href='".
|
||||||
Toolbox::getItemTypeFormURL('TaskCategory') . "?id=" . $taskCat['taskcategories_id'] . "'>" . $taskCat['name'];
|
Toolbox::getItemTypeFormURL('TaskCategory') . "?id=" . $taskCat['taskcategories_id'] . "'>" . $taskCat['name'];
|
||||||
if ($_SESSION["glpiis_ids_visible"]) {
|
if ($_SESSION["glpiis_ids_visible"]) {
|
||||||
echo " (" . $taskCat['taskcategories_id'] . ")";
|
echo " (" . $taskCat['taskcategories_id'] . ")";
|
||||||
}
|
}
|
||||||
echo "</a></td>";
|
echo "</a></td>";
|
||||||
|
|
||||||
echo "<td>" . $taskCat['completename'] . "</td>";
|
echo "<td>" . $taskCat['completename'] . "</td>";
|
||||||
|
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($taskCat['is_start']) {
|
if ($taskCat['is_start']) {
|
||||||
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
||||||
__('Start', 'processmaker')."\">";
|
__('Start', 'processmaker')."\">";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "<td >".$taskCat['pm_task_guid']."</td>";
|
echo "<td >".$taskCat['pm_task_guid']."</td>";
|
||||||
|
|
||||||
echo "<td>".$taskCat['comment']."</td>";
|
echo "<td>".$taskCat['comment']."</td>";
|
||||||
|
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($taskCat['is_active']) {
|
if ($taskCat['is_active']) {
|
||||||
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
||||||
__('Active')."\">";
|
__('Active')."\">";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($taskCat['is_subprocess']) {
|
if ($taskCat['is_subprocess']) {
|
||||||
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
||||||
__('Sub-process', 'processmaker')."\">";
|
__('Sub-process', 'processmaker')."\">";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "</table></div>";
|
echo "</table></div>";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of displayTabContentForTaskCategory
|
* Summary of displayTabContentForTaskCategory
|
||||||
* @param CommonGLPI $item
|
* @param CommonGLPI $item
|
||||||
* @param mixed $tabnum
|
* @param mixed $tabnum
|
||||||
* @param mixed $withtemplate
|
* @param mixed $withtemplate
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
static function displayTabContentForTaskCategory(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
static function displayTabContentForTaskCategory(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||||
global $DB, $CFG_GLPI;
|
global $DB, $CFG_GLPI;
|
||||||
|
|
||||||
$is_taskcat = false;
|
$is_taskcat = false;
|
||||||
$processes_id = 0;
|
$processes_id = 0;
|
||||||
$pmtaskcat = new PluginProcessmakerTaskCategory;
|
$pmtaskcat = new PluginProcessmakerTaskCategory;
|
||||||
$is_taskcat = $pmtaskcat->getFromDBbyCategory($item->fields['id']);
|
$is_taskcat = $pmtaskcat->getFromDBbyCategory($item->fields['id']);
|
||||||
$processes_id = $pmtaskcat->fields['plugin_processmaker_processes_id'];
|
$processes_id = $pmtaskcat->fields['plugin_processmaker_processes_id'];
|
||||||
|
|
||||||
echo "<div class='center'><br><table class='tab_cadre_fixehov'>";
|
echo "<div class='center'><br><table class='tab_cadre_fixehov'>";
|
||||||
|
|
||||||
echo "<tr><th colspan='8'>".__('Process task', 'processmaker')."</th></tr>";
|
echo "<tr><th colspan='8'>".__('Process task', 'processmaker')."</th></tr>";
|
||||||
echo "<tr><th>".__('Process name', 'processmaker')."</th>";
|
echo "<tr><th>".__('Process name', 'processmaker')."</th>";
|
||||||
echo "<th>".__('Task name', 'processmaker')."</th>";
|
echo "<th>".__('Task name', 'processmaker')."</th>";
|
||||||
|
|
||||||
echo "<th>".__('Complete name')."</th>" .
|
echo "<th>".__('Complete name')."</th>" .
|
||||||
"<th>".__('Start', 'processmaker')."</th>" .
|
"<th>".__('Start', 'processmaker')."</th>" .
|
||||||
"<th>".__('Task GUID', 'processmaker')."</th>" .
|
"<th>".__('Task guid', 'processmaker')."</th>" .
|
||||||
"<th>".__('Comments')."</th>" .
|
"<th>".__('Comments')."</th>" .
|
||||||
"<th>".__('Active')."</th>" .
|
"<th>".__('Active')."</th>" .
|
||||||
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
||||||
"</tr>";
|
"</tr>";
|
||||||
|
|
||||||
$query = "SELECT pm.pm_task_guid, pm.taskcategories_id, pm.`is_start`, glp.name as 'pname', gl.name, gl.completename, gl.`comment`, pm.is_active, pm.is_subprocess FROM glpi_plugin_processmaker_taskcategories AS pm
|
$query = "SELECT pm.pm_task_guid, pm.taskcategories_id, pm.`is_start`, glp.name as 'pname', gl.name, gl.completename, gl.`comment`, pm.is_active, pm.is_subprocess FROM glpi_plugin_processmaker_taskcategories AS pm
|
||||||
LEFT JOIN glpi_taskcategories AS gl ON pm.taskcategories_id=gl.id
|
LEFT JOIN glpi_taskcategories AS gl ON pm.taskcategories_id=gl.id
|
||||||
LEFT JOIN glpi_taskcategories AS glp ON glp.id=gl.taskcategories_id
|
LEFT JOIN glpi_taskcategories AS glp ON glp.id=gl.taskcategories_id
|
||||||
WHERE pm.taskcategories_id=".$item->getID().";";
|
WHERE pm.taskcategories_id=".$item->getID().";";
|
||||||
|
|
||||||
foreach ($DB->request($query) as $taskCat) {
|
foreach ($DB->request($query) as $taskCat) {
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
|
|
||||||
echo "<td class='b'><a href='";
|
echo "<td class='b'><a href='";
|
||||||
echo Toolbox::getItemTypeFormURL('PluginProcessmakerProcess') . "?id=" . $processes_id . "'>" . $taskCat['pname'];
|
echo Toolbox::getItemTypeFormURL('PluginProcessmakerProcess') . "?id=" . $processes_id . "'>" . $taskCat['pname'];
|
||||||
if ($_SESSION["glpiis_ids_visible"]) {
|
if ($_SESSION["glpiis_ids_visible"]) {
|
||||||
echo " (" . $processes_id . ")";
|
echo " (" . $processes_id . ")";
|
||||||
}
|
}
|
||||||
echo "</a></td>";
|
echo "</a></td>";
|
||||||
echo "<td class='b'>";
|
echo "<td class='b'>";
|
||||||
echo $taskCat['name'];
|
echo $taskCat['name'];
|
||||||
|
|
||||||
if ($_SESSION["glpiis_ids_visible"]) {
|
if ($_SESSION["glpiis_ids_visible"]) {
|
||||||
echo " (" . $taskCat['taskcategories_id'] . ")";
|
echo " (" . $taskCat['taskcategories_id'] . ")";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "<td>" . $taskCat['completename'] . "</td>";
|
echo "<td>" . $taskCat['completename'] . "</td>";
|
||||||
|
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($taskCat['is_start']) {
|
if ($taskCat['is_start']) {
|
||||||
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
||||||
__('Start', 'processmaker')."\">";
|
__('Start', 'processmaker')."\">";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "<td >".$taskCat['pm_task_guid']."</td>";
|
echo "<td >".$taskCat['pm_task_guid']."</td>";
|
||||||
|
|
||||||
echo "<td>".$taskCat['comment']."</td>";
|
echo "<td>".$taskCat['comment']."</td>";
|
||||||
|
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($taskCat['is_active']) {
|
if ($taskCat['is_active']) {
|
||||||
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
||||||
__('Active')."\">";
|
__('Active')."\">";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($taskCat['is_subprocess']) {
|
if ($taskCat['is_subprocess']) {
|
||||||
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/ok.png' width='14' height='14' alt=\"".
|
||||||
__('Sub-process', 'processmaker')."\">";
|
__('Sub-process', 'processmaker')."\">";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "</table></div>";
|
echo "</table></div>";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of displayTabContentForItem
|
* Summary of displayTabContentForItem
|
||||||
* @param CommonGLPI $item
|
* @param CommonGLPI $item
|
||||||
* @param mixed $tabnum
|
* @param mixed $tabnum
|
||||||
* @param mixed $withtemplate
|
* @param mixed $withtemplate
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||||
$ret = false;
|
$ret = false;
|
||||||
switch ($item->getType()) {
|
switch ($item->getType()) {
|
||||||
case 'PluginProcessmakerProcess':
|
case 'PluginProcessmakerProcess':
|
||||||
$ret = self::displayTabContentForProcess($item, $tabnum, $withtemplate);
|
$ret = self::displayTabContentForProcess($item, $tabnum, $withtemplate);
|
||||||
break;
|
break;
|
||||||
case 'TaskCategory':
|
case 'TaskCategory':
|
||||||
$ret = self::displayTabContentForTaskCategory($item, $tabnum, $withtemplate);
|
$ret = self::displayTabContentForTaskCategory($item, $tabnum, $withtemplate);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a good title for task categories tab
|
* Print a good title for task categories tab
|
||||||
* add button for re-synchro of taskcategory list (only if rigths are w)
|
* add button for re-synchro of taskcategory list (only if rigths are w)
|
||||||
* @return nothing (display)
|
* @return nothing (display)
|
||||||
**/
|
**/
|
||||||
static function title(CommonGLPI $item) {
|
static function title(CommonGLPI $item) {
|
||||||
global $CFG_GLPI;
|
global $CFG_GLPI;
|
||||||
|
|
||||||
if (Session::haveRight('plugin_processmaker_config', UPDATE)) {
|
if (Session::haveRight('plugin_processmaker_config', UPDATE)) {
|
||||||
$title = __('Synchronize Task List', 'processmaker');
|
$title = __('Synchronize Task List', 'processmaker');
|
||||||
$buttons = ["process.form.php?refreshtask=1&id=".$item->getID() => $title];
|
$buttons = ["process.form.php?refreshtask=1&id=".$item->getID() => $title];
|
||||||
$pic = $CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png";
|
$pic = $CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png";
|
||||||
if ($item->fields['maintenance']) {
|
if ($item->fields['maintenance']) {
|
||||||
$pic = $CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/verysmall-under_maintenance.png";
|
$pic = $CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/verysmall-under_maintenance.png";
|
||||||
}
|
}
|
||||||
Html::displayTitle($pic, $title, "", $buttons);
|
Html::displayTitle($pic, $title, "", $buttons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a TaskCat from the database using its external id (unique index): pm_task_guid
|
* Retrieve a TaskCat from the database using its external id (unique index): pm_task_guid
|
||||||
*
|
*
|
||||||
* @param $task_guid string externalid
|
* @param $task_guid string externalid
|
||||||
*
|
*
|
||||||
* @return true if succeed else false
|
* @return true if succeed else false
|
||||||
**/
|
**/
|
||||||
function getFromGUID($task_guid) {
|
function getFromGUID($task_guid) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
$res = $DB->request(
|
$res = $DB->request(
|
||||||
$this->getTable(),
|
$this->getTable(),
|
||||||
[
|
[
|
||||||
'pm_task_guid' => $task_guid
|
'pm_task_guid' => $task_guid
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
if ($res) {
|
if ($res) {
|
||||||
if ($res->numrows() != 1) {
|
if ($res->numrows() != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->fields = $res->next();
|
$this->fields = $res->next();
|
||||||
if (is_array($this->fields) && count($this->fields)) {
|
if (is_array($this->fields) && count($this->fields)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//$query = "SELECT *
|
//$query = "SELECT *
|
||||||
// FROM `".$this->getTable()."`
|
// FROM `".$this->getTable()."`
|
||||||
// WHERE `pm_task_guid` = '$task_guid'";
|
// WHERE `pm_task_guid` = '$task_guid'";
|
||||||
|
|
||||||
//if ($result = $DB->query($query)) {
|
//if ($result = $DB->query($query)) {
|
||||||
// if ($DB->numrows($result) != 1) {
|
// if ($DB->numrows($result) != 1) {
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// $this->fields = $DB->fetch_assoc($result);
|
// $this->fields = $DB->fetch_assoc($result);
|
||||||
// if (is_array($this->fields) && count($this->fields)) {
|
// if (is_array($this->fields) && count($this->fields)) {
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a TaskCat from the database using its category id (unique index): taskcategories_id
|
* Retrieve a TaskCat from the database using its category id (unique index): taskcategories_id
|
||||||
*
|
*
|
||||||
* @param $catid string task category id
|
* @param $catid string task category id
|
||||||
*
|
*
|
||||||
* @return true if succeed else false
|
* @return true if succeed else false
|
||||||
**/
|
**/
|
||||||
function getFromDBbyCategory($catid) {
|
function getFromDBbyCategory($catid) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
$res = $DB->request(
|
$res = $DB->request(
|
||||||
$this->getTable(),
|
$this->getTable(),
|
||||||
[
|
[
|
||||||
'taskcategories_id' => $catid
|
'taskcategories_id' => $catid
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
//$query = "SELECT *
|
//$query = "SELECT *
|
||||||
// FROM `".$this->getTable()."`
|
// FROM `".$this->getTable()."`
|
||||||
// WHERE `taskcategories_id` = $catid";
|
// WHERE `taskcategories_id` = $catid";
|
||||||
if ($res) {
|
if ($res) {
|
||||||
if ($res->numrows() != 1) {
|
if ($res->numrows() != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->fields = $res->next();
|
$this->fields = $res->next();
|
||||||
if (is_array($this->fields) && count($this->fields)) {
|
if (is_array($this->fields) && count($this->fields)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if ($result = $DB->query($query)) {
|
//if ($result = $DB->query($query)) {
|
||||||
// if ($DB->numrows($result) != 1) {
|
// if ($DB->numrows($result) != 1) {
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// $this->fields = $DB->fetch_assoc($result);
|
// $this->fields = $DB->fetch_assoc($result);
|
||||||
// if (is_array($this->fields) && count($this->fields)) {
|
// if (is_array($this->fields) && count($this->fields)) {
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
///**
|
///**
|
||||||
// * Summary of dropdown
|
// * Summary of dropdown
|
||||||
// * @param mixed $options
|
// * @param mixed $options
|
||||||
// * @return mixed
|
// * @return mixed
|
||||||
// */
|
// */
|
||||||
//static function dropdown($options=array()) {
|
//static function dropdown($options=array()) {
|
||||||
// global $CFG_GLPI;
|
// global $CFG_GLPI;
|
||||||
// if (isset($options['value'])) {
|
// if (isset($options['value'])) {
|
||||||
// $that = new self;
|
// $that = new self;
|
||||||
// $that->getFromDB($options['value']);
|
// $that->getFromDB($options['value']);
|
||||||
// $options['value'] = $that->fields['taskcategories_id'];
|
// $options['value'] = $that->fields['taskcategories_id'];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// $options['url'] = $CFG_GLPI["root_doc"].'/plugins/processmaker/ajax/dropdownTaskcategories.php';
|
// $options['url'] = $CFG_GLPI["root_doc"].'/plugins/processmaker/ajax/dropdownTaskcategories.php';
|
||||||
// return Dropdown::show( 'TaskCategory', $options );
|
// return Dropdown::show( 'TaskCategory', $options );
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
///**
|
///**
|
||||||
// * Execute the query to select ProcesssmakerTaskcategories
|
// * Execute the query to select ProcesssmakerTaskcategories
|
||||||
// *
|
// *
|
||||||
// * @param $count true if execute an count(*),
|
// * @param $count true if execute an count(*),
|
||||||
// * @param $search pattern
|
// * @param $search pattern
|
||||||
// *
|
// *
|
||||||
// * @return mysql result set.
|
// * @return mysql result set.
|
||||||
// **/
|
// **/
|
||||||
//static function getSqlSearchResult ($count=true, $search='') {
|
//static function getSqlSearchResult ($count=true, $search='') {
|
||||||
// global $DB, $CFG_GLPI;
|
// global $DB, $CFG_GLPI;
|
||||||
|
|
||||||
// $orderby = '';
|
// $orderby = '';
|
||||||
|
|
||||||
// $where = ' WHERE glpi_plugin_processmaker_taskcategories.is_active=1 ';
|
// $where = ' WHERE glpi_plugin_processmaker_taskcategories.is_active=1 ';
|
||||||
|
|
||||||
// $join = ' LEFT JOIN glpi_taskcategories ON glpi_taskcategories.id = glpi_plugin_processmaker_taskcategories.taskcategories_id';
|
// $join = ' LEFT JOIN glpi_taskcategories ON glpi_taskcategories.id = glpi_plugin_processmaker_taskcategories.taskcategories_id';
|
||||||
|
|
||||||
// if ($count) {
|
// if ($count) {
|
||||||
// $fields = " COUNT(DISTINCT glpi_plugin_processmaker_taskcategories.id) AS cpt ";
|
// $fields = " COUNT(DISTINCT glpi_plugin_processmaker_taskcategories.id) AS cpt ";
|
||||||
// } else {
|
// } else {
|
||||||
// $fields = " DISTINCT glpi_taskcategories.id, glpi_taskcategories.completename AS name ";
|
// $fields = " DISTINCT glpi_taskcategories.id, glpi_taskcategories.completename AS name ";
|
||||||
// $orderby = " ORDER BY glpi_taskcategories.completename ASC";
|
// $orderby = " ORDER BY glpi_taskcategories.completename ASC";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if (strlen($search)>0 && $search!=$CFG_GLPI["ajax_wildcard"]) {
|
// if (strlen($search)>0 && $search!=$CFG_GLPI["ajax_wildcard"]) {
|
||||||
// $where .= " AND (glpi_taskcategories.completename $search
|
// $where .= " AND (glpi_taskcategories.completename $search
|
||||||
// OR glpi_taskcategories.comment $search) ";
|
// OR glpi_taskcategories.comment $search) ";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// $query = "SELECT $fields FROM glpi_plugin_processmaker_taskcategories $join ".$where." ".$orderby.";";
|
// $query = "SELECT $fields FROM glpi_plugin_processmaker_taskcategories $join ".$where." ".$orderby.";";
|
||||||
|
|
||||||
// return $DB->query($query);
|
// return $DB->query($query);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,354 +1,333 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user short summary.
|
||||||
|
*
|
||||||
|
* user description.
|
||||||
|
*
|
||||||
|
* @version 2.0
|
||||||
|
* @author MoronO
|
||||||
|
*/
|
||||||
|
class PluginProcessmakerUser extends CommonDBTM {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the query to select box with all glpi users where select key = name
|
||||||
|
*
|
||||||
|
* Internaly used by showGroup_Users, dropdownUsers and ajax/dropdownUsers.php
|
||||||
|
*
|
||||||
|
* @param array $tags contains taskGuid and grpGuid (task UID and Group UID)
|
||||||
|
* @param boolean $count true if execute an count(*),
|
||||||
|
* @param string|string[] $right limit user who have specific right
|
||||||
|
* @param integer $entity_restrict Restrict to a defined entity
|
||||||
|
* @param integer $value default value
|
||||||
|
* @param integer[] $used array: Already used items ID: not to display in dropdown
|
||||||
|
* @param string $search pattern
|
||||||
|
* @param integer $start start LIMIT value (default 0)
|
||||||
|
* @param integer $limit limit LIMIT value (default -1 no limit)
|
||||||
|
* @param boolean $inactive_deleted true to retreive also inactive or deleted users
|
||||||
|
* @return DBmysqlIterator
|
||||||
|
**/
|
||||||
|
static function getSqlSearchResult (array $tags, $count = true, $right = "all", $entity_restrict = -1, $value = 0,
|
||||||
|
array $used = [], $search = '',$start = 0, $limit = -1,
|
||||||
|
$inactive_deleted = 0) {
|
||||||
|
global $DB, $PM_DB, $CFG_GLPI;
|
||||||
|
|
||||||
|
// first need to get all users from $taskId
|
||||||
|
|
||||||
|
// TU_TYPE in (1, 2) means 1 is normal user, 2 is for adhoc users
|
||||||
|
$tu_type = [];
|
||||||
|
$tu_type[] = Session::haveRight('plugin_processmaker_case', ADHOC_REASSIGN) ? 2 : -1; // by default get (or not if no rights) the ad-hoc users
|
||||||
|
if ($tags['grpGuid'] == 0) {
|
||||||
|
$tu_type[] = 1; // if no group for selfservice value based assignment then get also the users
|
||||||
|
}
|
||||||
|
$res1 = new QuerySubQuery([
|
||||||
|
'SELECT' => 'GROUP_USER.USR_UID AS pm_user_id',
|
||||||
|
'FROM' => 'TASK_USER',
|
||||||
|
'INNER JOIN' => [
|
||||||
|
'GROUP_USER' => [
|
||||||
|
'FKEY' => [
|
||||||
|
'GROUP_USER' => 'GRP_UID',
|
||||||
|
'TASK_USER' => 'USR_UID',
|
||||||
|
['AND' => [
|
||||||
|
'TASK_USER.TU_RELATION' => 2,
|
||||||
|
'TASK_USER.TU_TYPE' => $tu_type
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'WHERE' => [
|
||||||
|
'TAS_UID' => $tags['taskGuid'],
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
$res2 = new QuerySubQuery([
|
||||||
|
'SELECT' => 'TASK_USER.USR_UID AS pm_user_id',
|
||||||
|
'FROM' => 'TASK_USER',
|
||||||
|
'WHERE' => [
|
||||||
|
'AND' => [
|
||||||
|
'TAS_UID' => $tags['taskGuid'],
|
||||||
|
'TASK_USER.TU_RELATION' => 1,
|
||||||
|
'TASK_USER.TU_TYPE' => $tu_type
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
|
$subqueries = [$res1, $res2];
|
||||||
|
|
||||||
|
if ($tags['grpGuid'] != 0) {
|
||||||
|
// then add the user for the selfservice value based assignement
|
||||||
|
$res3 = new QuerySubQuery([
|
||||||
|
'SELECT' => 'GROUP_USER.USR_UID AS pm_user_id',
|
||||||
|
'FROM' => 'GROUP_USER',
|
||||||
|
'WHERE' => ['GROUP_USER.GRP_UID' => $tags['grpGuid']]
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
$subqueries[] = $res3;
|
||||||
|
}
|
||||||
|
|
||||||
|
$union = new QueryUnion($subqueries);
|
||||||
|
|
||||||
|
$res = $PM_DB->request([
|
||||||
|
'FROM' => $union
|
||||||
|
]);
|
||||||
|
$pmUsers = [ ];
|
||||||
|
foreach ($res as $pmUser) {
|
||||||
|
$pmUsers[ ] = $pmUser[ 'pm_user_id' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
$joinprofile = false;
|
||||||
|
|
||||||
|
switch ($right) {
|
||||||
|
case "id" :
|
||||||
|
$used[] = Session::getLoginUserID();
|
||||||
|
$query['WHERE']['AND']['glpi_users.id'] = Session::getLoginUserID();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "all" :
|
||||||
|
$query['WHERE']['AND']['glpi_users.id'] = ['>', 0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$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;
|
||||||
|
|
||||||
|
if ((is_numeric($value) && $value)
|
||||||
|
|| count($used)) {
|
||||||
|
|
||||||
|
if (is_numeric($value)) {
|
||||||
|
$used[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($count) {
|
||||||
|
$query['FIELDS'] = 'glpi_users.id';
|
||||||
|
$query['COUNT'] = 'cpt';
|
||||||
|
$query['DISTINCT'] = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$query['FIELDS'] = ['glpi_users.id', 'glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name', 'glpi_useremails.email'];
|
||||||
|
$query['DISTINCT'] = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
$query['FROM'] = 'glpi_plugin_processmaker_users';
|
||||||
|
$query['FROM'] = 'glpi_plugin_processmaker_users';
|
||||||
|
$query['INNER JOIN'] = [
|
||||||
|
'glpi_users' => [
|
||||||
|
'FKEY' => [
|
||||||
|
'glpi_users' => 'id',
|
||||||
|
'glpi_plugin_processmaker_users' => 'id'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
$query['LEFT JOIN'] = [
|
||||||
|
'glpi_useremails' => [
|
||||||
|
'FKEY' => [
|
||||||
|
'glpi_users' => 'id',
|
||||||
|
'glpi_useremails' => 'users_id', [
|
||||||
|
'AND' => [
|
||||||
|
'glpi_useremails.is_default' => 1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'glpi_profiles_users' => [
|
||||||
|
'FKEY' => [
|
||||||
|
'glpi_users' => 'id',
|
||||||
|
'glpi_profiles_users' => 'users_id'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($joinprofile) {
|
||||||
|
$query['LEFT JOIN'] = [
|
||||||
|
'glpi_profiles' => [
|
||||||
|
'FKEY' => [
|
||||||
|
'glpi_profiles' => 'id',
|
||||||
|
'glpi_profiles_user' => 'profiles_id'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($count) {
|
||||||
|
$query['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
||||||
|
} else {
|
||||||
|
if (strlen($search)>0 && $search!=$CFG_GLPI["ajax_wildcard"]) {
|
||||||
|
$txt_search = Search::makeTextSearchValue($search);
|
||||||
|
|
||||||
/**
|
$firstname_field = $DB->quoteName(User::getTableField('firstname'));
|
||||||
* user short summary.
|
$realname_field = $DB->quoteName(User::getTableField('realname'));
|
||||||
*
|
$fields = $_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE
|
||||||
* user description.
|
? [$firstname_field, $realname_field]
|
||||||
*
|
: [$realname_field, $firstname_field];
|
||||||
* @version 2.0
|
$concat = new \QueryExpression(
|
||||||
* @author MoronO
|
'CONCAT(' . implode(',' . $DB->quoteValue(' ') . ',', $fields) . ')'
|
||||||
*/
|
. ' LIKE ' . $DB->quoteValue($txt_search)
|
||||||
class PluginProcessmakerUser extends CommonDBTM {
|
);
|
||||||
|
$query['WHERE']['AND'] = [
|
||||||
|
'glpi_users.name' => ['LIKE', $txt_search],
|
||||||
/**
|
'OR' => [
|
||||||
* Execute the query to select box with all glpi users where select key = name
|
'glpi_users.realname' => ['LIKE', $txt_search],
|
||||||
*
|
'glpi_users.firstname' => ['LIKE', $txt_search],
|
||||||
* Internaly used by showGroup_Users, dropdownUsers and ajax/dropdownUsers.php
|
'glpi_users.phone' => ['LIKE', $txt_search],
|
||||||
*
|
'glpi_useremails.email' => ['LIKE', $txt_search],
|
||||||
* @param $count true if execute an count(*),
|
$concat
|
||||||
* @param $right limit user who have specific right
|
]
|
||||||
* @param $entity_restrict Restrict to a defined entity
|
];
|
||||||
* @param $value default value
|
}
|
||||||
* @param $used array: Already used items ID: not to display in dropdown
|
$query['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
||||||
* @param $search pattern
|
|
||||||
*
|
if ($_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE) {
|
||||||
* @return DBmysqlIterator
|
$query['ORDER'] = ['glpi_users.firstname', 'glpi_users.realname', 'glpi_users.name'];
|
||||||
**/
|
} else {
|
||||||
static function getSqlSearchResult ($taskId, $count = true, $right = "all", $entity_restrict = -1, $value = 0,
|
$query['ORDER'] = ['glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name'];
|
||||||
$used = [], $search = '', $limit = '') {
|
}
|
||||||
global $DB, $PM_DB, $CFG_GLPI;
|
|
||||||
// first need to get all users from $taskId
|
if ($search != $CFG_GLPI["ajax_wildcard"]) {
|
||||||
$adhoc_users = Session::haveRight('plugin_processmaker_case', ADHOC_REASSIGN) ? 2 : -1;
|
$query['LIMIT'] = $limit;
|
||||||
// TU_TYPE in (1, 2) means 1 is normal, 2 is for adhoc
|
$query['START'] = $start;
|
||||||
// TU_RELATION is 1 for user, and 2 for group
|
}
|
||||||
$res1 = new QuerySubQuery([
|
}
|
||||||
'SELECT' => 'GROUP_USER.USR_UID AS pm_user_id',
|
|
||||||
'FROM' => 'TASK_USER',
|
return $DB->request($query);
|
||||||
'INNER JOIN' => [
|
}
|
||||||
'GROUP_USER' => [
|
|
||||||
'FKEY' => [
|
|
||||||
'GROUP_USER' => 'GRP_UID',
|
/**
|
||||||
'TASK_USER' => 'USR_UID',
|
* Make a select box with all glpi users where select key = name
|
||||||
['AND' => [
|
*
|
||||||
'TASK_USER.TU_RELATION' => 2,
|
* Parameters which could be used in options array :
|
||||||
'TASK_USER.TU_TYPE' => [1, $adhoc_users]
|
* - name : string / name of the select (default is users_id)
|
||||||
]
|
* - right : string / limit user who have specific right :
|
||||||
]
|
* id -> only current user (default case);
|
||||||
]
|
* interface -> central ;
|
||||||
]
|
* all -> all users ;
|
||||||
],
|
* specific right like show_all_ticket, create_ticket....
|
||||||
'WHERE' => [
|
* - comments : boolean / is the comments displayed near the dropdown (default true)
|
||||||
'TAS_UID' => $taskId,
|
* - entity : integer or array / restrict to a defined entity or array of entities
|
||||||
]
|
* (default -1 : no restriction)
|
||||||
]);
|
* - entity_sons : boolean / if entity restrict specified auto select its sons
|
||||||
$res2 = new QuerySubQuery([
|
* only available if entity is a single value not an array(default false)
|
||||||
'SELECT' => 'TASK_USER.USR_UID AS pm_user_id',
|
* - all : Nobody or All display for none selected
|
||||||
'FROM' => 'TASK_USER',
|
* all=0 (default) -> Nobody
|
||||||
'WHERE' => [
|
* all=1 -> All
|
||||||
'AND' => [
|
* all=-1-> nothing
|
||||||
'TAS_UID' => $taskId,
|
* - rand : integer / already computed rand value
|
||||||
'TASK_USER.TU_RELATION' => 1,
|
* - toupdate : array / Update a specific item on select change on dropdown
|
||||||
'TASK_USER.TU_TYPE' => [1, $adhoc_users]
|
* (need value_fieldname, to_update, url (see Ajax::updateItemOnSelectEvent for informations)
|
||||||
]
|
* and may have moreparams)
|
||||||
]
|
* - used : array / Already used items ID: not to display in dropdown (default empty)
|
||||||
]);
|
* - on_change : string / value to transmit to "onChange"
|
||||||
$union = new QueryUnion([$res1, $res2]);
|
*
|
||||||
$res = $PM_DB->request([
|
* @param $options array of possible options
|
||||||
'FROM' => $union
|
*
|
||||||
]);
|
* @return int (print out an HTML select box)
|
||||||
//$db_pm = PluginProcessmakerConfig::getInstance()->getProcessMakerDB();
|
**/
|
||||||
//$pmQuery = "SELECT GROUP_USER.USR_UID AS pm_user_id FROM TASK_USER
|
static function dropdown($options = []) {
|
||||||
// JOIN GROUP_USER ON GROUP_USER.GRP_UID=TASK_USER.USR_UID AND TASK_USER.TU_RELATION = 2 AND TASK_USER.TU_TYPE=1
|
global $CFG_GLPI;
|
||||||
// WHERE TAS_UID = '$taskId'
|
|
||||||
// UNION
|
$options['url'] = $CFG_GLPI["root_doc"].'/plugins/processmaker/ajax/dropdownUsers.php';
|
||||||
// SELECT TASK_USER.USR_UID AS pm_user_id FROM TASK_USER
|
return User::dropdown( $options );
|
||||||
// WHERE TAS_UID = '$taskId' AND TASK_USER.TU_RELATION = 1 AND TASK_USER.TU_TYPE=1 ; ";
|
}
|
||||||
$pmUsers = [ ];
|
|
||||||
//foreach ($PM_DB->request( $pmQuery ) as $pmUser) {
|
|
||||||
foreach ($res as $pmUser) {
|
/**
|
||||||
$pmUsers[ ] = $pmUser[ 'pm_user_id' ];
|
* Summary of getGLPIUserId
|
||||||
}
|
* returns GLPI user ID from a Processmaker user ID
|
||||||
|
* @param string $pmUserId
|
||||||
//$where = '';
|
* @return int GLPI user id, or 0 if not found
|
||||||
$joinprofile = false;
|
*/
|
||||||
|
public static function getGLPIUserId($pmUserId) {
|
||||||
switch ($right) {
|
$obj = new self;
|
||||||
case "id" :
|
if ($obj->getFromDBByRequest([
|
||||||
$used[] = Session::getLoginUserID();
|
'WHERE' => [
|
||||||
//$where = " `glpi_users`.`id` = '".Session::getLoginUserID()."' ";
|
'pm_users_id' => $pmUserId
|
||||||
$query2['WHERE']['AND']['glpi_users.id'] = Session::getLoginUserID();
|
],
|
||||||
break;
|
])) {
|
||||||
|
return $obj->fields['id'];
|
||||||
case "all" :
|
}
|
||||||
//$where = " `glpi_users`.`id` > '0' ";
|
|
||||||
$query2['WHERE']['AND']['glpi_users.id'] = ['>', 0];
|
return 0;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//$where .= " AND glpi_plugin_processmaker_users.pm_users_id IN ('".join("', '", $pmUsers)."') ";
|
/**
|
||||||
|
* Summary of getPMUserId
|
||||||
//$where .= " AND `glpi_users`.`is_deleted` = '0'
|
* returns processmaker user id for given GLPI user id
|
||||||
// AND `glpi_users`.`is_active` = '1' ";
|
* @param int $glpi_userId id of user from GLPI database
|
||||||
|
* @return string which is the uid of user in Processmaker database, or false if not found
|
||||||
$query2['WHERE']['AND']['glpi_plugin_processmaker_users.pm_users_id'] = $pmUsers;
|
*/
|
||||||
$query2['WHERE']['AND']['glpi_users.is_deleted'] = 0;
|
public static function getPMUserId($glpiUserId) {
|
||||||
$query2['WHERE']['AND']['glpi_users.is_active'] = 1;
|
if (is_numeric($glpiUserId)) {
|
||||||
|
$obj = new self;
|
||||||
if ((is_numeric($value) && $value)
|
if ($obj->getFromDB($glpiUserId)) {
|
||||||
|| count($used)) {
|
return $obj->fields['pm_users_id'];
|
||||||
|
}
|
||||||
//$where .= " AND `glpi_users`.`id` NOT IN (";
|
}
|
||||||
if (is_numeric($value)) {
|
return false;
|
||||||
//$first = false;
|
}
|
||||||
//$where .= $value;
|
|
||||||
$used[] = $value;
|
|
||||||
//$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $value;
|
/**
|
||||||
} else {
|
* Summary of getGlpiIdFromAny
|
||||||
//$first = true;
|
* Returns the GLPI id of the user or false if not found
|
||||||
}
|
* Accept either PM GUID, GLPI logon, or GLPI ID
|
||||||
//$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
* @param $any
|
||||||
//foreach ($used as $val) {
|
* @return mixed GLPI ID of the user or false if not found
|
||||||
// if ($first) {
|
*/
|
||||||
// $first = false;
|
public static function getGlpiIdFromAny($any) {
|
||||||
// } else {
|
$ret = self::getGLPIUserId($any);
|
||||||
// $where .= ",";
|
if ($ret) {
|
||||||
// }
|
return $ret;
|
||||||
// $where .= $val;
|
}
|
||||||
//}
|
$ret = self::getPMUserId($any);
|
||||||
//$where .= ")";
|
if ($ret) {
|
||||||
}
|
return $any;
|
||||||
|
}
|
||||||
if ($count) {
|
$usr = new User;
|
||||||
//$query = "SELECT COUNT(DISTINCT glpi_users.id ) AS cpt ";
|
if ($usr->getFromDBbyName($any)) {
|
||||||
$query2['SELECT'] = ['COUNT DISTINCT' => 'glpi_users.id AS cpt'];
|
return $usr->getId();
|
||||||
|
}
|
||||||
} else {
|
return false;
|
||||||
//$query = "SELECT DISTINCT glpi_users.id , `glpi_users`.`realname`, `glpi_users`.`firstname`, `glpi_users`.`name`, `glpi_useremails`.`email` ";
|
}
|
||||||
$query2['SELECT DISTINCT'] = 'glpi_users.id';
|
|
||||||
$query2['FIELDS'] = ['glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name', 'glpi_useremails.email'];
|
|
||||||
}
|
///**
|
||||||
$query2['FROM'] = 'glpi_plugin_processmaker_users';
|
// * Summary of getNewPassword
|
||||||
//$query .= "FROM glpi_plugin_processmaker_users
|
// * @param mixed $username
|
||||||
// JOIN glpi_users ON glpi_users.id=glpi_plugin_processmaker_users.id ";
|
// * @return string a new password computed
|
||||||
$query2['FROM'] = 'glpi_plugin_processmaker_users';
|
// * from uppercasing first letter of $username
|
||||||
$query2['INNER JOIN'] = [
|
// * and encoding
|
||||||
'glpi_users' => [
|
// * and adding a ramdon number (4 digits)
|
||||||
'FKEY' => [
|
// * and truncating it to a length of 20 chars
|
||||||
'glpi_users' => 'id',
|
// */
|
||||||
'glpi_plugin_processmaker_users' => 'id'
|
//public static function getNewPassword( $username ) {
|
||||||
]
|
// $newPass = Toolbox::encrypt( ucfirst( stripslashes( $username ) ), GLPIKEY) ;
|
||||||
]
|
// return substr( rand(1000,9999).$newPass, 0, 19) ;
|
||||||
];
|
//}
|
||||||
|
|
||||||
//$query .= " LEFT JOIN `glpi_useremails`
|
}
|
||||||
// ON (`glpi_users`.`id` = `glpi_useremails`.`users_id` AND `glpi_useremails`.is_default = 1)";
|
|
||||||
$query2['LEFT JOIN'] = [
|
|
||||||
'glpi_useremails' => [
|
|
||||||
'FKEY' => [
|
|
||||||
'glpi_users' => 'id',
|
|
||||||
'glpi_useremails' => 'users_id', [
|
|
||||||
'AND' => [
|
|
||||||
'glpi_useremails.is_default' => 1
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'glpi_profiles_users' => [
|
|
||||||
'FKEY' => [
|
|
||||||
'glpi_users' => 'id',
|
|
||||||
'glpi_profiles_users' => 'users_id'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
//$query .= " LEFT JOIN `glpi_profiles_users`
|
|
||||||
// ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)";
|
|
||||||
|
|
||||||
if ($joinprofile) {
|
|
||||||
$query2['LEFT JOIN'] = [
|
|
||||||
'glpi_profiles' => [
|
|
||||||
'FKEY' => [
|
|
||||||
'glpi_profiles' => 'id',
|
|
||||||
'glpi_profiles_user' => 'profiles_id'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
//$query .= " LEFT JOIN `glpi_profiles`
|
|
||||||
// ON (`glpi_profiles`.`id` = `glpi_profiles_users`.`profiles_id`) ";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($count) {
|
|
||||||
$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
|
||||||
//$query .= " WHERE $where ";
|
|
||||||
} else {
|
|
||||||
if (strlen($search)>0 && $search!=$CFG_GLPI["ajax_wildcard"]) {
|
|
||||||
$query2['WHERE']['AND'] = [
|
|
||||||
'glpi_users.name' => ['LIKE',Search::makeTextSearchValue($search)],
|
|
||||||
'OR' => [
|
|
||||||
'glpi_users.realname' => ['LIKE',Search::makeTextSearchValue($search)],
|
|
||||||
'glpi_users.firstname' => ['LIKE',Search::makeTextSearchValue($search)],
|
|
||||||
'glpi_users.phone' => ['LIKE',Search::makeTextSearchValue($search)],
|
|
||||||
'glpi_useremails.email' => ['LIKE',Search::makeTextSearchValue($search)],
|
|
||||||
'RAW' => [
|
|
||||||
"CONCAT(`glpi_users`.`realname`,' ',`glpi_users`.`firstname`)".Search::makeTextSearch($search)
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
//$where .= " AND (`glpi_users`.`name` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_users`.`realname` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_users`.`firstname` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_users`.`phone` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_useremails`.`email` ".Search::makeTextSearch($search)."
|
|
||||||
// OR CONCAT(`glpi_users`.`realname`,' ',`glpi_users`.`firstname`) ".
|
|
||||||
// Search::makeTextSearch($search).")";
|
|
||||||
}
|
|
||||||
$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
|
||||||
//$query .= " WHERE $where ";
|
|
||||||
|
|
||||||
if ($_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE) {
|
|
||||||
//$query.=" ORDER BY `glpi_users`.`firstname`,
|
|
||||||
// `glpi_users`.`realname`,
|
|
||||||
// `glpi_users`.`name` ";
|
|
||||||
$query2['ORDER'] = ['glpi_users.firstname', 'glpi_users.realname', 'glpi_users.name'];
|
|
||||||
} else {
|
|
||||||
//$query.=" ORDER BY `glpi_users`.`realname`,
|
|
||||||
// `glpi_users`.`firstname`,
|
|
||||||
// `glpi_users`.`name` ";
|
|
||||||
$query2['ORDER'] = ['glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($search != $CFG_GLPI["ajax_wildcard"]) {
|
|
||||||
//$query .= " $limit";
|
|
||||||
$query2['LIMIT'] = 200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $DB->request($query2);
|
|
||||||
//return $DB->query($query);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make a select box with all glpi users where select key = name
|
|
||||||
*
|
|
||||||
* Parameters which could be used in options array :
|
|
||||||
* - name : string / name of the select (default is users_id)
|
|
||||||
* - right : string / limit user who have specific right :
|
|
||||||
* id -> only current user (default case);
|
|
||||||
* interface -> central ;
|
|
||||||
* all -> all users ;
|
|
||||||
* specific right like show_all_ticket, create_ticket....
|
|
||||||
* - comments : boolean / is the comments displayed near the dropdown (default true)
|
|
||||||
* - entity : integer or array / restrict to a defined entity or array of entities
|
|
||||||
* (default -1 : no restriction)
|
|
||||||
* - entity_sons : boolean / if entity restrict specified auto select its sons
|
|
||||||
* only available if entity is a single value not an array(default false)
|
|
||||||
* - all : Nobody or All display for none selected
|
|
||||||
* all=0 (default) -> Nobody
|
|
||||||
* all=1 -> All
|
|
||||||
* all=-1-> nothing
|
|
||||||
* - rand : integer / already computed rand value
|
|
||||||
* - toupdate : array / Update a specific item on select change on dropdown
|
|
||||||
* (need value_fieldname, to_update, url (see Ajax::updateItemOnSelectEvent for informations)
|
|
||||||
* and may have moreparams)
|
|
||||||
* - used : array / Already used items ID: not to display in dropdown (default empty)
|
|
||||||
* - on_change : string / value to transmit to "onChange"
|
|
||||||
*
|
|
||||||
* @param $options array of possible options
|
|
||||||
*
|
|
||||||
* @return int (print out an HTML select box)
|
|
||||||
**/
|
|
||||||
static function dropdown($options = []) {
|
|
||||||
global $CFG_GLPI;
|
|
||||||
|
|
||||||
$options['url'] = $CFG_GLPI["root_doc"].'/plugins/processmaker/ajax/dropdownUsers.php';
|
|
||||||
return User::dropdown( $options );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary of getGLPIUserId
|
|
||||||
* returns GLPI user ID from a Processmaker user ID
|
|
||||||
* @param string $pmUserId
|
|
||||||
* @return int GLPI user id, or 0 if not found
|
|
||||||
*/
|
|
||||||
public static function getGLPIUserId($pmUserId) {
|
|
||||||
$obj = new self;
|
|
||||||
if ($obj->getFromDBByRequest([
|
|
||||||
'WHERE' => [
|
|
||||||
'pm_users_id' => $pmUserId
|
|
||||||
],
|
|
||||||
])) {
|
|
||||||
return $obj->fields['id'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary of getPMUserId
|
|
||||||
* returns processmaker user id for given GLPI user id
|
|
||||||
* @param int $glpi_userId id of user from GLPI database
|
|
||||||
* @return string which is the uid of user in Processmaker database, or false if not found
|
|
||||||
*/
|
|
||||||
public static function getPMUserId($glpiUserId) {
|
|
||||||
if (is_numeric($glpiUserId)) {
|
|
||||||
$obj = new self;
|
|
||||||
if ($obj->getFromDB($glpiUserId)) {
|
|
||||||
return $obj->fields['pm_users_id'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary of getGlpiIdFromAny
|
|
||||||
* Returns the GLPI id of the user or false if not found
|
|
||||||
* Accept either PM GUID, GLPI logon, or GLPI ID
|
|
||||||
* @param $any
|
|
||||||
* @return mixed GLPI ID of the user or false if not found
|
|
||||||
*/
|
|
||||||
public static function getGlpiIdFromAny($any) {
|
|
||||||
$ret = self::getGLPIUserId($any);
|
|
||||||
if ($ret) {
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
$ret = self::getPMUserId($any);
|
|
||||||
if ($ret) {
|
|
||||||
return $any;
|
|
||||||
}
|
|
||||||
$usr = new User;
|
|
||||||
if ($usr->getFromDBbyName($any)) {
|
|
||||||
return $usr->getId();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///**
|
|
||||||
// * Summary of getNewPassword
|
|
||||||
// * @param mixed $username
|
|
||||||
// * @return string a new password computed
|
|
||||||
// * from uppercasing first letter of $username
|
|
||||||
// * and encoding
|
|
||||||
// * and adding a ramdon number (4 digits)
|
|
||||||
// * and truncating it to a length of 20 chars
|
|
||||||
// */
|
|
||||||
//public static function getNewPassword( $username ) {
|
|
||||||
// $newPass = Toolbox::encrypt( ucfirst( stripslashes( $username ) ), GLPIKEY) ;
|
|
||||||
// return substr( rand(1000,9999).$newPass, 0, 19) ;
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,190 +1,190 @@
|
|||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
/*!40101 SET NAMES utf8 */;
|
/*!40101 SET NAMES utf8 */;
|
||||||
/*!50503 SET NAMES utf8mb4 */;
|
/*!50503 SET NAMES utf8mb4 */;
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||||
`name` varchar(255) NOT NULL,
|
`name` varchar(255) NOT NULL,
|
||||||
`value` text,
|
`value` text,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
|
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`name` varchar(255) NOT NULL,
|
`name` varchar(255) NOT NULL,
|
||||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
|
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
|
||||||
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
|
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
|
||||||
`sourcetask_guid` varchar(32) DEFAULT NULL,
|
`sourcetask_guid` varchar(32) DEFAULT NULL,
|
||||||
`targettask_guid` varchar(32) DEFAULT NULL,
|
`targettask_guid` varchar(32) DEFAULT NULL,
|
||||||
`targetprocess_guid` varchar(32) DEFAULT NULL,
|
`targetprocess_guid` varchar(32) DEFAULT NULL,
|
||||||
`targetdynaform_guid` varchar(32) DEFAULT NULL,
|
`targetdynaform_guid` varchar(32) DEFAULT NULL,
|
||||||
`sourcecondition` text,
|
`sourcecondition` text,
|
||||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`is_targettoreassign` TINYINT(1) NOT NULL DEFAULT '0',
|
`is_targettoreassign` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`is_targettoimpersonate` TINYINT(1) NOT NULL DEFAULT '0',
|
`is_targettoimpersonate` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`externalapplication` TEXT NULL,
|
`externalapplication` TEXT NULL,
|
||||||
`is_synchronous` TINYINT(1) NOT NULL DEFAULT '0',
|
`is_synchronous` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`date_mod` timestamp NULL DEFAULT NULL,
|
`date_mod` timestamp NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `is_active` (`is_active`),
|
KEY `is_active` (`is_active`),
|
||||||
KEY `is_externaldata` (`is_externaldata`),
|
KEY `is_externaldata` (`is_externaldata`),
|
||||||
KEY `is_self` (`is_self`)
|
KEY `is_self` (`is_self`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
||||||
`id` INT(11) NOT NULL,
|
`id` INT(11) NOT NULL,
|
||||||
`itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket',
|
`itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket',
|
||||||
`items_id` INT(11) NOT NULL,
|
`items_id` INT(11) NOT NULL,
|
||||||
`entities_id` INT(11) NOT NULL DEFAULT '0',
|
`entities_id` INT(11) NOT NULL DEFAULT '0',
|
||||||
`name` MEDIUMTEXT NOT NULL DEFAULT '',
|
`name` MEDIUMTEXT NOT NULL DEFAULT '',
|
||||||
`case_guid` VARCHAR(32) NOT NULL,
|
`case_guid` VARCHAR(32) NOT NULL,
|
||||||
`case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT',
|
`case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT',
|
||||||
`plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL,
|
`plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL,
|
||||||
`plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL,
|
`plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL,
|
||||||
INDEX `items` (`itemtype`, `items_id`),
|
INDEX `items` (`itemtype`, `items_id`),
|
||||||
INDEX `case_status` (`case_status`),
|
INDEX `case_status` (`case_status`),
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `case_guid` (`case_guid`),
|
UNIQUE INDEX `case_guid` (`case_guid`),
|
||||||
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
||||||
INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`)
|
INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
||||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://itsm-pm.acme.com/',
|
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://itsm-pm.acme.com/',
|
||||||
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
||||||
`pm_admin_user` varchar(255) DEFAULT NULL,
|
`pm_admin_user` varchar(255) DEFAULT NULL,
|
||||||
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
||||||
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
|
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
|
||||||
`date_mod` timestamp NULL DEFAULT NULL,
|
`date_mod` timestamp NULL DEFAULT NULL,
|
||||||
`taskcategories_id` int(11) DEFAULT NULL,
|
`taskcategories_id` int(11) DEFAULT NULL,
|
||||||
`users_id` int(11) DEFAULT NULL,
|
`users_id` int(11) DEFAULT NULL,
|
||||||
`pm_group_guid` varchar(32) DEFAULT NULL,
|
`pm_group_guid` varchar(32) DEFAULT NULL,
|
||||||
`comment` text,
|
`comment` text,
|
||||||
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
|
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
|
||||||
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
|
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
|
||||||
`pm_dbserver_user` varchar(255) DEFAULT NULL,
|
`pm_dbserver_user` varchar(255) DEFAULT NULL,
|
||||||
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
|
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
|
||||||
`domain` varchar(50) DEFAULT '',
|
`domain` varchar(50) DEFAULT '',
|
||||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`ssl_verify` tinyint(1) NOT NULL DEFAULT '0',
|
`ssl_verify` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`db_version` varchar(10) NOT NULL DEFAULT '3.4.10',
|
`db_version` varchar(10) NOT NULL DEFAULT '4.0.0',
|
||||||
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||||
`plugin_processmaker_cases_id` int(11) DEFAULT '0',
|
`plugin_processmaker_cases_id` int(11) DEFAULT '0',
|
||||||
`users_id` int(11) NOT NULL DEFAULT '0',
|
`users_id` int(11) NOT NULL DEFAULT '0',
|
||||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`postdata` mediumtext,
|
`postdata` mediumtext,
|
||||||
`logs_out` mediumtext,
|
`logs_out` mediumtext,
|
||||||
`state` int(11) NOT NULL,
|
`state` int(11) NOT NULL,
|
||||||
`date_mod` timestamp NULL DEFAULT NULL,
|
`date_mod` timestamp NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`process_guid` varchar(32) NOT NULL,
|
`process_guid` varchar(32) NOT NULL,
|
||||||
`name` varchar(255) NOT NULL,
|
`name` varchar(255) NOT NULL,
|
||||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
|
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
|
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`comment` text,
|
`comment` text,
|
||||||
`taskcategories_id` int(11) DEFAULT NULL,
|
`taskcategories_id` int(11) DEFAULT NULL,
|
||||||
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
|
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
|
||||||
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for self-service Tickets',
|
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for self-service Tickets',
|
||||||
`date_mod` timestamp NULL DEFAULT NULL,
|
`date_mod` timestamp NULL DEFAULT NULL,
|
||||||
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
|
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
|
||||||
`is_change` tinyint(1) NOT NULL DEFAULT '0',
|
`is_change` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`is_problem` tinyint(1) NOT NULL DEFAULT '0',
|
`is_problem` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`is_incident` tinyint(1) NOT NULL DEFAULT '0',
|
`is_incident` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`is_request` tinyint(1) NOT NULL DEFAULT '0',
|
`is_request` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`maintenance` TINYINT(1) NOT NULL DEFAULT '0',
|
`maintenance` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `process_guid` (`process_guid`)
|
UNIQUE KEY `process_guid` (`process_guid`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
|
||||||
CREATE TABLE `glpi_plugin_processmaker_processes_profiles` (
|
CREATE TABLE `glpi_plugin_processmaker_processes_profiles` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`plugin_processmaker_processes_id` int(11) NOT NULL,
|
`plugin_processmaker_processes_id` int(11) NOT NULL,
|
||||||
`profiles_id` int(11) NOT NULL,
|
`profiles_id` int(11) NOT NULL,
|
||||||
`entities_id` int(11) NOT NULL,
|
`entities_id` int(11) NOT NULL,
|
||||||
`is_recursive` tinyint(1) NOT NULL,
|
`is_recursive` tinyint(1) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`),
|
UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`),
|
||||||
KEY `entities_id` (`entities_id`),
|
KEY `entities_id` (`entities_id`),
|
||||||
KEY `profiles_id` (`profiles_id`),
|
KEY `profiles_id` (`profiles_id`),
|
||||||
KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
||||||
KEY `is_recursive` (`is_recursive`)
|
KEY `is_recursive` (`is_recursive`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
|
||||||
CREATE TABLE `glpi_plugin_processmaker_taskcategories` (
|
CREATE TABLE `glpi_plugin_processmaker_taskcategories` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`plugin_processmaker_processes_id` INT(11) NOT NULL,
|
`plugin_processmaker_processes_id` INT(11) NOT NULL,
|
||||||
`pm_task_guid` VARCHAR(32) NOT NULL,
|
`pm_task_guid` VARCHAR(32) NOT NULL,
|
||||||
`taskcategories_id` INT(11) NOT NULL,
|
`taskcategories_id` INT(11) NOT NULL,
|
||||||
`is_start` TINYINT(1) NOT NULL DEFAULT '0',
|
`is_start` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
|
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
`is_subprocess` TINYINT(1) NOT NULL DEFAULT '0',
|
`is_subprocess` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `pm_task_guid` (`pm_task_guid`),
|
UNIQUE INDEX `pm_task_guid` (`pm_task_guid`),
|
||||||
UNIQUE INDEX `items` (`taskcategories_id`),
|
UNIQUE INDEX `items` (`taskcategories_id`),
|
||||||
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`)
|
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`items_id` int(11) NOT NULL,
|
`items_id` int(11) NOT NULL,
|
||||||
`itemtype` varchar(32) NOT NULL,
|
`itemtype` varchar(32) NOT NULL,
|
||||||
`plugin_processmaker_cases_id` int(11) NOT NULL,
|
`plugin_processmaker_cases_id` int(11) NOT NULL,
|
||||||
`plugin_processmaker_taskcategories_id` int(11) NOT NULL,
|
`plugin_processmaker_taskcategories_id` int(11) NOT NULL,
|
||||||
`del_index` int(11) NOT NULL,
|
`del_index` int(11) NOT NULL,
|
||||||
`del_thread` INT(11) NOT NULL,
|
`del_thread` INT(11) NOT NULL,
|
||||||
`del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN',
|
`del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`),
|
UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`),
|
||||||
UNIQUE KEY `items` (`itemtype`,`items_id`),
|
UNIQUE KEY `items` (`itemtype`,`items_id`),
|
||||||
KEY `del_thread_status` (`del_thread_status`)
|
KEY `del_thread_status` (`del_thread_status`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
|
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
|
||||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
|
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`pm_users_id` varchar(32) NOT NULL,
|
`pm_users_id` varchar(32) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `pm_users_id` (`pm_users_id`)
|
UNIQUE KEY `pm_users_id` (`pm_users_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
@@ -1,60 +1,64 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function processmaker_update() {
|
function processmaker_update() {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
// update from older versions
|
// update from older versions
|
||||||
// load config to get current version
|
// load config to get current version
|
||||||
if (!$DB->fieldExists("glpi_plugin_processmaker_configs", "db_version" )) {
|
if (!$DB->fieldExists("glpi_plugin_processmaker_configs", "db_version" )) {
|
||||||
$current_version = '2.4.1';
|
$current_version = '2.4.1';
|
||||||
} else {
|
} else {
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/inc/config.class.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/inc/config.class.php");
|
||||||
$config = PluginProcessmakerConfig::getInstance();
|
$config = PluginProcessmakerConfig::getInstance();
|
||||||
$current_version = $config->fields['db_version'];
|
$current_version = $config->fields['db_version'];
|
||||||
if (empty($current_version)) {
|
if (empty($current_version)) {
|
||||||
$current_version = '2.4.1';
|
$current_version = '2.4.1';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($current_version) {
|
switch ($current_version) {
|
||||||
case '2.4.1' :
|
case '2.4.1' :
|
||||||
// will upgrade any old versions (< 3.2.8) to 3.2.8
|
// will upgrade any old versions (< 3.2.8) to 3.2.8
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_to_3_2_8.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_to_3_2_8.php");
|
||||||
$new_version = update_to_3_2_8();
|
$new_version = update_to_3_2_8();
|
||||||
|
|
||||||
case '3.2.8' :
|
case '3.2.8' :
|
||||||
// will upgrade 3.2.8 to 3.2.9
|
// will upgrade 3.2.8 to 3.2.9
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_8_to_3_2_9.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_8_to_3_2_9.php");
|
||||||
$new_version = update_3_2_8_to_3_2_9();
|
$new_version = update_3_2_8_to_3_2_9();
|
||||||
|
|
||||||
case '3.2.9' :
|
case '3.2.9' :
|
||||||
// will upgrade 3.2.9 to 3.3.0
|
// will upgrade 3.2.9 to 3.3.0
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_9_to_3_3_0.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_9_to_3_3_0.php");
|
||||||
$new_version = update_3_2_9_to_3_3_0();
|
$new_version = update_3_2_9_to_3_3_0();
|
||||||
|
|
||||||
case '3.3.0' :
|
case '3.3.0' :
|
||||||
// will upgrade 3.3.0 to 3.3.1
|
// will upgrade 3.3.0 to 3.3.1
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_0_to_3_3_1.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_0_to_3_3_1.php");
|
||||||
$new_version = update_3_3_0_to_3_3_1();
|
$new_version = update_3_3_0_to_3_3_1();
|
||||||
case '3.3.1' :
|
case '3.3.1' :
|
||||||
// will upgrade 3.3.1 to 3.3.8
|
// will upgrade 3.3.1 to 3.3.8
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_1_to_3_3_8.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_1_to_3_3_8.php");
|
||||||
$new_version = update_3_3_1_to_3_3_8();
|
$new_version = update_3_3_1_to_3_3_8();
|
||||||
case '3.3.8' :
|
case '3.3.8' :
|
||||||
// will upgrade 3.3.8 to 3.4.9
|
// will upgrade 3.3.8 to 3.4.9
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_8_to_3_4_9.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_8_to_3_4_9.php");
|
||||||
$new_version = update_3_3_8_to_3_4_9();
|
$new_version = update_3_3_8_to_3_4_9();
|
||||||
case '3.4.9' :
|
case '3.4.9' :
|
||||||
// will upgrade 3.4.9 to 3.4.10
|
// will upgrade 3.4.9 to 3.4.10
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_9_to_3_4_10.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_9_to_3_4_10.php");
|
||||||
$new_version = update_3_4_9_to_3_4_10();
|
$new_version = update_3_4_9_to_3_4_10();
|
||||||
}
|
case '3.4.10' :
|
||||||
|
// will upgrade 3.4.10 to 4.0.0
|
||||||
if (isset($new_version)) {
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_10_to_4_0_0.php");
|
||||||
// end update by updating the db version number
|
$new_version = update_3_4_10_to_4_0_0();
|
||||||
$query = "UPDATE `glpi_plugin_processmaker_configs` SET `db_version` = '$new_version' WHERE `id` = 1;";
|
}
|
||||||
|
|
||||||
$DB->query($query) or die("error when updating db_version field in glpi_plugin_processmaker_configs" . $DB->error());
|
if (isset($new_version) && $new_version !== false) {
|
||||||
}
|
// end update by updating the db version number
|
||||||
|
$query = "UPDATE `glpi_plugin_processmaker_configs` SET `db_version` = '$new_version' WHERE `id` = 1;";
|
||||||
}
|
|
||||||
|
$DB->query($query) or die("error when updating db_version field in glpi_plugin_processmaker_configs" . $DB->error());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
14
install/update_3_4_10_to_4_0_0.php
Normal file
14
install/update_3_4_10_to_4_0_0.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function update_3_4_10_to_4_0_0() {
|
||||||
|
global $DB;
|
||||||
|
|
||||||
|
// needs to change password encryption
|
||||||
|
$pmglpikey = new PluginProcessmakerGlpikey;
|
||||||
|
|
||||||
|
if ($pmglpikey->migratePasswords()) {
|
||||||
|
return '4.0.0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
BIN
locales/cs_CZ.mo
BIN
locales/cs_CZ.mo
Binary file not shown.
363
locales/cs_CZ.po
363
locales/cs_CZ.po
@@ -2,7 +2,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: processmaker-plugin\n"
|
"Project-Id-Version: processmaker-plugin\n"
|
||||||
"POT-Creation-Date: 2018-08-06 14:32+0200\n"
|
"POT-Creation-Date: 2018-08-06 14:32+0200\n"
|
||||||
"PO-Revision-Date: 2018-08-06 14:43+0200\n"
|
"PO-Revision-Date: 2021-02-15 14:25\n"
|
||||||
"Last-Translator: tomolimo\n"
|
"Last-Translator: tomolimo\n"
|
||||||
"Language-Team: Czech\n"
|
"Language-Team: Czech\n"
|
||||||
"Language: cs_CZ\n"
|
"Language: cs_CZ\n"
|
||||||
@@ -12,11 +12,7 @@ msgstr ""
|
|||||||
"X-Generator: Poedit 2.1.1\n"
|
"X-Generator: Poedit 2.1.1\n"
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
|
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
|
||||||
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;"
|
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
||||||
"_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
|
||||||
"X-Crowdin-Project: processmaker-plugin\n"
|
|
||||||
"X-Crowdin-Language: cs\n"
|
|
||||||
"X-Crowdin-File: /3.3.0/source.po\n"
|
|
||||||
"X-Poedit-SearchPath-0: ajax\n"
|
"X-Poedit-SearchPath-0: ajax\n"
|
||||||
"X-Poedit-SearchPath-1: front\n"
|
"X-Poedit-SearchPath-1: front\n"
|
||||||
"X-Poedit-SearchPath-2: inc\n"
|
"X-Poedit-SearchPath-2: inc\n"
|
||||||
@@ -24,75 +20,80 @@ msgstr ""
|
|||||||
"X-Poedit-SearchPath-4: js\n"
|
"X-Poedit-SearchPath-4: js\n"
|
||||||
"X-Poedit-SearchPath-5: hook.php\n"
|
"X-Poedit-SearchPath-5: hook.php\n"
|
||||||
"X-Poedit-SearchPath-6: setup.php\n"
|
"X-Poedit-SearchPath-6: setup.php\n"
|
||||||
|
"X-Crowdin-Project: processmaker-plugin\n"
|
||||||
|
"X-Crowdin-Project-ID: 310131\n"
|
||||||
|
"X-Crowdin-Language: cs\n"
|
||||||
|
"X-Crowdin-File: /3.3.0/source.po\n"
|
||||||
|
"X-Crowdin-File-ID: 15\n"
|
||||||
|
|
||||||
#: ajax/task_users.php:25
|
#: ajax/task_users.php:25
|
||||||
msgid "Re-assign task to"
|
msgid "Re-assign task to"
|
||||||
msgstr "Úkol předat"
|
msgstr "Úkol předat"
|
||||||
|
|
||||||
#: ajax/task_users.php:45
|
#: ajax/task_users.php:45
|
||||||
msgid "Re-assign"
|
msgid "Re-assign"
|
||||||
msgstr "Předat"
|
msgstr "Předat"
|
||||||
|
|
||||||
#: front/case.form.php:35
|
#: front/case.form.php:35
|
||||||
msgid "Case has been deleted!"
|
msgid "Case has been deleted!"
|
||||||
msgstr "Případ byl smazán!"
|
msgstr "Případ byl smazán!"
|
||||||
|
|
||||||
#: front/case.form.php:37
|
#: front/case.form.php:37
|
||||||
msgid "Unable to delete case!"
|
msgid "Unable to delete case!"
|
||||||
msgstr "Případ se nedaří smazat!"
|
msgstr "Případ se nedaří smazat!"
|
||||||
|
|
||||||
#: front/case.form.php:50
|
#: front/case.form.php:50
|
||||||
msgid "Case has been cancelled!"
|
msgid "Case has been cancelled!"
|
||||||
msgstr "Případ byl zrušen!"
|
msgstr "Případ byl zrušen!"
|
||||||
|
|
||||||
#: front/case.form.php:52 front/case.form.php:55
|
#: front/case.form.php:52 front/case.form.php:55
|
||||||
msgid "Unable to cancel case!"
|
msgid "Unable to cancel case!"
|
||||||
msgstr "Případ se nedaří zrušit!"
|
msgstr "Případ se nedaří zrušit!"
|
||||||
|
|
||||||
#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:1018
|
#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:1018
|
||||||
msgid "Process cases"
|
msgid "Process cases"
|
||||||
msgstr "Případy procesu"
|
msgstr "Případy procesu"
|
||||||
|
|
||||||
#: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5
|
#: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5
|
||||||
#: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143
|
#: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143
|
||||||
#: inc/config.class.php:50 inc/config.class.php:354 inc/process.class.php:393
|
#: inc/config.class.php:50 inc/config.class.php:354 inc/process.class.php:393
|
||||||
#: inc/profile.class.php:52 inc/profile.class.php:83
|
#: inc/profile.class.php:52 inc/profile.class.php:83
|
||||||
msgid "ProcessMaker"
|
msgid "ProcessMaker"
|
||||||
msgstr "ProcessMaker"
|
msgstr "ProcessMaker"
|
||||||
|
|
||||||
#: front/processmaker.form.php:85
|
#: front/processmaker.form.php:85
|
||||||
msgid "Task re-assigned!"
|
msgid "Task re-assigned!"
|
||||||
msgstr "Úkol předán!"
|
msgstr "Úkol předán!"
|
||||||
|
|
||||||
#: front/processmaker.form.php:87
|
#: front/processmaker.form.php:87
|
||||||
msgid "Error re-assigning task: "
|
msgid "Error re-assigning task: "
|
||||||
msgstr "Chyba při předávání úkolu: "
|
msgstr "Chyba při předávání úkolu: "
|
||||||
|
|
||||||
#: front/processmaker.form.php:90
|
#: front/processmaker.form.php:90
|
||||||
msgid "Task already assigned to this person!"
|
msgid "Task already assigned to this person!"
|
||||||
msgstr "Úkol už je této osobě přiřazen!"
|
msgstr "Úkol už je této osobě přiřazen!"
|
||||||
|
|
||||||
#: front/processmaker.helpdesk.form.php:21
|
#: front/processmaker.helpdesk.form.php:21
|
||||||
msgid "Process - Case"
|
msgid "Process - Case"
|
||||||
msgstr "Proces – případ"
|
msgstr "Proces – případ"
|
||||||
|
|
||||||
#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:605
|
#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:605
|
||||||
msgid "Select the process you want to add"
|
msgid "Select the process you want to add"
|
||||||
msgstr "Vyberte proces který chcete přidat"
|
msgstr "Vyberte proces který chcete přidat"
|
||||||
|
|
||||||
#: hook.php:31 inc/taskcategory.class.php:98
|
#: hook.php:31 inc/taskcategory.class.php:98
|
||||||
msgid "Synchronize Task List"
|
msgid "Synchronize Task List"
|
||||||
msgstr "Synchronizovat seznam úkolů"
|
msgstr "Synchronizovat seznam úkolů"
|
||||||
|
|
||||||
#: hook.php:158 inc/case.class.php:77
|
#: hook.php:158 inc/case.class.php:77
|
||||||
msgid "Case"
|
msgid "Case"
|
||||||
msgstr "Případ"
|
msgstr "Případ"
|
||||||
|
|
||||||
#: hook.php:158 inc/case.class.php:586 inc/case.class.php:1062
|
#: hook.php:158 inc/case.class.php:586 inc/case.class.php:1062
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr "Stav"
|
msgstr "Stav"
|
||||||
|
|
||||||
#: inc/case.class.php:23 inc/case.class.php:90 inc/case.class.php:92
|
#: inc/case.class.php:23 inc/case.class.php:90 inc/case.class.php:92
|
||||||
msgid "Process case"
|
msgid "Process case"
|
||||||
msgid_plural "Process cases"
|
msgid_plural "Process cases"
|
||||||
msgstr[0] "Případ procesu"
|
msgstr[0] "Případ procesu"
|
||||||
@@ -100,465 +101,462 @@ msgstr[1] "Případy procesu"
|
|||||||
msgstr[2] "Případy procesu"
|
msgstr[2] "Případy procesu"
|
||||||
msgstr[3] "Případy procesu"
|
msgstr[3] "Případy procesu"
|
||||||
|
|
||||||
#: inc/case.class.php:80
|
#: inc/case.class.php:80
|
||||||
msgid "Sub-case"
|
msgid "Sub-case"
|
||||||
msgstr ""
|
msgstr "Dílčí případ"
|
||||||
|
|
||||||
#: inc/case.class.php:312
|
#: inc/case.class.php:312
|
||||||
msgid "Current task(s) properties"
|
msgid "Current task(s) properties"
|
||||||
msgstr "Vlastnosti stávajícího úkolu"
|
msgstr "Vlastnosti stávajícího úkolu"
|
||||||
|
|
||||||
#: inc/case.class.php:316 inc/task.class.php:263
|
#: inc/case.class.php:316 inc/task.class.php:263
|
||||||
msgid "Task"
|
msgid "Task"
|
||||||
msgstr "Úkol"
|
msgstr "Úkol"
|
||||||
|
|
||||||
#: inc/case.class.php:317 inc/task.class.php:264
|
#: inc/case.class.php:317 inc/task.class.php:264
|
||||||
msgid "Task guid"
|
msgid "Task guid"
|
||||||
msgstr "Nikde se neopakující identif. úkolu"
|
msgstr "Nikde se neopakující identif. úkolu"
|
||||||
|
|
||||||
#: inc/case.class.php:318 inc/task.class.php:265
|
#: inc/case.class.php:318 inc/task.class.php:265
|
||||||
msgid "Current user"
|
msgid "Current user"
|
||||||
msgstr "Stávající uživatel"
|
msgstr "Stávající uživatel"
|
||||||
|
|
||||||
#: inc/case.class.php:319 inc/task.class.php:266
|
#: inc/case.class.php:319 inc/task.class.php:266
|
||||||
msgid "Task delegation date"
|
msgid "Task delegation date"
|
||||||
msgstr "Datum delegování úkolu"
|
msgstr "Datum delegování úkolu"
|
||||||
|
|
||||||
#: inc/case.class.php:341 inc/task.class.php:275
|
#: inc/case.class.php:341 inc/task.class.php:275
|
||||||
msgid "To be claimed"
|
msgid "To be claimed"
|
||||||
msgstr "Chcete-li uplatnit"
|
msgstr "Chcete-li uplatnit"
|
||||||
|
|
||||||
#: inc/case.class.php:377
|
#: inc/case.class.php:377
|
||||||
msgid "Sub-case properties"
|
msgid "Sub-case properties"
|
||||||
msgstr ""
|
msgstr "Vlastnosti dílčího případu"
|
||||||
|
|
||||||
#: inc/case.class.php:380
|
#: inc/case.class.php:380
|
||||||
msgid "Parent case properties"
|
msgid "Parent case properties"
|
||||||
msgstr ""
|
msgstr "Vlastnosti nadřazeného případu"
|
||||||
|
|
||||||
#: inc/case.class.php:382
|
#: inc/case.class.php:382
|
||||||
msgid "Case properties"
|
msgid "Case properties"
|
||||||
msgstr "Vlastnosti případu"
|
msgstr "Vlastnosti případu"
|
||||||
|
|
||||||
#: inc/case.class.php:387 inc/case.class.php:584 inc/case.class.php:1036
|
#: inc/case.class.php:387 inc/case.class.php:584 inc/case.class.php:1036
|
||||||
#: inc/process.class.php:548
|
#: inc/process.class.php:548
|
||||||
msgid "Process"
|
msgid "Process"
|
||||||
msgstr "Proces"
|
msgstr "Proces"
|
||||||
|
|
||||||
#: inc/case.class.php:388
|
#: inc/case.class.php:388
|
||||||
msgid "Case title"
|
msgid "Case title"
|
||||||
msgstr "Název případu"
|
msgstr "Název případu"
|
||||||
|
|
||||||
#: inc/case.class.php:389
|
#: inc/case.class.php:389
|
||||||
msgid "Case number"
|
msgid "Case number"
|
||||||
msgstr "Číslo případu"
|
msgstr "Číslo případu"
|
||||||
|
|
||||||
#: inc/case.class.php:390
|
#: inc/case.class.php:390
|
||||||
msgid "Case status"
|
msgid "Case status"
|
||||||
msgstr "Stav případu"
|
msgstr "Stav případu"
|
||||||
|
|
||||||
#: inc/case.class.php:391
|
#: inc/case.class.php:391
|
||||||
msgid "Case guid"
|
msgid "Case guid"
|
||||||
msgstr "Nikde se neopakující identif. případu"
|
msgstr "Nikde se neopakující identif. případu"
|
||||||
|
|
||||||
#: inc/case.class.php:392
|
#: inc/case.class.php:392
|
||||||
msgid "Creator"
|
msgid "Creator"
|
||||||
msgstr "Vytvořil"
|
msgstr "Vytvořil"
|
||||||
|
|
||||||
#: inc/case.class.php:393
|
#: inc/case.class.php:393
|
||||||
msgid "Creation date"
|
msgid "Creation date"
|
||||||
msgstr "Datum vytvoření"
|
msgstr "Datum vytvoření"
|
||||||
|
|
||||||
#: inc/case.class.php:394
|
#: inc/case.class.php:394
|
||||||
msgid "Last update"
|
msgid "Last update"
|
||||||
msgstr "Poslední úprava"
|
msgstr "Poslední úprava"
|
||||||
|
|
||||||
#: inc/case.class.php:479
|
#: inc/case.class.php:479
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Case is linked to a %1s"
|
msgid "Case is linked to a %1s"
|
||||||
msgstr ""
|
msgstr "Případ je propojen s %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:481
|
#: inc/case.class.php:481
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Sub-case is linked to a %1s"
|
msgid "Sub-case is linked to a %1s"
|
||||||
msgstr ""
|
msgstr "Dílčí případ je propojen s %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:506
|
#: inc/case.class.php:506
|
||||||
msgid "Case cancellation"
|
msgid "Case cancellation"
|
||||||
msgstr "Zrušení případu"
|
msgstr "Zrušení případu"
|
||||||
|
|
||||||
#: inc/case.class.php:507
|
#: inc/case.class.php:507
|
||||||
msgid "Cancel case"
|
msgid "Cancel case"
|
||||||
msgstr "Zrušit případ"
|
msgstr "Zrušit případ"
|
||||||
|
|
||||||
#: inc/case.class.php:511
|
#: inc/case.class.php:511
|
||||||
msgid "Confirm cancellation?"
|
msgid "Confirm cancellation?"
|
||||||
msgstr "Potvrdit zrušení?"
|
msgstr "Potvrdit zrušení?"
|
||||||
|
|
||||||
#: inc/case.class.php:511 inc/profile.class.php:23
|
#: inc/case.class.php:511 inc/profile.class.php:23
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Storno"
|
msgstr "Storno"
|
||||||
|
|
||||||
#: inc/case.class.php:532
|
#: inc/case.class.php:532
|
||||||
msgid "Case deletion"
|
msgid "Case deletion"
|
||||||
msgstr "Mazání případu"
|
msgstr "Mazání případu"
|
||||||
|
|
||||||
#: inc/case.class.php:533
|
#: inc/case.class.php:533
|
||||||
msgid "Delete case"
|
msgid "Delete case"
|
||||||
msgstr "Smazat případ"
|
msgstr "Smazat případ"
|
||||||
|
|
||||||
#: inc/case.class.php:585 inc/case.class.php:1029
|
#: inc/case.class.php:585 inc/case.class.php:1029
|
||||||
msgid "Title"
|
msgid "Title"
|
||||||
msgstr "Titulek"
|
msgstr "Titulek"
|
||||||
|
|
||||||
#: inc/case.class.php:587 inc/case.class.php:1070
|
#: inc/case.class.php:587 inc/case.class.php:1070
|
||||||
msgid "Sub-case of"
|
msgid "Sub-case of"
|
||||||
msgstr ""
|
msgstr "Dílčí případ z"
|
||||||
|
|
||||||
#: inc/case.class.php:602
|
#: inc/case.class.php:602
|
||||||
msgid "Add a new case"
|
msgid "Add a new case"
|
||||||
msgstr "Přidat nový případ"
|
msgstr "Přidat nový případ"
|
||||||
|
|
||||||
#: inc/case.class.php:995
|
#: inc/case.class.php:995
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Draft"
|
msgid "Draft"
|
||||||
msgstr "Koncept"
|
msgstr "Koncept"
|
||||||
|
|
||||||
#: inc/case.class.php:996
|
#: inc/case.class.php:996
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "To do"
|
msgid "To do"
|
||||||
msgstr "Dodělat"
|
msgstr "Dodělat"
|
||||||
|
|
||||||
#: inc/case.class.php:997
|
#: inc/case.class.php:997
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Completed"
|
msgid "Completed"
|
||||||
msgstr "Dokončeno"
|
msgstr "Dokončeno"
|
||||||
|
|
||||||
#: inc/case.class.php:998
|
#: inc/case.class.php:998
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Cancelled"
|
msgid "Cancelled"
|
||||||
msgstr "Zrušeno"
|
msgstr "Zrušeno"
|
||||||
|
|
||||||
#: inc/case.class.php:1022
|
#: inc/case.class.php:1022
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr "Identif."
|
msgstr "Identif."
|
||||||
|
|
||||||
#: inc/case.class.php:1049
|
#: inc/case.class.php:1049
|
||||||
msgid "Item"
|
msgid "Item"
|
||||||
msgstr "Položka"
|
msgstr "Položka"
|
||||||
|
|
||||||
#: inc/case.class.php:1056
|
#: inc/case.class.php:1056
|
||||||
msgid "Item entity"
|
msgid "Item entity"
|
||||||
msgstr "Entita položky"
|
msgstr "Entita položky"
|
||||||
|
|
||||||
#: inc/casechangelog.class.php:35
|
#: inc/casechangelog.class.php:35
|
||||||
msgid "Change log"
|
msgid "Change log"
|
||||||
msgstr "Seznam změn"
|
msgstr "Seznam změn"
|
||||||
|
|
||||||
#: inc/casedynaform.class.php:80
|
#: inc/casedynaform.class.php:80
|
||||||
msgid "Dynaforms"
|
msgid "Dynaforms"
|
||||||
msgstr "Dynamické formuláře"
|
msgstr "Dynamické formuláře"
|
||||||
|
|
||||||
#: inc/casehistory.class.php:35
|
#: inc/casehistory.class.php:35
|
||||||
msgid "History"
|
msgid "History"
|
||||||
msgstr "Historie"
|
msgstr "Historie"
|
||||||
|
|
||||||
#: inc/caselink.class.php:51
|
#: inc/caselink.class.php:51
|
||||||
msgid "Case-links"
|
msgid "Case-links"
|
||||||
msgstr "Propojení případů"
|
msgstr "Propojení případů"
|
||||||
|
|
||||||
#: inc/caselink.class.php:53
|
#: inc/caselink.class.php:53
|
||||||
msgid "Case-link"
|
msgid "Case-link"
|
||||||
msgstr "Propojení případu"
|
msgstr "Propojení případu"
|
||||||
|
|
||||||
#: inc/caselink.class.php:75 inc/caselink.class.php:165
|
#: inc/caselink.class.php:75 inc/caselink.class.php:165
|
||||||
msgid "External data"
|
msgid "External data"
|
||||||
msgstr "Externí data"
|
msgstr "Externí data"
|
||||||
|
|
||||||
#: inc/caselink.class.php:80 inc/caselink.class.php:171
|
#: inc/caselink.class.php:80 inc/caselink.class.php:171
|
||||||
msgid "Self"
|
msgid "Self"
|
||||||
msgstr "Samo"
|
msgstr "Samo"
|
||||||
|
|
||||||
#: inc/caselink.class.php:85 inc/caselink.class.php:189
|
#: inc/caselink.class.php:85 inc/caselink.class.php:189
|
||||||
msgid "Source task GUID"
|
msgid "Source task GUID"
|
||||||
msgstr "Nikde se neopakující identif. zdrojového úkolu"
|
msgstr "Nikde se neopakující identif. zdrojového úkolu"
|
||||||
|
|
||||||
#: inc/caselink.class.php:93 inc/caselink.class.php:195
|
#: inc/caselink.class.php:93 inc/caselink.class.php:195
|
||||||
msgid "Target task GUID"
|
msgid "Target task GUID"
|
||||||
msgstr "Nikde se neopakující identif. cílového úkolu"
|
msgstr "Nikde se neopakující identif. cílového úkolu"
|
||||||
|
|
||||||
#: inc/caselink.class.php:101 inc/caselink.class.php:207
|
#: inc/caselink.class.php:101 inc/caselink.class.php:207
|
||||||
msgid "Target process GUID"
|
msgid "Target process GUID"
|
||||||
msgstr "Nikde se neopakující identif. cílového procesu"
|
msgstr "Nikde se neopakující identif. cílového procesu"
|
||||||
|
|
||||||
#: inc/caselink.class.php:110 inc/caselink.class.php:201
|
#: inc/caselink.class.php:110 inc/caselink.class.php:201
|
||||||
msgid "Target dynaform GUID"
|
msgid "Target dynaform GUID"
|
||||||
msgstr "Nikde se neopakující identif. cílového dynamického formuláře"
|
msgstr "Nikde se neopakující identif. cílového dynamického formuláře"
|
||||||
|
|
||||||
#: inc/caselink.class.php:115 inc/caselink.class.php:213
|
#: inc/caselink.class.php:115 inc/caselink.class.php:213
|
||||||
msgid "Source condition"
|
msgid "Source condition"
|
||||||
msgstr "Stav zdroje"
|
msgstr "Stav zdroje"
|
||||||
|
|
||||||
#: inc/caselink.class.php:121 inc/caselink.class.php:177
|
#: inc/caselink.class.php:121 inc/caselink.class.php:177
|
||||||
msgid "Claim target task"
|
msgid "Claim target task"
|
||||||
msgstr "Převzít cílový úkol"
|
msgstr "Převzít cílový úkol"
|
||||||
|
|
||||||
#: inc/caselink.class.php:126 inc/caselink.class.php:183
|
#: inc/caselink.class.php:126 inc/caselink.class.php:183
|
||||||
msgid "External application JSON config"
|
msgid "External application JSON config"
|
||||||
msgstr "JSON nastavení externí aplikace"
|
msgstr "JSON nastavení externí aplikace"
|
||||||
|
|
||||||
#: inc/casemap.class.php:43
|
#: inc/casemap.class.php:43
|
||||||
msgid "Map"
|
msgid "Map"
|
||||||
msgstr "Mapa"
|
msgstr "Mapa"
|
||||||
|
|
||||||
#: inc/config.class.php:41
|
#: inc/config.class.php:41
|
||||||
msgid "ProcessMaker setup"
|
msgid "ProcessMaker setup"
|
||||||
msgstr "Nastavení ProcessMaker"
|
msgstr "Nastavení ProcessMaker"
|
||||||
|
|
||||||
#: inc/config.class.php:159
|
#: inc/config.class.php:159
|
||||||
msgid "Server URL (must be in same domain than GLPI)"
|
msgid "Server URL (must be in same domain than GLPI)"
|
||||||
msgstr "URL adresa serveru (je třeba, aby byla ze stejné domény jako GLPI)"
|
msgstr "URL adresa serveru (je třeba, aby byla ze stejné domény jako GLPI)"
|
||||||
|
|
||||||
#: inc/config.class.php:164
|
#: inc/config.class.php:164
|
||||||
msgid "Common domain with GLPI"
|
msgid "Common domain with GLPI"
|
||||||
msgstr "Společná doména s GLPI"
|
msgstr "Společná doména s GLPI"
|
||||||
|
|
||||||
#: inc/config.class.php:193
|
#: inc/config.class.php:193
|
||||||
msgid "None!"
|
msgid "None!"
|
||||||
msgstr "Žádná!"
|
msgstr "Žádná!"
|
||||||
|
|
||||||
#: inc/config.class.php:202
|
#: inc/config.class.php:202
|
||||||
msgid "Workspace Name"
|
msgid "Workspace Name"
|
||||||
msgstr "Název pracovního prostoru"
|
msgstr "Název pracovního prostoru"
|
||||||
|
|
||||||
#: inc/config.class.php:207
|
#: inc/config.class.php:207
|
||||||
msgid "Server administrator name"
|
msgid "Server administrator name"
|
||||||
msgstr "Uživatelské jméno správce serveru"
|
msgstr "Uživatelské jméno správce serveru"
|
||||||
|
|
||||||
#: inc/config.class.php:212
|
#: inc/config.class.php:212
|
||||||
msgid "Server administrator password"
|
msgid "Server administrator password"
|
||||||
msgstr "Heslo správce serveru"
|
msgstr "Heslo správce serveru"
|
||||||
|
|
||||||
#: inc/config.class.php:218 inc/config.class.php:258
|
#: inc/config.class.php:218 inc/config.class.php:258
|
||||||
msgid "Connection status"
|
msgid "Connection status"
|
||||||
msgstr "Stav spojení"
|
msgstr "Stav spojení"
|
||||||
|
|
||||||
#: inc/config.class.php:234
|
#: inc/config.class.php:234
|
||||||
msgid "SQL server setup"
|
msgid "SQL server setup"
|
||||||
msgstr "Nastavení SQL serveru"
|
msgstr "Nastavení SQL serveru"
|
||||||
|
|
||||||
#: inc/config.class.php:237
|
#: inc/config.class.php:237
|
||||||
msgid "SQL server (MariaDB or MySQL)"
|
msgid "SQL server (MariaDB or MySQL)"
|
||||||
msgstr "SQL server (MariaDB nebo MySQL)"
|
msgstr "SQL server (MariaDB nebo MySQL)"
|
||||||
|
|
||||||
#: inc/config.class.php:242
|
#: inc/config.class.php:242
|
||||||
msgid "Database name"
|
msgid "Database name"
|
||||||
msgstr "Název databáze"
|
msgstr "Název databáze"
|
||||||
|
|
||||||
#: inc/config.class.php:247
|
#: inc/config.class.php:247
|
||||||
msgid "SQL user"
|
msgid "SQL user"
|
||||||
msgstr "SQL uživatel"
|
msgstr "SQL uživatel"
|
||||||
|
|
||||||
#: inc/config.class.php:252
|
#: inc/config.class.php:252
|
||||||
msgid "SQL password"
|
msgid "SQL password"
|
||||||
msgstr "SQL heslo"
|
msgstr "SQL heslo"
|
||||||
|
|
||||||
#: inc/config.class.php:269
|
#: inc/config.class.php:269
|
||||||
msgid "Theme Name"
|
msgid "Theme Name"
|
||||||
msgstr "Název motivu vzhledu"
|
msgstr "Název motivu vzhledu"
|
||||||
|
|
||||||
#: inc/config.class.php:275
|
#: inc/config.class.php:275
|
||||||
msgid "Main Task Category (edit to change name)"
|
msgid "Main Task Category (edit to change name)"
|
||||||
msgstr "Hlavní kategorie úkolu (pro změnu názvu upravte)"
|
msgstr "Hlavní kategorie úkolu (pro změnu názvu upravte)"
|
||||||
|
|
||||||
#: inc/config.class.php:282
|
#: inc/config.class.php:282
|
||||||
msgid "Task Writer (edit to change name)"
|
msgid "Task Writer (edit to change name)"
|
||||||
msgstr "Úkol zapsal (pro změnu jména upravte)"
|
msgstr "Úkol zapsal (pro změnu jména upravte)"
|
||||||
|
|
||||||
#: inc/config.class.php:302
|
#: inc/config.class.php:302
|
||||||
msgid "Group in ProcessMaker which will contain all GLPI users"
|
msgid "Group in ProcessMaker which will contain all GLPI users"
|
||||||
msgstr "Skupina v ProcessMaker která bude obsahovat všechny uživatele z GLPI"
|
msgstr "Skupina v ProcessMaker která bude obsahovat všechny uživatele z GLPI"
|
||||||
|
|
||||||
#: inc/config.class.php:331
|
#: inc/config.class.php:331
|
||||||
msgid "Processmaker system information"
|
msgid "Processmaker system information"
|
||||||
msgstr "Systémové informace o Processmaker"
|
msgstr "Systémové informace o Processmaker"
|
||||||
|
|
||||||
#: inc/config.class.php:334 inc/config.class.php:344
|
#: inc/config.class.php:334 inc/config.class.php:344
|
||||||
msgid "Version"
|
msgid "Version"
|
||||||
msgstr "Verze"
|
msgstr "Verze"
|
||||||
|
|
||||||
#: inc/config.class.php:335
|
#: inc/config.class.php:335
|
||||||
msgid "Web server"
|
msgid "Web server"
|
||||||
msgstr "Webový server"
|
msgstr "Webový server"
|
||||||
|
|
||||||
#: inc/config.class.php:336
|
#: inc/config.class.php:336
|
||||||
msgid "Server name"
|
msgid "Server name"
|
||||||
msgstr "Název serveru"
|
msgstr "Název serveru"
|
||||||
|
|
||||||
#: inc/config.class.php:337
|
#: inc/config.class.php:337
|
||||||
msgid "PHP version"
|
msgid "PHP version"
|
||||||
msgstr "Verze PHP"
|
msgstr "Verze PHP"
|
||||||
|
|
||||||
#: inc/config.class.php:338
|
#: inc/config.class.php:338
|
||||||
msgid "DB version"
|
msgid "DB version"
|
||||||
msgstr "Verze databáze"
|
msgstr "Verze databáze"
|
||||||
|
|
||||||
#: inc/config.class.php:339
|
#: inc/config.class.php:339
|
||||||
msgid "DB server IP"
|
msgid "DB server IP"
|
||||||
msgstr "IP adresa webového serveru"
|
msgstr "IP adresa webového serveru"
|
||||||
|
|
||||||
#: inc/config.class.php:340
|
#: inc/config.class.php:340
|
||||||
msgid "DB name"
|
msgid "DB name"
|
||||||
msgstr "Název databáze"
|
msgstr "Název databáze"
|
||||||
|
|
||||||
#: inc/config.class.php:341
|
#: inc/config.class.php:341
|
||||||
msgid "User browser"
|
msgid "User browser"
|
||||||
msgstr "Prohlížeč uživatele"
|
msgstr "Prohlížeč uživatele"
|
||||||
|
|
||||||
#: inc/config.class.php:342
|
#: inc/config.class.php:342
|
||||||
msgid "User IP"
|
msgid "User IP"
|
||||||
msgstr "IP adresa uživatele"
|
msgstr "IP adresa uživatele"
|
||||||
|
|
||||||
#: inc/config.class.php:344
|
#: inc/config.class.php:344
|
||||||
msgid "Not yet!"
|
msgid "Not yet!"
|
||||||
msgstr "Ještě ne!"
|
msgstr "Ještě ne!"
|
||||||
|
|
||||||
#: inc/process.class.php:350
|
#: inc/process.class.php:350
|
||||||
msgid "Synchronize Process List"
|
msgid "Synchronize Process List"
|
||||||
msgstr "Synchronizovat seznam procesů"
|
msgstr "Synchronizovat seznam procesů"
|
||||||
|
|
||||||
#: inc/process.class.php:427 inc/process.class.php:589
|
#: inc/process.class.php:427 inc/process.class.php:589
|
||||||
msgid "Process GUID"
|
msgid "Process GUID"
|
||||||
msgstr "Nikde se neopakující identif. procesu"
|
msgstr "Nikde se neopakující identif. procesu"
|
||||||
|
|
||||||
#: inc/process.class.php:433
|
#: inc/process.class.php:433
|
||||||
msgid "Process type"
|
msgid "Process type"
|
||||||
msgstr ""
|
msgstr "Typ procesu"
|
||||||
|
|
||||||
#: inc/process.class.php:439
|
#: inc/process.class.php:439
|
||||||
msgid "Hide case num. & title"
|
msgid "Hide case num. & title"
|
||||||
msgstr ""
|
msgstr "Skrýt číslo případu a nadpis"
|
||||||
|
|
||||||
#: inc/process.class.php:445
|
#: inc/process.class.php:445
|
||||||
msgid "Insert Task Category"
|
msgid "Insert Task Category"
|
||||||
msgstr "Vložit kategorii úkolu"
|
msgstr "Vložit kategorii úkolu"
|
||||||
|
|
||||||
#: inc/process.class.php:457
|
#: inc/process.class.php:457
|
||||||
msgid "Ticket type (self-service)"
|
msgid "Ticket type (self-service)"
|
||||||
msgstr "Typ požadavku (samoobslužné)"
|
msgstr "Typ požadavku (samoobslužné)"
|
||||||
|
|
||||||
#: inc/process.class.php:464 inc/process.class.php:609
|
#: inc/process.class.php:464 inc/process.class.php:609
|
||||||
msgid "Visible in Incident for Central interface"
|
msgid "Visible in Incident for Central interface"
|
||||||
msgstr ""
|
msgstr "Viditelné v incidentu pro ústřední rozhraní"
|
||||||
|
|
||||||
#: inc/process.class.php:470 inc/process.class.php:614
|
#: inc/process.class.php:470 inc/process.class.php:614
|
||||||
msgid "Visible in Request for Central interface"
|
msgid "Visible in Request for Central interface"
|
||||||
msgstr ""
|
msgstr "Viditelné v požadavku pro ústřední rozhraní"
|
||||||
|
|
||||||
#: inc/process.class.php:476 inc/process.class.php:666
|
#: inc/process.class.php:476 inc/process.class.php:666
|
||||||
msgid "Visible in Change"
|
msgid "Visible in Change"
|
||||||
msgstr ""
|
msgstr "Viditelné ve změně"
|
||||||
|
|
||||||
#: inc/process.class.php:482 inc/process.class.php:671
|
#: inc/process.class.php:482 inc/process.class.php:671
|
||||||
msgid "Visible in Problem"
|
msgid "Visible in Problem"
|
||||||
msgstr ""
|
msgstr "Viditelné v problému"
|
||||||
|
|
||||||
#: inc/process.class.php:519
|
#: inc/process.class.php:519
|
||||||
msgctxt "process_type"
|
msgctxt "process_type"
|
||||||
msgid "Classic"
|
msgid "Classic"
|
||||||
msgstr "Klasický"
|
msgstr "Klasický"
|
||||||
|
|
||||||
#: inc/process.class.php:520
|
#: inc/process.class.php:520
|
||||||
msgctxt "process_type"
|
msgctxt "process_type"
|
||||||
msgid "BPMN"
|
msgid "BPMN"
|
||||||
msgstr "BPMN"
|
msgstr "BPMN"
|
||||||
|
|
||||||
#: inc/process.class.php:546
|
#: inc/process.class.php:546
|
||||||
msgid "Processes"
|
msgid "Processes"
|
||||||
msgstr "Procesy"
|
msgstr "Procesy"
|
||||||
|
|
||||||
#: inc/process.class.php:599
|
#: inc/process.class.php:599
|
||||||
msgid "Hide case number and title in task descriptions"
|
msgid "Hide case number and title in task descriptions"
|
||||||
msgstr "V popisech úkolů skrýt číslo a titulek případu"
|
msgstr "V popisech úkolů skrýt číslo a titulek případu"
|
||||||
|
|
||||||
#: inc/process.class.php:604
|
#: inc/process.class.php:604
|
||||||
msgid "Insert Task Category comments in Task Description"
|
msgid "Insert Task Category comments in Task Description"
|
||||||
msgstr "Vložit komentáře kategorie úkolu do jeho popisu"
|
msgstr "Vložit komentáře kategorie úkolu do jeho popisu"
|
||||||
|
|
||||||
#: inc/process.class.php:619
|
#: inc/process.class.php:619
|
||||||
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
||||||
msgstr ""
|
msgstr "ITIL kategorie pro samoobslužné rozhraní (ponecháním nevyplněného bude vypnuto)"
|
||||||
|
|
||||||
#: inc/process.class.php:646
|
#: inc/process.class.php:646
|
||||||
msgid "Type for Self-service interface"
|
msgid "Type for Self-service interface"
|
||||||
msgstr ""
|
msgstr "Typ samoobslužného rozhraní"
|
||||||
|
|
||||||
#: inc/process.class.php:676
|
#: inc/process.class.php:676
|
||||||
msgid "Process type (to be changed only if not up-to-date)"
|
msgid "Process type (to be changed only if not up-to-date)"
|
||||||
msgstr ""
|
msgstr "Typ procesu (který má být změněno pouze pokud není aktuální)"
|
||||||
|
|
||||||
#: inc/process_profile.class.php:26 inc/process_profile.class.php:45
|
#: inc/process_profile.class.php:26 inc/process_profile.class.php:45
|
||||||
msgid "Authorizations"
|
msgid "Authorizations"
|
||||||
msgstr "Oprávnění"
|
msgstr "Oprávnění"
|
||||||
|
|
||||||
#: inc/process_profile.class.php:179
|
#: inc/process_profile.class.php:179
|
||||||
msgid "Authorization not added: already existing!"
|
msgid "Authorization not added: already existing!"
|
||||||
msgstr "Oprávnění nepřidáno: už existuje!"
|
msgstr "Oprávnění nepřidáno: už existuje!"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:116 inc/processmaker.class.php:118
|
#: inc/processmaker.class.php:116 inc/processmaker.class.php:118
|
||||||
msgctxt "errors"
|
msgctxt "errors"
|
||||||
msgid "Error creating case!"
|
msgid "Error creating case!"
|
||||||
msgstr "Chyba při vytváření případu!"
|
msgstr "Chyba při vytváření případu!"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:117
|
#: inc/processmaker.class.php:117
|
||||||
msgctxt "errors"
|
msgctxt "errors"
|
||||||
msgid "Can't create case: no rights for it!"
|
msgid "Can't create case: no rights for it!"
|
||||||
msgstr "Případ se nedaří vytvořit: nedostatečná oprávnění!"
|
msgstr "Případ se nedaří vytvořit: nedostatečná oprávnění!"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:984
|
#: inc/processmaker.class.php:984
|
||||||
msgid "Syncs GLPI users and groups into ProcessMaker."
|
msgid "Syncs GLPI users and groups into ProcessMaker."
|
||||||
msgstr "Synchronizuje uživatele a skupiny z GLPI do ProcessMaker."
|
msgstr "Synchronizuje uživatele a skupiny z GLPI do ProcessMaker."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:986
|
#: inc/processmaker.class.php:986
|
||||||
msgid "Cleaning of orphan cases."
|
msgid "Cleaning of orphan cases."
|
||||||
msgstr "Čištění osiřelých případů."
|
msgstr "Čištění osiřelých případů."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:986
|
#: inc/processmaker.class.php:986
|
||||||
msgid "Number of days to keep orphan cases"
|
msgid "Number of days to keep orphan cases"
|
||||||
msgstr "Po kolik dnů ponechávat osiřelé případy"
|
msgstr "Po kolik dnů ponechávat osiřelé případy"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:988
|
#: inc/processmaker.class.php:988
|
||||||
msgid "To apply task actions between cases."
|
msgid "To apply task actions between cases."
|
||||||
msgstr "Pro uplatnění akcí úkolu mezi případy."
|
msgstr "Pro uplatnění akcí úkolu mezi případy."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:1696
|
#: inc/processmaker.class.php:1696
|
||||||
msgid "Case title: "
|
msgid "Case title: "
|
||||||
msgstr "Titulek případu: "
|
msgstr "Titulek případu: "
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2178
|
#: inc/processmaker.class.php:2178
|
||||||
msgid "A 'Case' is running!"
|
msgid "A 'Case' is running!"
|
||||||
msgstr "„Případ“ je v běhu!"
|
msgstr "„Případ“ je v běhu!"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2179
|
#: inc/processmaker.class.php:2179
|
||||||
msgid "You must manage it first (see 'Process - Case' tab)!"
|
msgid "You must manage it first (see 'Process - Case' tab)!"
|
||||||
msgstr "Nejprve je třeba toto spravovat (viz panel „Proces – případ“)!"
|
msgstr "Nejprve je třeba toto spravovat (viz panel „Proces – případ“)!"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:3038
|
#: inc/processmaker.class.php:3038
|
||||||
msgid ""
|
msgid "ProcessMaker plugin is under maintenance, please retry later, thank you."
|
||||||
"ProcessMaker plugin is under maintenance, please retry later, thank you."
|
msgstr "Na zásuvném modulu ProcessMaker probíhá údržba, zkuste to prosím později – děkujeme."
|
||||||
msgstr ""
|
|
||||||
"Na zásuvném modulu ProcessMaker probíhá údržba, zkuste to prosím později – "
|
|
||||||
"děkujeme."
|
|
||||||
|
|
||||||
#: inc/profile.class.php:17
|
#: inc/profile.class.php:17
|
||||||
msgid "Process configuration"
|
msgid "Process configuration"
|
||||||
msgstr "Nastavení procesu"
|
msgstr "Nastavení procesu"
|
||||||
|
|
||||||
#: inc/profile.class.php:21
|
#: inc/profile.class.php:21
|
||||||
msgid "Cases"
|
msgid "Cases"
|
||||||
msgstr "Případy"
|
msgstr "Případy"
|
||||||
|
|
||||||
#: inc/task.class.php:29
|
#: inc/task.class.php:29
|
||||||
msgid "Process case task"
|
msgid "Process case task"
|
||||||
msgid_plural "Process case tasks"
|
msgid_plural "Process case tasks"
|
||||||
msgstr[0] "Zpracovat úkoly případu"
|
msgstr[0] "Zpracovat úkoly případu"
|
||||||
@@ -566,47 +564,48 @@ msgstr[1] "Process case tasks"
|
|||||||
msgstr[2] "Process case tasks"
|
msgstr[2] "Process case tasks"
|
||||||
msgstr[3] "Process case tasks"
|
msgstr[3] "Process case tasks"
|
||||||
|
|
||||||
#: inc/task.class.php:258
|
#: inc/task.class.php:258
|
||||||
msgid "Sub-case task(s)"
|
msgid "Sub-case task(s)"
|
||||||
msgstr ""
|
msgstr "Úkoly dílčího případu"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31
|
#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31
|
||||||
msgid "Task List"
|
msgid "Task List"
|
||||||
msgstr "Seznam úkolů"
|
msgstr "Seznam úkolů"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:32
|
#: inc/taskcategory.class.php:32
|
||||||
msgid "Task name"
|
msgid "Task name"
|
||||||
msgstr "Název úkolu"
|
msgstr "Název úkolu"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:34 inc/taskcategory.class.php:60
|
#: inc/taskcategory.class.php:34 inc/taskcategory.class.php:60
|
||||||
msgid "Start"
|
msgid "Start"
|
||||||
msgstr "Spustit"
|
msgstr "Spustit"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:35
|
#: inc/taskcategory.class.php:35
|
||||||
msgid "Task GUID"
|
msgid "Task GUID"
|
||||||
msgstr "Nikde se neopakující identif. úkolu"
|
msgstr "Nikde se neopakující identif. úkolu"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:38 inc/taskcategory.class.php:78
|
#: inc/taskcategory.class.php:38 inc/taskcategory.class.php:78
|
||||||
msgid "Sub-process"
|
msgid "Sub-process"
|
||||||
msgstr "Dílčí proces"
|
msgstr "Dílčí proces"
|
||||||
|
|
||||||
#~ msgid "Case item"
|
#~ msgid "Case item"
|
||||||
#~ msgstr "Case item"
|
#~ msgstr "Case item"
|
||||||
|
|
||||||
#~ msgid "Subcase of"
|
#~ msgid "Subcase of"
|
||||||
#~ msgstr "Subcase of"
|
#~ msgstr "Subcase of"
|
||||||
|
|
||||||
#~ msgid "Project type"
|
#~ msgid "Project type"
|
||||||
#~ msgstr "Project type"
|
#~ msgstr "Project type"
|
||||||
|
|
||||||
#~ msgid "Hide case number and title"
|
#~ msgid "Hide case number and title"
|
||||||
#~ msgstr "Hide case number and title"
|
#~ msgstr "Hide case number and title"
|
||||||
|
|
||||||
#~ msgid "ITIL Category (self-service)"
|
#~ msgid "ITIL Category (self-service)"
|
||||||
#~ msgstr "ITIL Category (self-service)"
|
#~ msgstr "ITIL Category (self-service)"
|
||||||
|
|
||||||
#~ msgid "Project type (to be changed if not up-to-date)"
|
#~ msgid "Project type (to be changed if not up-to-date)"
|
||||||
#~ msgstr "Project type (to be changed if not up-to-date)"
|
#~ msgstr "Project type (to be changed if not up-to-date)"
|
||||||
|
|
||||||
|
#~ msgid "Plugin is under maintenance, please retry later, thank you."
|
||||||
|
#~ msgstr "Plugin is under maintenance, please retry later, thank you."
|
||||||
|
|
||||||
#~ msgid "Plugin is under maintenance, please retry later, thank you."
|
|
||||||
#~ msgstr "Plugin is under maintenance, please retry later, thank you."
|
|
||||||
|
|||||||
BIN
locales/en_GB.mo
BIN
locales/en_GB.mo
Binary file not shown.
635
locales/en_GB.po
635
locales/en_GB.po
File diff suppressed because it is too large
Load Diff
BIN
locales/fr_FR.mo
BIN
locales/fr_FR.mo
Binary file not shown.
458
locales/fr_FR.po
458
locales/fr_FR.po
@@ -1,18 +1,19 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: processmaker-plugin\n"
|
"Project-Id-Version: processmaker-plugin\n"
|
||||||
"POT-Creation-Date: 2020-07-13 09:41+0200\n"
|
"POT-Creation-Date: 2021-02-15 17:32+0100\n"
|
||||||
"PO-Revision-Date: 2020-07-13 11:02+0200\n"
|
"PO-Revision-Date: 2021-02-15 17:34+0100\n"
|
||||||
"Last-Translator: tomolimo\n"
|
"Last-Translator: tomolimo\n"
|
||||||
"Language-Team: French\n"
|
"Language-Team: French\n"
|
||||||
"Language: fr_FR\n"
|
"Language: fr_FR\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Poedit 2.3.1\n"
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;"
|
||||||
|
"_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
||||||
"X-Crowdin-Project: processmaker-plugin\n"
|
"X-Crowdin-Project: processmaker-plugin\n"
|
||||||
"X-Crowdin-Project-ID: 310131\n"
|
"X-Crowdin-Project-ID: 310131\n"
|
||||||
"X-Crowdin-Language: fr\n"
|
"X-Crowdin-Language: fr\n"
|
||||||
@@ -28,54 +29,63 @@ msgstr ""
|
|||||||
|
|
||||||
#: ajax/task_users.php:36
|
#: ajax/task_users.php:36
|
||||||
msgid "Re-assign task to"
|
msgid "Re-assign task to"
|
||||||
msgstr "Ré-affecter tâche à"
|
msgstr "Réattribuer la tâche à"
|
||||||
|
|
||||||
#: ajax/task_users.php:60 ajax/task_users.php:61 ajax/task_users.php:124
|
#: ajax/task_users.php:67 ajax/task_users.php:68 ajax/task_users.php:135
|
||||||
msgid "Re-assign"
|
msgid "Re-assign"
|
||||||
msgstr "Ré-affecter"
|
msgstr "Réattribuer"
|
||||||
|
|
||||||
#: ajax/task_users.php:110
|
#: ajax/task_users.php:100
|
||||||
#| msgid "Task already assigned to this person!"
|
msgid "Input at least 10 words in English to justify."
|
||||||
msgid "Task is already assigned to this user or group!"
|
msgstr "Entrez au moins 10 mots en anglais pour justifier."
|
||||||
msgstr "La tâche est déjà affectée à cet utilisateur (ou ce groupe) !"
|
|
||||||
|
|
||||||
#: ajax/task_users.php:110 ajax/task_users.php:122
|
#: ajax/task_users.php:118
|
||||||
#| msgid "Re-assign task to"
|
msgid "Task is already un-assigned!"
|
||||||
|
msgstr "L'attribution de cette tâche est déjà supprimée !"
|
||||||
|
|
||||||
|
#: ajax/task_users.php:118 ajax/task_users.php:120 ajax/task_users.php:133
|
||||||
msgid "Re-assign task"
|
msgid "Re-assign task"
|
||||||
msgstr "Ré-affecter tâche"
|
msgstr "Réattribuer la tâche"
|
||||||
|
|
||||||
#: ajax/task_users.php:114 ajax/task_users.php:119
|
#: ajax/task_users.php:120
|
||||||
#| msgid "Claim target task"
|
msgid "Task is already assigned to this user!"
|
||||||
|
msgstr "La tâche est déjà attribuée à cet utilisateur !"
|
||||||
|
|
||||||
|
#: ajax/task_users.php:125 ajax/task_users.php:130
|
||||||
msgid "Un-claim task"
|
msgid "Un-claim task"
|
||||||
msgstr "Annuler affectation de la tâche"
|
msgstr "Supprimer l'attribution de la tâche"
|
||||||
|
|
||||||
#: ajax/task_users.php:115
|
#: ajax/task_users.php:126
|
||||||
msgid "Please input reason to un-claim<br/>(task will be re-assigned to former group):"
|
msgid ""
|
||||||
msgstr "Saisir la raison pour l'annulation de l'affectation<br/>(la tâche sera ré-affectée au groupe précédent) :"
|
"Please input reason to un-claim<br/>(task will be re-assigned to former "
|
||||||
|
"group):"
|
||||||
|
msgstr ""
|
||||||
|
"Saisir la raison pour l'annulation de l'attribution<br/>(la tâche sera "
|
||||||
|
"réattribuée au groupe précédent) :"
|
||||||
|
|
||||||
#: ajax/task_users.php:116
|
#: ajax/task_users.php:127
|
||||||
msgid "Un-claim"
|
msgid "Un-claim"
|
||||||
msgstr "Annulation de l'affectation"
|
msgstr "Suppression de l'attribution"
|
||||||
|
|
||||||
#: ajax/task_users.php:119
|
#: ajax/task_users.php:130
|
||||||
msgid "Can\\'t un-assign Task!"
|
msgid "Can't un-assign task!"
|
||||||
msgstr "Annulation de l'affectation impossible !"
|
msgstr "Suppression de l'attribution impossible !"
|
||||||
|
|
||||||
#: ajax/task_users.php:123
|
|
||||||
msgid "Please input reason to re-assign:"
|
|
||||||
msgstr "Saisir la raison pour la ré-affectation :"
|
|
||||||
|
|
||||||
#: ajax/task_users.php:134
|
#: ajax/task_users.php:134
|
||||||
|
msgid "Please input reason to re-assign:"
|
||||||
|
msgstr "Saisir la raison pour la réattribution :"
|
||||||
|
|
||||||
|
#: ajax/task_users.php:145
|
||||||
msgid "Send reminder"
|
msgid "Send reminder"
|
||||||
msgstr "Envoyer un rappel"
|
msgstr "Envoyer un rappel"
|
||||||
|
|
||||||
#: front/case.form.php:32
|
#: front/case.form.php:32
|
||||||
msgid "Case has been deleted!"
|
msgid "Case has been deleted!"
|
||||||
msgstr "Le cas a été effacé !"
|
msgstr "Le cas a été supprimé !"
|
||||||
|
|
||||||
#: front/case.form.php:34
|
#: front/case.form.php:34
|
||||||
msgid "Unable to delete case!"
|
msgid "Unable to delete case!"
|
||||||
msgstr "Impossible d'effacer le cas !"
|
msgstr "Impossible de supprimer le cas !"
|
||||||
|
|
||||||
#: front/case.form.php:46
|
#: front/case.form.php:46
|
||||||
msgid "Case has been cancelled!"
|
msgid "Case has been cancelled!"
|
||||||
@@ -85,12 +95,12 @@ msgstr "Le cas a été annulé !"
|
|||||||
msgid "Unable to cancel case!"
|
msgid "Unable to cancel case!"
|
||||||
msgstr "Impossible d'annuler le cas !"
|
msgstr "Impossible d'annuler le cas !"
|
||||||
|
|
||||||
#: front/case.form.php:70 front/case.form.php:72 inc/case.class.php:1310
|
#: front/case.form.php:70 front/case.form.php:72 inc/case.class.php:1272
|
||||||
msgid "Process cases"
|
msgid "Process cases"
|
||||||
msgstr "Cas des processus"
|
msgstr "Cas des processus"
|
||||||
|
|
||||||
#: front/case.php:5 front/caselink.form.php:29 front/caselink.php:5
|
#: front/case.php:5 front/caselink.form.php:29 front/caselink.php:5
|
||||||
#: front/process.form.php:27 front/process.php:5 inc/caselink.class.php:157
|
#: front/process.form.php:27 front/process.php:5 inc/caselink.class.php:158
|
||||||
#: inc/config.class.php:50 inc/config.class.php:363 inc/process.class.php:409
|
#: inc/config.class.php:50 inc/config.class.php:363 inc/process.class.php:409
|
||||||
#: inc/profile.class.php:52 inc/profile.class.php:83
|
#: inc/profile.class.php:52 inc/profile.class.php:83
|
||||||
msgid "ProcessMaker"
|
msgid "ProcessMaker"
|
||||||
@@ -98,222 +108,235 @@ msgstr "ProcessMaker"
|
|||||||
|
|
||||||
#: front/processmaker.form.php:80
|
#: front/processmaker.form.php:80
|
||||||
msgid "Task re-assigned!"
|
msgid "Task re-assigned!"
|
||||||
msgstr "Tâche ré-affectée !"
|
msgstr "Tâche réattribuée !"
|
||||||
|
|
||||||
#: front/processmaker.form.php:82
|
#: front/processmaker.form.php:82
|
||||||
msgid "Error re-assigning task: "
|
msgid "Error re-assigning task: "
|
||||||
msgstr "Impossible de ré-affecter cette tâche :"
|
msgstr "Impossible de réattribuer cette tâche :"
|
||||||
|
|
||||||
#: front/processmaker.form.php:93
|
#: front/processmaker.form.php:93
|
||||||
#| msgid "Task name"
|
|
||||||
msgid "Task un-claimed!"
|
msgid "Task un-claimed!"
|
||||||
msgstr "Annulation de l'affectation de la tâche effectuée !"
|
msgstr "Annulation de l'attribution de la tâche effectuée !"
|
||||||
|
|
||||||
#: front/processmaker.form.php:95
|
#: front/processmaker.form.php:95
|
||||||
msgid "Can't un-claim task! Verify 'Assignement Rules' in the process definition."
|
msgid ""
|
||||||
msgstr "Annulation de l'affectation impossible ! Vérifiez les règles d'assignation dans la définition du Processus."
|
"Can't un-claim task! Verify 'Assignement Rules' in the process definition."
|
||||||
|
msgstr ""
|
||||||
|
"Annulation de l'attribution impossible ! Vérifiez les règles d'attribution "
|
||||||
|
"dans la définition du Processus."
|
||||||
|
|
||||||
#: front/processmaker.helpdesk.form.php:21
|
#: front/processmaker.helpdesk.form.php:21
|
||||||
msgid "Process - Case"
|
msgid "Process - Case"
|
||||||
msgstr "Processus - Cas"
|
msgstr "Processus - Cas"
|
||||||
|
|
||||||
#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:799
|
#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:761
|
||||||
msgid "Select the process you want to add"
|
msgid "Select the process you want to add"
|
||||||
msgstr "Choisir le processus à démarrer"
|
msgstr "Choisir le processus à ajouter"
|
||||||
|
|
||||||
#: hook.php:9 inc/taskcategory.class.php:214
|
#: hook.php:9 inc/taskcategory.class.php:214
|
||||||
msgid "Synchronize Task List"
|
msgid "Synchronize Task List"
|
||||||
msgstr "Synchroniser la liste des Tâches"
|
msgstr "Synchroniser la liste des tâches"
|
||||||
|
|
||||||
#: hook.php:76 inc/case.class.php:89
|
#: hook.php:76 inc/case.class.php:89
|
||||||
msgid "Case"
|
msgid "Case"
|
||||||
msgstr "Cas"
|
msgstr "Cas"
|
||||||
|
|
||||||
#: hook.php:76 inc/case.class.php:778 inc/case.class.php:1355
|
#: hook.php:76 inc/case.class.php:740 inc/case.class.php:1317
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr "Statut"
|
msgstr "Statut"
|
||||||
|
|
||||||
#: inc/case.class.php:25 inc/case.class.php:102 inc/case.class.php:104
|
#: inc/case.class.php:25
|
||||||
msgid "Process case"
|
msgid "Process case"
|
||||||
msgid_plural "Process cases"
|
msgid_plural "Process cases"
|
||||||
msgstr[0] "Cas du processus"
|
msgstr[0] "Cas du processus"
|
||||||
msgstr[1] "Cas des processus"
|
msgstr[1] "Cas du processus"
|
||||||
|
|
||||||
#: inc/case.class.php:92
|
#: inc/case.class.php:92
|
||||||
msgid "Sub-case"
|
msgid "Sub-case"
|
||||||
msgstr "Sous-cas"
|
msgstr "Sous-cas"
|
||||||
|
|
||||||
#: inc/case.class.php:303
|
#: inc/case.class.php:265
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>Task un-claimed!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been un-assigned from \"%s\" and assigned to \"%s\" group.<br/><b>Reason: </b>%s"
|
msgid ""
|
||||||
msgstr "<b>Annulation de l'affection de la tâche effectuée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été libérée de \"%s\" et assignée au groupe \"%s\".<br/><b>Motif : </b>%s"
|
"<b>Task un-claimed!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been "
|
||||||
|
"un-assigned from \"%s\" and assigned to \"%s\" group.<br/><b>Reason: </b>%s"
|
||||||
|
msgstr ""
|
||||||
|
"<b>Suppression de l'attribution de la tâche effectuée !</b><br/><b>Cas : </b>"
|
||||||
|
"%s<br/><b>Tâche : </b>\"%s\" a été libérée de \"%s\" et attribuée au groupe "
|
||||||
|
"\"%s\".<br/><b>Motif : </b>%s"
|
||||||
|
|
||||||
#: inc/case.class.php:420
|
#: inc/case.class.php:382
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>Task re-assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been re-assigned from \"%s\" to \"%s\".<br/><b>Reason: </b>%s"
|
msgid ""
|
||||||
msgstr "<b>Tâche ré-assignée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été ré-assignée de \"%s\" à \"%s\".<br/><b>Motif : </b>%s"
|
"<b>Task re-assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has "
|
||||||
|
"been re-assigned from \"%s\" to \"%s\".<br/><b>Reason: </b>%s"
|
||||||
|
msgstr ""
|
||||||
|
"<b>Tâche réattribuée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a "
|
||||||
|
"été réattribuée de \"%s\" à \"%s\".<br/><b>Motif : </b>%s"
|
||||||
|
|
||||||
#: inc/case.class.php:429
|
#: inc/case.class.php:391
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>Task assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been assigned to \"%s\".<br/><b>Reason: </b>%s"
|
msgid ""
|
||||||
msgstr "<b>Tâche assignée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été asignée à \"%s\".<br/><b>Motif : </b>%s"
|
"<b>Task assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been "
|
||||||
|
"assigned to \"%s\".<br/><b>Reason: </b>%s"
|
||||||
|
msgstr ""
|
||||||
|
"<b>Tâche attribuée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été "
|
||||||
|
"attribuée à \"%s\".<br/><b>Motif : </b>%s"
|
||||||
|
|
||||||
#: inc/case.class.php:510
|
#: inc/case.class.php:472
|
||||||
msgid "Current task(s) properties"
|
msgid "Current task(s) properties"
|
||||||
msgstr "Propriétés des tâches en cours"
|
msgstr "Propriétés des tâches en cours"
|
||||||
|
|
||||||
#: inc/case.class.php:514 inc/task.class.php:283
|
#: inc/case.class.php:476 inc/task.class.php:283
|
||||||
msgid "Task"
|
msgid "Task"
|
||||||
msgstr "Tâche"
|
msgstr "Tâche"
|
||||||
|
|
||||||
#: inc/case.class.php:515 inc/task.class.php:284
|
#: inc/case.class.php:477 inc/task.class.php:284 inc/taskcategory.class.php:43
|
||||||
|
#: inc/taskcategory.class.php:122
|
||||||
msgid "Task guid"
|
msgid "Task guid"
|
||||||
msgstr "Guid de la tâche"
|
msgstr "Guid de la tâche"
|
||||||
|
|
||||||
#: inc/case.class.php:516 inc/task.class.php:285
|
#: inc/case.class.php:478 inc/task.class.php:285
|
||||||
msgid "Current user"
|
msgid "Current user"
|
||||||
msgstr "Utilisateur actuel"
|
msgstr "Utilisateur actuel"
|
||||||
|
|
||||||
#: inc/case.class.php:517 inc/task.class.php:286
|
#: inc/case.class.php:479 inc/task.class.php:286
|
||||||
msgid "Task delegation date"
|
msgid "Task delegation date"
|
||||||
msgstr "Date de délégation de tâche"
|
msgstr "Date d'attribution de tâche"
|
||||||
|
|
||||||
#: inc/case.class.php:539 inc/task.class.php:295
|
#: inc/case.class.php:501 inc/task.class.php:295
|
||||||
msgid "To be claimed"
|
msgid "To be claimed"
|
||||||
msgstr "A réclamer"
|
msgstr "A réclamer"
|
||||||
|
|
||||||
#: inc/case.class.php:575
|
#: inc/case.class.php:537
|
||||||
msgid "Sub-case properties"
|
msgid "Sub-case properties"
|
||||||
msgstr "Propriétés du sous-cas"
|
msgstr "Propriétés du sous-cas"
|
||||||
|
|
||||||
#: inc/case.class.php:578
|
#: inc/case.class.php:540
|
||||||
msgid "Parent case properties"
|
msgid "Parent case properties"
|
||||||
msgstr "Propriétés du cas parent"
|
msgstr "Propriétés du cas parent"
|
||||||
|
|
||||||
#: inc/case.class.php:580
|
#: inc/case.class.php:542
|
||||||
msgid "Case properties"
|
msgid "Case properties"
|
||||||
msgstr "Propriétés du cas"
|
msgstr "Propriétés du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:585 inc/case.class.php:776 inc/case.class.php:1328
|
#: inc/case.class.php:547 inc/case.class.php:738 inc/case.class.php:1290
|
||||||
#: inc/process.class.php:576
|
#: inc/process.class.php:576
|
||||||
msgid "Process"
|
msgid "Process"
|
||||||
msgstr "Processus"
|
msgstr "Processus"
|
||||||
|
|
||||||
#: inc/case.class.php:586 inc/notificationtargetprocessmaker.class.php:64
|
#: inc/case.class.php:548 inc/notificationtargetprocessmaker.class.php:64
|
||||||
msgid "Case title"
|
msgid "Case title"
|
||||||
msgstr "Titre du cas"
|
msgstr "Titre du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:587
|
#: inc/case.class.php:549
|
||||||
msgid "Case number"
|
msgid "Case number"
|
||||||
msgstr "Numéro du cas"
|
msgstr "Numéro du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:588
|
#: inc/case.class.php:550
|
||||||
msgid "Case status"
|
msgid "Case status"
|
||||||
msgstr "Statut du cas"
|
msgstr "Statut du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:589
|
#: inc/case.class.php:551
|
||||||
msgid "Case guid"
|
msgid "Case guid"
|
||||||
msgstr "Guid du cas"
|
msgstr "Guid du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:590
|
#: inc/case.class.php:552
|
||||||
msgid "Creator"
|
msgid "Creator"
|
||||||
msgstr "Créateur"
|
msgstr "Créateur"
|
||||||
|
|
||||||
#: inc/case.class.php:591 inc/case.class.php:1370
|
#: inc/case.class.php:553 inc/case.class.php:1332
|
||||||
msgid "Creation date"
|
msgid "Creation date"
|
||||||
msgstr "Date de création"
|
msgstr "Date de création"
|
||||||
|
|
||||||
#: inc/case.class.php:592
|
#: inc/case.class.php:554
|
||||||
msgid "Last update"
|
msgid "Last update"
|
||||||
msgstr "Dernière mise à jour"
|
msgstr "Dernière mise à jour"
|
||||||
|
|
||||||
#: inc/case.class.php:675
|
#: inc/case.class.php:637
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Case is linked to a %1s"
|
msgid "Case is linked to a %1s"
|
||||||
msgstr "Le cas est lié à un %1s"
|
msgstr "Le cas est lié à un %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:677
|
#: inc/case.class.php:639
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Sub-case is linked to a %1s"
|
msgid "Sub-case is linked to a %1s"
|
||||||
msgstr "Le sous-cas est lié à un %1s"
|
msgstr "Le sous-cas est lié à un %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:698
|
#: inc/case.class.php:660
|
||||||
msgid "Case cancellation"
|
msgid "Case cancellation"
|
||||||
msgstr "Annulation du cas"
|
msgstr "Annulation du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:699
|
#: inc/case.class.php:661
|
||||||
msgid "Cancel case"
|
msgid "Cancel case"
|
||||||
msgstr "Annuler cas"
|
msgstr "Annuler cas"
|
||||||
|
|
||||||
#: inc/case.class.php:703
|
#: inc/case.class.php:665
|
||||||
msgid "Confirm cancellation?"
|
msgid "Confirm cancellation?"
|
||||||
msgstr "Confirmer l’annulation ?"
|
msgstr "Confirmer l’annulation ?"
|
||||||
|
|
||||||
#: inc/case.class.php:703 inc/profile.class.php:23
|
#: inc/case.class.php:665 inc/profile.class.php:23
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Annuler"
|
msgstr "Annuler"
|
||||||
|
|
||||||
#: inc/case.class.php:717
|
#: inc/case.class.php:679
|
||||||
msgid "Case deletion"
|
msgid "Case deletion"
|
||||||
msgstr "Suppression du cas"
|
msgstr "Suppression du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:777 inc/case.class.php:1321
|
#: inc/case.class.php:739 inc/case.class.php:1283
|
||||||
msgid "Title"
|
msgid "Title"
|
||||||
msgstr "Titre"
|
msgstr "Titre"
|
||||||
|
|
||||||
#: inc/case.class.php:779 inc/case.class.php:1362
|
#: inc/case.class.php:741 inc/case.class.php:1324
|
||||||
msgid "Sub-case of"
|
msgid "Sub-case of"
|
||||||
msgstr "Sous-cas de"
|
msgstr "Sous-cas de"
|
||||||
|
|
||||||
#: inc/case.class.php:796
|
#: inc/case.class.php:758
|
||||||
msgid "Add a new case"
|
msgid "Add a new case"
|
||||||
msgstr "Ajouter un nouveau cas"
|
msgstr "Ajouter un nouveau cas"
|
||||||
|
|
||||||
#: inc/case.class.php:1227
|
#: inc/case.class.php:1189
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Draft"
|
msgid "Draft"
|
||||||
msgstr "Brouillon"
|
msgstr "Brouillon"
|
||||||
|
|
||||||
#: inc/case.class.php:1228
|
#: inc/case.class.php:1190
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "To do"
|
msgid "To do"
|
||||||
msgstr "A faire"
|
msgstr "A faire"
|
||||||
|
|
||||||
#: inc/case.class.php:1229
|
#: inc/case.class.php:1191
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Completed"
|
msgid "Completed"
|
||||||
msgstr "Terminé"
|
msgstr "Terminé"
|
||||||
|
|
||||||
#: inc/case.class.php:1230
|
#: inc/case.class.php:1192
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Cancelled"
|
msgid "Cancelled"
|
||||||
msgstr "Annulé"
|
msgstr "Annulé"
|
||||||
|
|
||||||
#: inc/case.class.php:1314
|
#: inc/case.class.php:1276
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr "ID"
|
msgstr "ID"
|
||||||
|
|
||||||
#: inc/case.class.php:1335 inc/notificationtargetprocessmaker.class.php:72
|
#: inc/case.class.php:1297 inc/notificationtargetprocessmaker.class.php:72
|
||||||
#| msgid "Item entity"
|
|
||||||
msgid "Item type"
|
msgid "Item type"
|
||||||
msgstr "Type de l'item"
|
msgstr "Type de l'item"
|
||||||
|
|
||||||
#: inc/case.class.php:1342
|
#: inc/case.class.php:1304
|
||||||
msgid "Item"
|
msgid "Item"
|
||||||
msgstr "Item"
|
msgstr "Item"
|
||||||
|
|
||||||
#: inc/case.class.php:1349
|
#: inc/case.class.php:1311
|
||||||
msgid "Item entity"
|
msgid "Item entity"
|
||||||
msgstr "Entité de l'item"
|
msgstr "Entité de l'item"
|
||||||
|
|
||||||
#: inc/case.class.php:1379
|
#: inc/case.class.php:1341
|
||||||
#| msgid "Last update"
|
|
||||||
msgid "Last update date"
|
msgid "Last update date"
|
||||||
msgstr "Date de dernière mise à jour"
|
msgstr "Date de dernière mise à jour"
|
||||||
|
|
||||||
#: inc/case.class.php:1392
|
#: inc/case.class.php:1354
|
||||||
#, php-format
|
#, php-format
|
||||||
#| msgid "Case status"
|
|
||||||
msgid "Case status is '%s'"
|
msgid "Case status is '%s'"
|
||||||
msgstr "L'état du cas est '%s'"
|
msgstr "L'état du cas est '%s'"
|
||||||
|
|
||||||
@@ -341,43 +364,43 @@ msgstr "Lien-cas"
|
|||||||
msgid "Synchronous"
|
msgid "Synchronous"
|
||||||
msgstr "Synchrone"
|
msgstr "Synchrone"
|
||||||
|
|
||||||
#: inc/caselink.class.php:80 inc/caselink.class.php:179
|
#: inc/caselink.class.php:80 inc/caselink.class.php:180
|
||||||
msgid "External data"
|
msgid "External data"
|
||||||
msgstr "Données externes"
|
msgstr "Données externes"
|
||||||
|
|
||||||
#: inc/caselink.class.php:85 inc/caselink.class.php:185
|
#: inc/caselink.class.php:85 inc/caselink.class.php:186
|
||||||
msgid "Self"
|
msgid "Self"
|
||||||
msgstr "Self"
|
msgstr "Self"
|
||||||
|
|
||||||
#: inc/caselink.class.php:90 inc/caselink.class.php:203
|
#: inc/caselink.class.php:90 inc/caselink.class.php:204
|
||||||
msgid "Source task GUID"
|
msgid "Source task GUID"
|
||||||
msgstr "GUID de la tâche source"
|
msgstr "GUID de la tâche source"
|
||||||
|
|
||||||
#: inc/caselink.class.php:98 inc/caselink.class.php:209
|
#: inc/caselink.class.php:99 inc/caselink.class.php:210
|
||||||
msgid "Target task GUID"
|
msgid "Target task GUID"
|
||||||
msgstr "GUID de la tâche cible"
|
msgstr "GUID de la tâche cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:106 inc/caselink.class.php:221
|
#: inc/caselink.class.php:107 inc/caselink.class.php:222
|
||||||
msgid "Target process GUID"
|
msgid "Target process GUID"
|
||||||
msgstr "GUID du Processus cible"
|
msgstr "GUID du Processus cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:115 inc/caselink.class.php:215
|
#: inc/caselink.class.php:116 inc/caselink.class.php:216
|
||||||
msgid "Target dynaform GUID"
|
msgid "Target dynaform GUID"
|
||||||
msgstr "GUID du dynaform cible"
|
msgstr "GUID du dynaform cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:120 inc/caselink.class.php:227
|
#: inc/caselink.class.php:121 inc/caselink.class.php:228
|
||||||
msgid "Source condition"
|
msgid "Source condition"
|
||||||
msgstr "Condition d'activation du lien"
|
msgstr "Condition d'activation du lien"
|
||||||
|
|
||||||
#: inc/caselink.class.php:126 inc/caselink.class.php:191
|
#: inc/caselink.class.php:127 inc/caselink.class.php:192
|
||||||
msgid "Claim target task"
|
msgid "Claim target task"
|
||||||
msgstr "Tâche cible 'à réclamer'"
|
msgstr "Tâche cible 'à réclamer'"
|
||||||
|
|
||||||
#: inc/caselink.class.php:136
|
#: inc/caselink.class.php:137
|
||||||
msgid "Impersonate target task user"
|
msgid "Impersonate target task user"
|
||||||
msgstr "Personnifier l'utilisateur de la tâche cible"
|
msgstr "Personnifier l'utilisateur de la tâche cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:141 inc/caselink.class.php:197
|
#: inc/caselink.class.php:142 inc/caselink.class.php:198
|
||||||
msgid "External application JSON config"
|
msgid "External application JSON config"
|
||||||
msgstr "Configuration JSON de l'application externe"
|
msgstr "Configuration JSON de l'application externe"
|
||||||
|
|
||||||
@@ -390,9 +413,12 @@ msgid "ProcessMaker setup"
|
|||||||
msgstr "Configuration du serveur ProcessMaker"
|
msgstr "Configuration du serveur ProcessMaker"
|
||||||
|
|
||||||
#: inc/config.class.php:159
|
#: inc/config.class.php:159
|
||||||
#| msgid "Server URL (must be in same domain than GLPI)"
|
msgid ""
|
||||||
msgid "Server URL (must be in same domain than GLPI, if GLPI is using HTTPS, PM server must also use HTTPS)"
|
"Server URL (must be in same domain than GLPI, if GLPI is using HTTPS, PM "
|
||||||
msgstr "URL du serveur (doit être dans le même domaine que GLPI, si GLPI utilise HTTPS, alors PM doit aussi utiliser HTTPS)"
|
"server must also use HTTPS)"
|
||||||
|
msgstr ""
|
||||||
|
"URL du serveur (doit être dans le même domaine que GLPI, si GLPI utilise "
|
||||||
|
"HTTPS, alors PM doit aussi utiliser HTTPS)"
|
||||||
|
|
||||||
#: inc/config.class.php:163
|
#: inc/config.class.php:163
|
||||||
msgid "Common domain with GLPI"
|
msgid "Common domain with GLPI"
|
||||||
@@ -412,7 +438,7 @@ msgstr "Nom du Workspace"
|
|||||||
|
|
||||||
#: inc/config.class.php:211
|
#: inc/config.class.php:211
|
||||||
msgid "Server administrator name"
|
msgid "Server administrator name"
|
||||||
msgstr "Non de l'administreur du server ProcessMaker"
|
msgstr "Nom de l'administrateur du server ProcessMaker"
|
||||||
|
|
||||||
#: inc/config.class.php:216
|
#: inc/config.class.php:216
|
||||||
msgid "Server administrator password"
|
msgid "Server administrator password"
|
||||||
@@ -451,7 +477,7 @@ msgid "Main Task Category (edit to change name)"
|
|||||||
msgstr "Catégorie principale des tâches (éditer pour changer le nom)"
|
msgstr "Catégorie principale des tâches (éditer pour changer le nom)"
|
||||||
|
|
||||||
#: inc/config.class.php:286
|
#: inc/config.class.php:286
|
||||||
msgid "Task Writer (edit to change name)"
|
msgid "Task writer (edit to change name)"
|
||||||
msgstr "Auteur des tâches (éditer pour changer le nom)"
|
msgstr "Auteur des tâches (éditer pour changer le nom)"
|
||||||
|
|
||||||
#: inc/config.class.php:306
|
#: inc/config.class.php:306
|
||||||
@@ -484,7 +510,7 @@ msgstr "Version de PHP"
|
|||||||
|
|
||||||
#: inc/config.class.php:347
|
#: inc/config.class.php:347
|
||||||
msgid "DB version"
|
msgid "DB version"
|
||||||
msgstr "Version de la Db"
|
msgstr "Version de la DB"
|
||||||
|
|
||||||
#: inc/config.class.php:348
|
#: inc/config.class.php:348
|
||||||
msgid "DB server IP"
|
msgid "DB server IP"
|
||||||
@@ -515,30 +541,22 @@ msgid "eMail recipients"
|
|||||||
msgstr "Destinataires des emails"
|
msgstr "Destinataires des emails"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:60
|
#: inc/notificationtargetprocessmaker.class.php:60
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process category"
|
msgid "Process category"
|
||||||
msgstr "Catégorie du processus"
|
msgstr "Catégorie du processus"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:61
|
#: inc/notificationtargetprocessmaker.class.php:61
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process category id"
|
msgid "Process category id"
|
||||||
msgstr "ID de la catégorie du processus"
|
msgstr "ID de la catégorie du processus"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:62
|
#: inc/notificationtargetprocessmaker.class.php:62
|
||||||
#| msgid "Process case task"
|
|
||||||
#| msgid_plural "Process case tasks"
|
|
||||||
msgid "Process category comment"
|
msgid "Process category comment"
|
||||||
msgstr "Commentaire de la catégorie du processus"
|
msgstr "Commentaire de la catégorie du processus"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:63
|
#: inc/notificationtargetprocessmaker.class.php:63
|
||||||
#| msgid "Case guid"
|
|
||||||
msgid "Case id"
|
msgid "Case id"
|
||||||
msgstr "ID du cas"
|
msgstr "ID du cas"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:65
|
#: inc/notificationtargetprocessmaker.class.php:65
|
||||||
#| msgid "Case deletion"
|
|
||||||
msgid "Case description"
|
msgid "Case description"
|
||||||
msgstr "Description du cas"
|
msgstr "Description du cas"
|
||||||
|
|
||||||
@@ -563,17 +581,14 @@ msgid "Value for key in 'ZZZ' assoc array (1-dimension array)"
|
|||||||
msgstr "Valeur pour la clé 'key' du tableau associatif à une dimension 'ZZZ'"
|
msgstr "Valeur pour la clé 'key' du tableau associatif à une dimension 'ZZZ'"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:73
|
#: inc/notificationtargetprocessmaker.class.php:73
|
||||||
#| msgid "Item"
|
|
||||||
msgid "Item id"
|
msgid "Item id"
|
||||||
msgstr "ID de l'item"
|
msgstr "ID de l'item"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:74
|
#: inc/notificationtargetprocessmaker.class.php:74
|
||||||
#| msgid "Item"
|
|
||||||
msgid "Item URL"
|
msgid "Item URL"
|
||||||
msgstr "URL de l'item"
|
msgstr "URL de l'item"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:75
|
#: inc/notificationtargetprocessmaker.class.php:75
|
||||||
#| msgid "Item entity"
|
|
||||||
msgid "Item title"
|
msgid "Item title"
|
||||||
msgstr "Titre de l'item"
|
msgstr "Titre de l'item"
|
||||||
|
|
||||||
@@ -586,11 +601,14 @@ msgid "YYY is to be replaced by any array variables"
|
|||||||
msgstr "YYY doit être remplacé par n'importe quel nom de tableau"
|
msgstr "YYY doit être remplacé par n'importe quel nom de tableau"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:90
|
#: inc/notificationtargetprocessmaker.class.php:90
|
||||||
msgid "ZZZ is to be replaced by any assoc array variables (1-dimension array with key/value pairs)"
|
msgid ""
|
||||||
msgstr "ZZZ doit être replacé par n'importe quel nom de tableau associatif à une dimension (paire clé/valeur)"
|
"ZZZ is to be replaced by any assoc array variables (1-dimension array with "
|
||||||
|
"key/value pairs)"
|
||||||
|
msgstr ""
|
||||||
|
"ZZZ doit être replacé par n'importe quel nom de tableau associatif à une "
|
||||||
|
"dimension (paire clé/valeur)"
|
||||||
|
|
||||||
#: inc/notificationtargettask.class.php:195
|
#: inc/notificationtargettask.class.php:195
|
||||||
#| msgid "Task delegation date"
|
|
||||||
msgid "Task action"
|
msgid "Task action"
|
||||||
msgstr "Action de la tâche"
|
msgstr "Action de la tâche"
|
||||||
|
|
||||||
@@ -608,7 +626,7 @@ msgstr "Type de processus"
|
|||||||
|
|
||||||
#: inc/process.class.php:455
|
#: inc/process.class.php:455
|
||||||
msgid "Hide case num. & title"
|
msgid "Hide case num. & title"
|
||||||
msgstr "Cacher num. et titre du cas"
|
msgstr "Cacher le numéro et le titre du cas"
|
||||||
|
|
||||||
#: inc/process.class.php:461
|
#: inc/process.class.php:461
|
||||||
msgid "Insert Task Category"
|
msgid "Insert Task Category"
|
||||||
@@ -654,15 +672,18 @@ msgstr "Processus"
|
|||||||
|
|
||||||
#: inc/process.class.php:627
|
#: inc/process.class.php:627
|
||||||
msgid "Hide case number and title in task descriptions"
|
msgid "Hide case number and title in task descriptions"
|
||||||
msgstr "Masquer numéro et titre des cas dans les descriptions des tâches"
|
msgstr "Masquer le numéro et le titre des cas dans les descriptions des tâches"
|
||||||
|
|
||||||
#: inc/process.class.php:632
|
#: inc/process.class.php:632
|
||||||
msgid "Insert Task Category comments in Task Description"
|
msgid "Insert Task Category comments in Task Description"
|
||||||
msgstr "Insérer les commentaires des Catégories de Tâches dans les descriptions des Tâches"
|
msgstr ""
|
||||||
|
"Insérer les commentaires des catégories de tâches dans les descriptions des "
|
||||||
|
"tâches"
|
||||||
|
|
||||||
#: inc/process.class.php:652
|
#: inc/process.class.php:652
|
||||||
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
||||||
msgstr "Catégorie ITIL pour l'interface libre-service (laissez vide pour désactiver)"
|
msgstr ""
|
||||||
|
"Catégorie ITIL pour l'interface libre-service (laissez vide pour désactiver)"
|
||||||
|
|
||||||
#: inc/process.class.php:679
|
#: inc/process.class.php:679
|
||||||
msgid "Type for Self-service interface"
|
msgid "Type for Self-service interface"
|
||||||
@@ -674,7 +695,6 @@ msgstr "Type de processus (à modifier uniquement si pas à jour)"
|
|||||||
|
|
||||||
#: inc/process.class.php:862
|
#: inc/process.class.php:862
|
||||||
#, php-format
|
#, php-format
|
||||||
#| msgid "ProcessMaker plugin is under maintenance, please retry later, thank you."
|
|
||||||
msgid "Process '%s' is under maintenance, please retry later, thank you."
|
msgid "Process '%s' is under maintenance, please retry later, thank you."
|
||||||
msgstr "Le processus '%s' est en maintenance, ré-essayez plus tard, merci."
|
msgstr "Le processus '%s' est en maintenance, ré-essayez plus tard, merci."
|
||||||
|
|
||||||
@@ -698,7 +718,8 @@ msgstr "Impossible de créer le cas : pas de droits pour cela !"
|
|||||||
|
|
||||||
#: inc/processmaker.class.php:1012
|
#: inc/processmaker.class.php:1012
|
||||||
msgid "Syncs GLPI users and groups into ProcessMaker."
|
msgid "Syncs GLPI users and groups into ProcessMaker."
|
||||||
msgstr "Synchronisation des utilisateurs GLPI et des groups avec ProcessMaker."
|
msgstr ""
|
||||||
|
"Synchronisation des utilisateurs GLPI et des groupes avec ProcessMaker."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:1014
|
#: inc/processmaker.class.php:1014
|
||||||
msgid "Cleaning of orphan cases."
|
msgid "Cleaning of orphan cases."
|
||||||
@@ -712,26 +733,33 @@ msgstr "Nombre de jours avant nettoyage des cas orphelins"
|
|||||||
msgid "To apply task actions between cases."
|
msgid "To apply task actions between cases."
|
||||||
msgstr "Pour appliquer des actions de tâches entre cas."
|
msgstr "Pour appliquer des actions de tâches entre cas."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:1720
|
#: inc/processmaker.class.php:1707
|
||||||
msgid "Case title: "
|
msgid "Case title: "
|
||||||
msgstr "Titre du cas : "
|
msgstr "Titre du cas : "
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2275
|
#: inc/processmaker.class.php:2262
|
||||||
msgid "A 'Case' is running!"
|
msgid "A 'Case' is running!"
|
||||||
msgstr "Un 'Cas' est en cours !"
|
msgstr "Un 'Cas' est en cours !"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2276
|
#: inc/processmaker.class.php:2263
|
||||||
msgid "You must manage it first (see 'Process - Case' tab)!"
|
msgid "You must manage it first (see 'Process - Case' tab)!"
|
||||||
msgstr "Vous devez d'abord le terminer (voir onglet 'Processus - Cas') !"
|
msgstr "Vous devez d'abord le terminer (voir onglet 'Processus - Cas') !"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2774
|
#: inc/processmaker.class.php:2779
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Unable to derivate case! Retry in a moment, or ask your administrator.<hr>Error code: %u<br/>Error message: %s<br/>"
|
msgid ""
|
||||||
msgstr "Impossible de dériver le cas ! Ré-essayez dans un moment, ou demandez à votre administrateur.<hr>Code d'erreur : %u<br/>Message d'erreur : %s<br/>"
|
"Unable to derivate case! Retry in a moment, or ask your administrator."
|
||||||
|
"<hr>Error code: %u<br/>Error message: %s<br/>"
|
||||||
|
msgstr ""
|
||||||
|
"Impossible de dériver le cas ! Ré-essayez dans un moment, ou demandez à "
|
||||||
|
"votre administrateur.<hr>Code d'erreur : %u<br/>Message d'erreur : %s<br/>"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:3281
|
#: inc/processmaker.class.php:3283
|
||||||
msgid "ProcessMaker plugin is under maintenance, please retry later, thank you."
|
msgid ""
|
||||||
msgstr "Le plugin ProcessMaker est en maintenance, veuillez ré-essayer plus tard, merci."
|
"ProcessMaker plugin is under maintenance, please retry later, thank you."
|
||||||
|
msgstr ""
|
||||||
|
"Le plugin ProcessMaker est en maintenance, veuillez ré-essayer plus tard, "
|
||||||
|
"merci."
|
||||||
|
|
||||||
#: inc/profile.class.php:17
|
#: inc/profile.class.php:17
|
||||||
msgid "Process configuration"
|
msgid "Process configuration"
|
||||||
@@ -743,7 +771,7 @@ msgstr "Cas"
|
|||||||
|
|
||||||
#: inc/profile.class.php:23
|
#: inc/profile.class.php:23
|
||||||
msgid "Ad Hoc user re-assign"
|
msgid "Ad Hoc user re-assign"
|
||||||
msgstr "Ré-assignation d'un utilisateur Ad Hoc"
|
msgstr "Réattribution d'un utilisateur Ad Hoc"
|
||||||
|
|
||||||
#: inc/task.class.php:29
|
#: inc/task.class.php:29
|
||||||
msgid "Process case task"
|
msgid "Process case task"
|
||||||
@@ -756,47 +784,161 @@ msgid "Sub-case task(s)"
|
|||||||
msgstr "Tache(s) du sous-cas"
|
msgstr "Tache(s) du sous-cas"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:24 inc/taskcategory.class.php:116
|
#: inc/taskcategory.class.php:24 inc/taskcategory.class.php:116
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process task"
|
msgid "Process task"
|
||||||
msgstr "Tâche du processus"
|
msgstr "Tâche du processus"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:29
|
#: inc/taskcategory.class.php:29 inc/taskcategory.class.php:39
|
||||||
#| msgid "Task List"
|
|
||||||
msgid "Task list"
|
msgid "Task list"
|
||||||
msgstr "List des tâches"
|
msgstr "List des tâches"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:39
|
|
||||||
msgid "Task List"
|
|
||||||
msgstr "Liste des tâches"
|
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:40 inc/taskcategory.class.php:118
|
#: inc/taskcategory.class.php:40 inc/taskcategory.class.php:118
|
||||||
msgid "Task name"
|
msgid "Task name"
|
||||||
msgstr "Nom de la Tâche"
|
msgstr "Nom de la tâche"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:42 inc/taskcategory.class.php:68
|
#: inc/taskcategory.class.php:42 inc/taskcategory.class.php:68
|
||||||
#: inc/taskcategory.class.php:121 inc/taskcategory.class.php:155
|
#: inc/taskcategory.class.php:121 inc/taskcategory.class.php:155
|
||||||
msgid "Start"
|
msgid "Start"
|
||||||
msgstr "Démarrer"
|
msgstr "Démarrer"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:43 inc/taskcategory.class.php:122
|
|
||||||
msgid "Task GUID"
|
|
||||||
msgstr "GUID de la Tâche"
|
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:46 inc/taskcategory.class.php:86
|
#: inc/taskcategory.class.php:46 inc/taskcategory.class.php:86
|
||||||
#: inc/taskcategory.class.php:125 inc/taskcategory.class.php:173
|
#: inc/taskcategory.class.php:125 inc/taskcategory.class.php:173
|
||||||
msgid "Sub-process"
|
msgid "Sub-process"
|
||||||
msgstr "Sous-processus"
|
msgstr "Sous-processus"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:117
|
#: inc/taskcategory.class.php:117
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process name"
|
msgid "Process name"
|
||||||
msgstr "Nom du procesus"
|
msgstr "Nom du processus"
|
||||||
|
|
||||||
#~ msgid "Delete case"
|
#, fuzzy
|
||||||
|
#~| msgid "Delete case"
|
||||||
|
#~ msgid "Delete permanently"
|
||||||
#~ msgstr "Delete case"
|
#~ msgstr "Delete case"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "None!"
|
||||||
|
#~ msgid "None"
|
||||||
|
#~ msgstr "Aucun !"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Maintenance"
|
||||||
|
#~ msgid "Maintenance mode"
|
||||||
|
#~ msgstr "Maintenance"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Case id"
|
||||||
|
#~ msgid "Case URL"
|
||||||
|
#~ msgstr "ID du cas"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task guid"
|
||||||
|
#~ msgid "Task add"
|
||||||
|
#~ msgstr "Guid de la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task re-assigned!"
|
||||||
|
#~ msgid "Task re-assign"
|
||||||
|
#~ msgstr "Tâche réattribuée !"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task un-claimed!"
|
||||||
|
#~ msgid "Task un-claim"
|
||||||
|
#~ msgstr "Annulation de l'attribution de la tâche effectuée !"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task name"
|
||||||
|
#~ msgid "Task done"
|
||||||
|
#~ msgstr "Nom de la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Send reminder"
|
||||||
|
#~ msgid "Task reminder"
|
||||||
|
#~ msgstr "Envoyer un rappel"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Creation date"
|
||||||
|
#~ msgid "Opening date"
|
||||||
|
#~ msgstr "Date de création"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Case description"
|
||||||
|
#~ msgid "Description"
|
||||||
|
#~ msgstr "Description du cas"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Process category id"
|
||||||
|
#~ msgid "Category id"
|
||||||
|
#~ msgstr "ID de la catégorie du processus"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Process category comment"
|
||||||
|
#~ msgid "Category comment"
|
||||||
|
#~ msgstr "Commentaire de la catégorie du processus"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task action"
|
||||||
|
#~ msgid "Total duration"
|
||||||
|
#~ msgstr "Action de la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Re-assign task"
|
||||||
|
#~ msgid "User assigned to task"
|
||||||
|
#~ msgstr "Réattribuer la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Case is linked to a %1s"
|
||||||
|
#~ msgid "User login assigned to task"
|
||||||
|
#~ msgstr "Le cas est lié à un %1s"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Re-assign task"
|
||||||
|
#~ msgid "Group assigned to task"
|
||||||
|
#~ msgstr "Réattribuer la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Start"
|
||||||
|
#~ msgid "Start date"
|
||||||
|
#~ msgstr "Démarrer"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Last update"
|
||||||
|
#~ msgid "Last updater"
|
||||||
|
#~ msgstr "Dernière mise à jour"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task delegation date"
|
||||||
|
#~ msgid "Delegation index"
|
||||||
|
#~ msgstr "Date d'attribution de tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Delete case"
|
||||||
|
#~ msgid "Delete"
|
||||||
|
#~ msgstr "Delete case"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgctxt "case_status"
|
||||||
|
#~| msgid "Completed"
|
||||||
|
#~ msgid "Complete name"
|
||||||
|
#~ msgstr "Terminé"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Re-assign"
|
||||||
|
#~ msgctxt "processmaker"
|
||||||
|
#~ msgid "Re-assign"
|
||||||
|
#~ msgstr "Réattribuer"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Process case"
|
||||||
|
#~| msgid_plural "Process cases"
|
||||||
|
#~ msgctxt "processmaker"
|
||||||
|
#~ msgid "Process case"
|
||||||
|
#~ msgstr "Cas du processus"
|
||||||
|
|
||||||
|
#~ msgid "Task GUID"
|
||||||
|
#~ msgstr "Task GUID"
|
||||||
|
|
||||||
|
#~ msgid "Task List"
|
||||||
|
#~ msgstr "Task List"
|
||||||
|
|
||||||
#~ msgid "Case item"
|
#~ msgid "Case item"
|
||||||
#~ msgstr "Case item"
|
#~ msgstr "Case item"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
BIN
pics/processmaker-mid.png
Normal file
BIN
pics/processmaker-mid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
pics/processmaker-tiny.png
Normal file
BIN
pics/processmaker-tiny.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
pics/processmaker-xxs.png
Normal file
BIN
pics/processmaker-xxs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 783 B |
BIN
pics/processmaker.png
Normal file
BIN
pics/processmaker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
134
processmaker.xml
134
processmaker.xml
@@ -1,66 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<root>
|
<root>
|
||||||
<name>Processmaker</name>
|
<name>Processmaker</name>
|
||||||
<key>processmaker</key>
|
<key>processmaker</key>
|
||||||
<state>stable</state>
|
<state>stable</state>
|
||||||
<logo>https://raw.githubusercontent.com/tomolimo/processmaker/master/processmaker.png</logo>
|
<logo>https://raw.githubusercontent.com/tomolimo/processmaker/master/processmaker.png</logo>
|
||||||
<description>
|
<description>
|
||||||
<short>
|
<short>
|
||||||
<fr>Ce plugin fournit la possibilité d'intégrer un processus (workflow) aux objets ITIL (Tickets, Changements et Problèmes).</fr>
|
<fr>Ce plugin fournit la possibilité d'intégrer un processus (workflow) aux objets ITIL (Tickets, Changements et Problèmes).</fr>
|
||||||
<en>This plugin provides a process (workflow) management linked to ITIL objects (Tickets, Changes and Problems).</en>
|
<en>This plugin provides a process (workflow) management linked to ITIL objects (Tickets, Changes and Problems).</en>
|
||||||
<cs>Tento zásuvný modul poskytuje správu procesů (pracovní postup) napojený na požadavky.</cs>
|
<cs>Tento zásuvný modul poskytuje správu procesů (pracovní postup) napojený na požadavky.</cs>
|
||||||
</short>
|
</short>
|
||||||
<long>
|
<long>
|
||||||
<en>This plugin is dedicated to provide process (workflows) management linked to ITIL objects (Tickets, Changes and Problems). This goal is achieved using a customized ProcessMaker server (URL: https://github.com/tomolimo/processmaker-server). ProcessMaker provides BPMN Process design and execution. This plugin is the glue between GLPI and ProcessMaker.</en>
|
<en>This plugin is dedicated to provide process (workflows) management linked to ITIL objects (Tickets, Changes and Problems). This goal is achieved using a customized ProcessMaker server (URL: https://github.com/tomolimo/processmaker-server). ProcessMaker provides BPMN Process design and execution. This plugin is the glue between GLPI and ProcessMaker.</en>
|
||||||
<fr>Ce plugin est dédié à la gestion de processus (workflows) liés aux objets ITIL (Tickets, Changements et Problèmes). Ce but est atteint par l'utilisation d'un serveur ProcessMaker customisé (URL: https://github.com/tomolimo/processmaker-server). ProcessMaker fournit un outil graphique de création de processus BPMN et permet l'exécution de ceux-ci. Ce plugin sert de glue entre GLPI et ProcessMaker.</fr>
|
<fr>Ce plugin est dédié à la gestion de processus (workflows) liés aux objets ITIL (Tickets, Changements et Problèmes). Ce but est atteint par l'utilisation d'un serveur ProcessMaker customisé (URL: https://github.com/tomolimo/processmaker-server). ProcessMaker fournit un outil graphique de création de processus BPMN et permet l'exécution de ceux-ci. Ce plugin sert de glue entre GLPI et ProcessMaker.</fr>
|
||||||
<cs>Tento zásuvný modul je věnován poskytnutí správy procesu (pracovní postup), napojeného na požadavky. Tohoto cíle je dosaženo použitím ProcessMaker (URL: https://github.com/tomolimo/processmaker-server). ProcessMaker poskytne návrh procesu a vykonání pracovního postupu. Tento zásuvný modul je můstkem mezi GLPI a ProcessMaker.</cs>
|
<cs>Tento zásuvný modul je věnován poskytnutí správy procesu (pracovní postup), napojeného na požadavky. Tohoto cíle je dosaženo použitím ProcessMaker (URL: https://github.com/tomolimo/processmaker-server). ProcessMaker poskytne návrh procesu a vykonání pracovního postupu. Tento zásuvný modul je můstkem mezi GLPI a ProcessMaker.</cs>
|
||||||
</long>
|
</long>
|
||||||
</description>
|
</description>
|
||||||
<homepage>https://github.com/tomolimo/processmaker</homepage>
|
<homepage>https://github.com/tomolimo/processmaker</homepage>
|
||||||
<download>https://github.com/tomolimo/processmaker/releases</download>
|
<download>https://github.com/tomolimo/processmaker/releases</download>
|
||||||
<issues>https://github.com/tomolimo/processmaker/issues</issues>
|
<issues>https://github.com/tomolimo/processmaker/issues</issues>
|
||||||
<readme>https://github.com/tomolimo/processmaker/wiki</readme>
|
<readme>https://github.com/tomolimo/processmaker/wiki</readme>
|
||||||
<authors>
|
<authors>
|
||||||
<author>Olivier Moron</author>
|
<author>Olivier Moron</author>
|
||||||
</authors>
|
</authors>
|
||||||
<versions>
|
<versions>
|
||||||
<version>
|
<version>
|
||||||
<num>3.3.8</num>
|
<num>3.3.8</num>
|
||||||
<compatibility>9.1</compatibility>
|
<compatibility>9.1</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>3.4.26</num>
|
<num>3.4.30</num>
|
||||||
<compatibility>9.2</compatibility>
|
<compatibility>9.2</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>3.5.11</num>
|
<num>3.5.15</num>
|
||||||
<compatibility>9.3</compatibility>
|
<compatibility>9.3</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>3.6.17</num>
|
<num>3.6.21</num>
|
||||||
<compatibility>9.4</compatibility>
|
<compatibility>9.4</compatibility>
|
||||||
</version>
|
</version>
|
||||||
</versions>
|
<version>
|
||||||
<langs>
|
<num>4.0.0</num>
|
||||||
<lang>en_gb</lang>
|
<compatibility>9.5</compatibility>
|
||||||
<lang>fr_fr</lang>
|
</version>
|
||||||
<lang>cs_cz</lang>
|
</versions>
|
||||||
</langs>
|
<langs>
|
||||||
<license>GPL v2+</license>
|
<lang>en_gb</lang>
|
||||||
<tags>
|
<lang>fr_fr</lang>
|
||||||
<fr>
|
<lang>cs_cz</lang>
|
||||||
<tag>Processus</tag>
|
</langs>
|
||||||
<tag>BPMN 2.0</tag>
|
<license>GPL v2+</license>
|
||||||
<tag>Workflow</tag>
|
<tags>
|
||||||
<tag>Helpdesk</tag>
|
<fr>
|
||||||
<tag>Ticket</tag>
|
<tag>Processus</tag>
|
||||||
</fr>
|
<tag>BPMN 2.0</tag>
|
||||||
<en>
|
<tag>Workflow</tag>
|
||||||
<tag>Processes</tag>
|
<tag>Helpdesk</tag>
|
||||||
<tag>BPMN 2.0</tag>
|
<tag>Ticket</tag>
|
||||||
<tag>Helpdesk</tag>
|
</fr>
|
||||||
<tag>Workflows</tag>
|
<en>
|
||||||
<tag>Ticket</tag>
|
<tag>Processes</tag>
|
||||||
</en>
|
<tag>BPMN 2.0</tag>
|
||||||
</tags>
|
<tag>Helpdesk</tag>
|
||||||
|
<tag>Workflows</tag>
|
||||||
|
<tag>Ticket</tag>
|
||||||
|
</en>
|
||||||
|
</tags>
|
||||||
</root>
|
</root>
|
||||||
343
setup.php
343
setup.php
@@ -1,165 +1,178 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('PROCESSMAKER_VERSION', '3.6.17');
|
define('PROCESSMAKER_VERSION', '4.0.0');
|
||||||
|
|
||||||
// used for case cancellation
|
// used for case cancellation
|
||||||
define("CANCEL", 256);
|
define("CANCEL", 256);
|
||||||
// used for ad-hoc user re-assign
|
// used for ad-hoc user re-assign
|
||||||
define("ADHOC_REASSIGN", 512);
|
define("ADHOC_REASSIGN", 512);
|
||||||
|
|
||||||
// Init the hooks of the plugins -Needed
|
// Init the hooks of the plugins -Needed
|
||||||
function plugin_init_processmaker() {
|
function plugin_init_processmaker() {
|
||||||
global $PLUGIN_HOOKS, $CFG_GLPI;
|
global $PLUGIN_HOOKS, $CFG_GLPI;
|
||||||
|
|
||||||
$PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true;
|
$PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true;
|
||||||
|
|
||||||
$objects = ['Ticket', 'Change', 'Problem'];
|
$plugin = new Plugin();
|
||||||
|
if ($plugin->isActivated('processmaker')) {
|
||||||
Plugin::registerClass('PluginProcessmakerProcessmaker');
|
|
||||||
|
$objects = ['Ticket', 'Change', 'Problem'];
|
||||||
Plugin::registerClass('PluginProcessmakerCase', ['addtabon' => $objects, 'notificationtemplates_types' => true]);
|
|
||||||
|
Plugin::registerClass('PluginProcessmakerProcessmaker');
|
||||||
Plugin::registerClass('PluginProcessmakerTask', ['notificationtemplates_types' => true]);
|
|
||||||
|
Plugin::registerClass('PluginProcessmakerCase', ['addtabon' => $objects, 'notificationtemplates_types' => true]);
|
||||||
Plugin::registerClass('PluginProcessmakerTaskCategory', ['addtabon' => 'TaskCategory']);
|
|
||||||
|
Plugin::registerClass('PluginProcessmakerTask', ['notificationtemplates_types' => true]);
|
||||||
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
|
||||||
Plugin::registerClass('PluginProcessmakerConfig', ['addtabon' => 'Config']);
|
Plugin::registerClass('PluginProcessmakerTaskCategory', ['addtabon' => 'TaskCategory']);
|
||||||
$PLUGIN_HOOKS['config_page']['processmaker'] = 'front/config.form.php';
|
|
||||||
}
|
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
||||||
|
Plugin::registerClass('PluginProcessmakerConfig', ['addtabon' => 'Config']);
|
||||||
Plugin::registerClass('PluginProcessmakerProfile', ['addtabon' => 'Profile']);
|
$PLUGIN_HOOKS['config_page']['processmaker'] = 'front/config.form.php';
|
||||||
|
}
|
||||||
Plugin::registerClass('PluginProcessmakerProcess_Profile');
|
|
||||||
|
Plugin::registerClass('PluginProcessmakerProfile', ['addtabon' => 'Profile']);
|
||||||
$PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true;
|
|
||||||
|
Plugin::registerClass('PluginProcessmakerProcess_Profile');
|
||||||
$PLUGIN_HOOKS['pre_show_item']['processmaker']
|
|
||||||
= ['PluginProcessmakerProcessmaker', 'pre_show_item_processmaker'];
|
$PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true;
|
||||||
|
|
||||||
$PLUGIN_HOOKS['pre_show_tab']['processmaker']
|
$PLUGIN_HOOKS['pre_show_item']['processmaker']
|
||||||
= ['PluginProcessmakerProcessmaker', 'pre_show_tab_processmaker'];
|
= ['PluginProcessmakerProcessmaker', 'pre_show_item_processmaker'];
|
||||||
$PLUGIN_HOOKS['post_show_tab']['processmaker']
|
|
||||||
= ['PluginProcessmakerProcessmaker', 'post_show_tab_processmaker'];
|
$PLUGIN_HOOKS['pre_show_tab']['processmaker']
|
||||||
|
= ['PluginProcessmakerProcessmaker', 'pre_show_tab_processmaker'];
|
||||||
// Display a menu entry ?
|
//$PLUGIN_HOOKS['post_show_tab']['processmaker']
|
||||||
if (Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
// = ['PluginProcessmakerProcessmaker', 'post_show_tab_processmaker'];
|
||||||
// tools
|
|
||||||
$PLUGIN_HOOKS['menu_toadd']['processmaker']['tools'] = 'PluginProcessmakerMenu';
|
// Display a menu entry ?
|
||||||
}
|
if (Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
||||||
|
// tools
|
||||||
if (Session::haveRightsOr('plugin_processmaker_case', [READ, UPDATE])) {
|
$PLUGIN_HOOKS['menu_toadd']['processmaker']['tools'] = 'PluginProcessmakerMenu';
|
||||||
// helpdesk
|
}
|
||||||
$PLUGIN_HOOKS['menu_toadd']['processmaker']['helpdesk'] = 'PluginProcessmakerCase';
|
|
||||||
}
|
if (Session::haveRightsOr('plugin_processmaker_case', [READ, UPDATE])) {
|
||||||
|
// helpdesk
|
||||||
Plugin::registerClass('PluginProcessmakerProcess', [ 'massiveaction_nodelete_types' => true] );
|
$PLUGIN_HOOKS['menu_toadd']['processmaker']['helpdesk'] = 'PluginProcessmakerCase';
|
||||||
|
}
|
||||||
$hooks = [];
|
|
||||||
foreach ($objects as $obj) {
|
Plugin::registerClass('PluginProcessmakerProcess', [ 'massiveaction_nodelete_types' => true] );
|
||||||
$hooks[$obj] = ['PluginProcessmakerProcessmaker', 'plugin_pre_item_add_processmaker'];
|
|
||||||
}
|
$hooks = [];
|
||||||
$PLUGIN_HOOKS['pre_item_add']['processmaker'] = $hooks;
|
foreach ($objects as $obj) {
|
||||||
|
$hooks[$obj] = ['PluginProcessmakerProcessmaker', 'plugin_pre_item_add_processmaker'];
|
||||||
$hooks = [];
|
}
|
||||||
foreach ($objects as $obj) {
|
$PLUGIN_HOOKS['pre_item_add']['processmaker'] = $hooks;
|
||||||
$hooks[$obj] = 'plugin_pre_item_update_processmaker';
|
|
||||||
}
|
$hooks = [];
|
||||||
$PLUGIN_HOOKS['pre_item_update']['processmaker'] = $hooks;
|
foreach ($objects as $obj) {
|
||||||
|
$hooks[$obj] = 'plugin_pre_item_update_processmaker';
|
||||||
$hooks = ['TicketSatisfaction' => 'plugin_item_update_processmaker_satisfaction',
|
}
|
||||||
'User' => 'plugin_item_update_processmaker_user'];
|
$PLUGIN_HOOKS['pre_item_update']['processmaker'] = $hooks;
|
||||||
foreach ($objects as $obj) {
|
|
||||||
$hooks[$obj.'Task'] = 'plugin_item_update_processmaker_tasks';
|
$hooks = ['TicketSatisfaction' => 'plugin_item_update_processmaker_satisfaction',
|
||||||
}
|
'User' => 'plugin_item_update_processmaker_user'];
|
||||||
$PLUGIN_HOOKS['item_update']['processmaker'] = $hooks;
|
foreach ($objects as $obj) {
|
||||||
|
$hooks[$obj.'Task'] = 'plugin_item_update_processmaker_tasks';
|
||||||
$hooks = [];
|
}
|
||||||
foreach ($objects as $obj) {
|
$PLUGIN_HOOKS['item_update']['processmaker'] = $hooks;
|
||||||
$hooks[$obj] = ['PluginProcessmakerProcessmaker', 'plugin_item_add_processmaker'];
|
|
||||||
}
|
$hooks = [];
|
||||||
$PLUGIN_HOOKS['item_add']['processmaker'] = $hooks;
|
foreach ($objects as $obj) {
|
||||||
|
$hooks[$obj] = ['PluginProcessmakerProcessmaker', 'plugin_item_add_processmaker'];
|
||||||
$hooks = [];
|
}
|
||||||
foreach ($objects as $obj) {
|
$PLUGIN_HOOKS['item_add']['processmaker'] = $hooks;
|
||||||
$hooks['NotificationTarget'.$obj] = ['PluginProcessmakerProcessmaker', 'plugin_item_get_data_processmaker'];
|
|
||||||
}
|
$hooks = [];
|
||||||
$PLUGIN_HOOKS['item_get_datas']['processmaker'] = $hooks;
|
foreach ($objects as $obj) {
|
||||||
|
$hooks['NotificationTarget'.$obj] = ['PluginProcessmakerProcessmaker', 'plugin_item_get_data_processmaker'];
|
||||||
$hooks = [];
|
}
|
||||||
foreach ($objects as $obj) {
|
$PLUGIN_HOOKS['item_get_datas']['processmaker'] = $hooks;
|
||||||
$hooks["PluginPdf".$obj."Task"] = ['PluginProcessmakerProcessmaker', 'plugin_item_get_pdfdata_processmaker'];
|
|
||||||
}
|
$hooks = [];
|
||||||
$PLUGIN_HOOKS['item_get_pdfdatas']['processmaker'] = $hooks;
|
foreach ($objects as $obj) {
|
||||||
|
$hooks["PluginPdf".$obj."Task"] = ['PluginProcessmakerProcessmaker', 'plugin_item_get_pdfdata_processmaker'];
|
||||||
// Javascript
|
}
|
||||||
$plugin = new Plugin();
|
$PLUGIN_HOOKS['item_get_pdfdatas']['processmaker'] = $hooks;
|
||||||
if ($plugin->isActivated('processmaker')
|
|
||||||
&& Session::getLoginUserID() ) {
|
// Javascript
|
||||||
|
$plugin = new Plugin();
|
||||||
$url = explode("/", $_SERVER['PHP_SELF']);
|
if ($plugin->isActivated('processmaker')
|
||||||
$pageName = explode("?", array_pop($url));
|
&& Session::getLoginUserID() ) {
|
||||||
switch ($pageName[0]) {
|
|
||||||
case "tracking.injector.php":
|
$url = explode("/", $_SERVER['PHP_SELF']);
|
||||||
case "helpdesk.public.php":
|
$pageName = explode("?", array_pop($url));
|
||||||
$PLUGIN_HOOKS['add_javascript']['processmaker'] = ["js/helpdesk.public.js.php"];
|
switch ($pageName[0]) {
|
||||||
break;
|
case "tracking.injector.php":
|
||||||
case "planning.php":
|
case "helpdesk.public.php":
|
||||||
$PLUGIN_HOOKS['add_javascript']['processmaker'] = ["js/planning.js"];
|
$PLUGIN_HOOKS['add_javascript']['processmaker'] = ["js/helpdesk.public.js.php"];
|
||||||
break;
|
break;
|
||||||
case "central.php":
|
case "planning.php":
|
||||||
$PLUGIN_HOOKS['add_javascript']['processmaker'] = ["js/central.js"];
|
$PLUGIN_HOOKS['add_javascript']['processmaker'] = ["js/planning.js"];
|
||||||
break;
|
break;
|
||||||
}
|
case "central.php":
|
||||||
}
|
$PLUGIN_HOOKS['add_javascript']['processmaker'] = ["js/central.js"];
|
||||||
|
break;
|
||||||
$PLUGIN_HOOKS['use_massive_action']['processmaker'] = 1;
|
}
|
||||||
|
}
|
||||||
$CFG_GLPI['planning_types'][] = 'PluginProcessmakerTask';
|
|
||||||
$PLUGIN_HOOKS['post_init']['processmaker'] = 'plugin_processmaker_post_init';
|
$PLUGIN_HOOKS['use_massive_action']['processmaker'] = 1;
|
||||||
|
|
||||||
// in order to set rights when in helpdesk interface
|
$CFG_GLPI['planning_types'][] = 'PluginProcessmakerTask';
|
||||||
// otherwise post-only users can't see cases and then can't act on a case task.
|
$PLUGIN_HOOKS['post_init']['processmaker'] = 'plugin_processmaker_post_init';
|
||||||
$PLUGIN_HOOKS['change_profile']['processmaker'] = 'plugin_processmaker_change_profile';
|
|
||||||
|
// in order to set rights when in helpdesk interface
|
||||||
}
|
// otherwise post-only users can't see cases and then can't act on a case task.
|
||||||
|
$PLUGIN_HOOKS['change_profile']['processmaker'] = 'plugin_processmaker_change_profile';
|
||||||
|
|
||||||
// Get the name and the version of the plugin - Needed
|
//if ($plugin->isActivated('processmaker')) {
|
||||||
function plugin_version_processmaker() {
|
|
||||||
return [
|
// in order to manage the password encryption
|
||||||
'name' => 'Process Maker',
|
$pmglpikey = new PluginProcessmakerGlpikey;
|
||||||
'version' => PROCESSMAKER_VERSION,
|
foreach ($pmglpikey->getFields() as $fld) {
|
||||||
'author' => 'Olivier Moron',
|
$PLUGIN_HOOKS['secured_fields'][] = $fld;
|
||||||
'license' => 'GPLv3+',
|
}
|
||||||
'homepage' => 'https://github.com/tomolimo/processmaker',
|
//}
|
||||||
'requirements' => [
|
}
|
||||||
'glpi' => [
|
|
||||||
'min' => '9.4',
|
}
|
||||||
'max' => '9.5'
|
|
||||||
],
|
|
||||||
]
|
// Get the name and the version of the plugin - Needed
|
||||||
];
|
function plugin_version_processmaker() {
|
||||||
}
|
return [
|
||||||
|
'name' => 'Process Maker',
|
||||||
// Optional : check prerequisites before install : may print errors or add to message after redirect
|
'version' => PROCESSMAKER_VERSION,
|
||||||
function plugin_processmaker_check_prerequisites() {
|
'author' => 'Olivier Moron',
|
||||||
if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '9.5', 'ge')) {
|
'license' => 'GPLv3+',
|
||||||
echo "This plugin requires GLPI >= 9.4 and < 9.5";
|
'homepage' => 'https://github.com/tomolimo/processmaker',
|
||||||
return false;
|
'requirements' => [
|
||||||
}
|
'glpi' => [
|
||||||
|
'min' => '9.5',
|
||||||
return true;
|
'max' => '9.6'
|
||||||
}
|
],
|
||||||
|
]
|
||||||
function plugin_processmaker_check_config($verbose = false) {
|
];
|
||||||
|
}
|
||||||
return true;
|
|
||||||
}
|
// Optional : check prerequisites before install : may print errors or add to message after redirect
|
||||||
|
function plugin_processmaker_check_prerequisites() {
|
||||||
|
if (version_compare(GLPI_VERSION, '9.5', 'lt') || version_compare(GLPI_VERSION, '9.6', 'ge')) {
|
||||||
function plugin_processmaker_haveRight($module, $right) {
|
echo "This plugin requires GLPI >= 9.5 and < 9.6";
|
||||||
|
return false;
|
||||||
return Session::haveRight("plugin_processmaker_".$module, $right);
|
}
|
||||||
}
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function plugin_processmaker_check_config($verbose = false) {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function plugin_processmaker_haveRight($module, $right) {
|
||||||
|
|
||||||
|
return Session::haveRight("plugin_processmaker_".$module, $right);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user