Merge branch 'master' of bitbucket.org:marcoAntonioNina/processmaker into dashboards2
This commit is contained in:
@@ -70,7 +70,7 @@ function displayUploadForm()
|
||||
File:
|
||||
<input type=\"file\" id=\"File1\" name=\"upload_file\" /> (*.html, *.htm)
|
||||
<br/><br/>
|
||||
<input type=\"submit\" name=\"Upload File\" value=\"Upload File\" />
|
||||
<input type=\"submit\" name=\"Upload File\" value=\"Upload File\" style=\"border: 1px solid #1ba385; float: right; margin-top: 30px; margin-right: -4px; font-size: 10px; display: inline-block; text-decoration: none; padding: 8px 24px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; background-color: #1fbc99; color: white;\" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -73,6 +73,6 @@ function resizeInputs() {
|
||||
|
||||
if (el) {
|
||||
el.style.width = (vp.w - 20) + 'px';
|
||||
el.style.height = (vp.h - 122) + 'px';
|
||||
el.style.height = (vp.h - 70) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
175
gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialogTinyBpmn.css
vendored
Normal file
175
gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialogTinyBpmn.css
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
/* Generic */
|
||||
body {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
||||
scrollbar-3dlight-color:#F0F0EE;
|
||||
scrollbar-arrow-color:#676662;
|
||||
scrollbar-base-color:#F0F0EE;
|
||||
scrollbar-darkshadow-color:#DDDDDD;
|
||||
scrollbar-face-color:#E0E0DD;
|
||||
scrollbar-highlight-color:#F0F0EE;
|
||||
scrollbar-shadow-color:#F0F0EE;
|
||||
scrollbar-track-color:#F5F5F5;
|
||||
background-color: white;
|
||||
padding:0;
|
||||
margin:8px 8px 0 8px;
|
||||
}
|
||||
|
||||
html {background:white;}
|
||||
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
textarea {resize:none;outline:none;}
|
||||
a:link, a:visited {color:black;}
|
||||
a:hover {color:#2B6FB6;}
|
||||
.nowrap {white-space: nowrap}
|
||||
|
||||
/* Forms */
|
||||
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
||||
legend {color:#2B6FB6; font-weight:bold;}
|
||||
label.msg {display:none;}
|
||||
label.invalid {color:#EE0000; display:inline;}
|
||||
input.invalid {border:1px solid #EE0000;}
|
||||
input {background:#FFF; border:1px solid #CCC;}
|
||||
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
||||
input, select, textarea {border:1px solid #808080;}
|
||||
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.button, .updateButton {
|
||||
border:0; margin:0; padding:0;
|
||||
font-weight:bold;
|
||||
width:94px; height:26px;
|
||||
background:url(img/buttons.png) 0 -26px;
|
||||
cursor:pointer;
|
||||
padding-bottom:2px;
|
||||
/*float:left;*/
|
||||
}
|
||||
|
||||
#cancel {
|
||||
background:none !important;
|
||||
color: #fff !important;
|
||||
background-color: #e4655f !important;
|
||||
border: 1px solid #e14333 !important;
|
||||
font-size: 14px !important;
|
||||
display: inline-block !important;
|
||||
text-decoration: none !important;
|
||||
-webkit-border-radius: 2px !important;
|
||||
-moz-border-radius: 2px !important;
|
||||
-ms-border-radius: 2px !important;
|
||||
-o-border-radius: 2px !important;
|
||||
border-radius: 2px !important;
|
||||
text-align: center !important;
|
||||
height:28px;
|
||||
margin-top: 6px !important;
|
||||
font-weight: normal !important;
|
||||
-webkit-transition: all .5s !important;
|
||||
-moz-transition: all .5s !important;
|
||||
-ms-transition: all .5s !important;
|
||||
-o-transition: all .5s !important;
|
||||
transition: all .5s !important;
|
||||
-webkit-box-sizing: border-box !important;
|
||||
-moz-box-sizing: border-box !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
#insert {
|
||||
background:none !important;
|
||||
color: #fff !important;
|
||||
background-color: #1fbc99 !important;
|
||||
border: 1px solid #1ba385 !important;
|
||||
font-size: 14px !important;
|
||||
display: inline-block !important;
|
||||
text-decoration: none !important;
|
||||
-webkit-border-radius: 2px !important;
|
||||
-moz-border-radius: 2px !important;
|
||||
-ms-border-radius: 2px !important;
|
||||
-o-border-radius: 2px !important;
|
||||
border-radius: 2px !important;
|
||||
text-align: center !important;
|
||||
height:28px !important;
|
||||
float: right !important;
|
||||
margin-left: 8px !important;
|
||||
margin-top: 6px !important;
|
||||
font-weight: normal !important;
|
||||
-webkit-transition: all .5s !important;
|
||||
-moz-transition: all .5s !important;
|
||||
-ms-transition: all .5s !important;
|
||||
-o-transition: all .5s !important;
|
||||
transition: all .5s !important;
|
||||
-webkit-box-sizing: border-box !important;
|
||||
-moz-box-sizing: border-box !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
#insert {background:url(img/buttons.png) 0 -52px}
|
||||
#cancel {background:url(img/buttons.png) 0 0; float:right}
|
||||
|
||||
/* Browse */
|
||||
a.pickcolor, a.browse {text-decoration:none}
|
||||
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
||||
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
||||
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
||||
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
||||
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
||||
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
||||
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
||||
a.pickcolor:hover span {background-color:#B2BBD0;}
|
||||
a.pickcolor:hover span.disabled {}
|
||||
|
||||
/* Charmap */
|
||||
table.charmap {border:1px solid #AAA; text-align:center}
|
||||
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
||||
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
||||
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
||||
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
||||
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
||||
|
||||
/* Source */
|
||||
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
||||
.mceActionPanel {margin-top:5px;}
|
||||
|
||||
/* Tabs classes */
|
||||
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
|
||||
.tabs ul {margin:0; padding:0; list-style:none;}
|
||||
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
||||
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
||||
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
||||
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
|
||||
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
||||
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
||||
|
||||
/* Panels */
|
||||
.panel_wrapper div.panel {display:none;}
|
||||
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
||||
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
||||
|
||||
/* Columns */
|
||||
.column {float:left;}
|
||||
.properties {width:100%;}
|
||||
.properties .column1 {}
|
||||
.properties .column2 {text-align:left;}
|
||||
|
||||
/* Titles */
|
||||
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
||||
h3 {font-size:14px;}
|
||||
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
||||
|
||||
/* Dialog specific */
|
||||
#link .panel_wrapper, #link div.current {height:125px;}
|
||||
#image .panel_wrapper, #image div.current {height:200px;}
|
||||
#plugintable thead {font-weight:bold; background:#DDD;}
|
||||
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
||||
#plugintable {width:96%; margin-top:10px;}
|
||||
#pluginscontainer {height:290px; overflow:auto;}
|
||||
#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
|
||||
#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
|
||||
#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
|
||||
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
||||
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
||||
#colorpicker #light div {overflow:hidden;}
|
||||
#colorpicker .panel_wrapper div.current {height:175px;}
|
||||
#colorpicker #namedcolors {width:150px;}
|
||||
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
||||
#colorpicker #colornamecontainer {margin-top:5px;}
|
||||
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
||||
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
|
||||
@@ -219,18 +219,12 @@ class pmDynaform
|
||||
$cells = array();
|
||||
foreach ($json->columns as $column) {
|
||||
//data
|
||||
if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown" || $column->type === "datetime" || $column->type === "checkbox" || $column->type === "file" || $column->type === "link" || $value === "hidden") {
|
||||
if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown" || $column->type === "suggest" || $column->type === "datetime" || $column->type === "checkbox" || $column->type === "file" || $column->type === "link" || $value === "hidden") {
|
||||
array_push($cells, array(
|
||||
"value" => isset($row[$column->name]) ? $row[$column->name] : "",
|
||||
"label" => isset($row[$column->name . "_label"]) ? $row[$column->name . "_label"] : (isset($row[$column->name]) ? $row[$column->name] : "")
|
||||
));
|
||||
}
|
||||
if ($column->type === "suggest") {
|
||||
array_push($cells, array(
|
||||
"value" => isset($row[$column->name . "_label"]) ? $row[$column->name . "_label"] : "",
|
||||
"label" => isset($row[$column->name]) ? $row[$column->name] : ""
|
||||
));
|
||||
}
|
||||
}
|
||||
$rows[$keyRow] = $cells;
|
||||
}
|
||||
|
||||
@@ -968,7 +968,7 @@ class Processes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($oData->taskExtraProperties)) {
|
||||
foreach ($oData->taskExtraProperties as $key => $value) {
|
||||
$record = $value;
|
||||
@@ -3757,7 +3757,7 @@ class Processes
|
||||
|
||||
// for public files
|
||||
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP . $data->process['PRO_UID'];
|
||||
|
||||
|
||||
//Get WebEntry file names
|
||||
$arrayWebEntryFile = array();
|
||||
|
||||
@@ -4250,7 +4250,7 @@ class Processes
|
||||
if ($fsContent > 0) {
|
||||
$fileContent = fread( $fp, $fsContent ); //reading string $XmlContent
|
||||
$newFileName = $pathPublic . $sFileName;
|
||||
|
||||
|
||||
if (in_array($sFileName, $arrayWebEntryFile)) {
|
||||
continue;
|
||||
}
|
||||
@@ -4280,8 +4280,9 @@ class Processes
|
||||
public function createTaskExtraPropertiesRows ($aTaskExtraProperties)
|
||||
{
|
||||
if (count($aTaskExtraProperties) > 0) {
|
||||
$oConfig = new Configuration();
|
||||
foreach ($aTaskExtraProperties as $key => $row) {
|
||||
$oConfig = new Configuration();
|
||||
|
||||
if ($oConfig->exists( $row['CFG_UID'], $row['OBJ_UID'], $row['PRO_UID'], $row['USR_UID'], $row['APP_UID']) ) {
|
||||
$oConfig->remove( $row['CFG_UID'], $row['OBJ_UID'], $row['PRO_UID'], $row['USR_UID'], $row['APP_UID'] );
|
||||
$oConfig->setDeleted(false);
|
||||
@@ -5167,7 +5168,7 @@ class Processes
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function truncateName($proTitle)
|
||||
{
|
||||
$proTitle = str_replace(".","_",$proTitle);
|
||||
|
||||
@@ -1357,13 +1357,27 @@ class workspaceTools
|
||||
}
|
||||
|
||||
if ( !$flag && !is_null($flagFunction) ) {
|
||||
$command = 'mysql'
|
||||
. ' --host=' . $parameters['dbHost']
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE '.$filename.'"';
|
||||
$aHost = explode(':',$parameters['dbHost']);
|
||||
$dbHost = $aHost[0];
|
||||
if(isset($aHost[1])){
|
||||
$dbPort = $aHost[1];
|
||||
$command = 'mysql'
|
||||
. ' --host=' . $dbHost
|
||||
. ' --port=' . $dbPort
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE '.$filename.'"';
|
||||
}else{
|
||||
$command = 'mysql'
|
||||
. ' --host=' . $dbHost
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE '.$filename.'"';
|
||||
}
|
||||
shell_exec($command);
|
||||
} else {
|
||||
//If the safe mode of the server is actived
|
||||
@@ -1624,7 +1638,7 @@ class workspaceTools
|
||||
}
|
||||
list ($dbHost, $dbUser, $dbPass) = @explode(SYSTEM_HASH, G::decrypt(HASH_INSTALLATION, SYSTEM_HASH));
|
||||
if($port != ''){
|
||||
$dbHost = $dbHost.$port;
|
||||
$dbHost = $dbHost.$port; //127.0.0.1:3306
|
||||
}
|
||||
$aParameters = array('dbHost'=>$dbHost,'dbUser'=>$dbUser,'dbPass'=>$dbPass);
|
||||
CLI::logging("> Connecting to system database in '$dbHost'\n");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,19 +6,17 @@ class Configuration extends BaseConfiguration
|
||||
$cnn = Propel::getConnection(ConfigurationPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$configuration = new Configuration();
|
||||
$this->setCfgUid($arrayData["CFG_UID"]);
|
||||
$this->setObjUid($arrayData["OBJ_UID"]);
|
||||
$this->setCfgValue((isset($arrayData["CFG_VALUE"]))? $arrayData["CFG_VALUE"] : "");
|
||||
$this->setProUid($arrayData["PRO_UID"]);
|
||||
$this->setUsrUid($arrayData["USR_UID"]);
|
||||
$this->setAppUid($arrayData["APP_UID"]);
|
||||
|
||||
$configuration->setCfgUid($arrayData["CFG_UID"]);
|
||||
$configuration->setObjUid($arrayData["OBJ_UID"]);
|
||||
$configuration->setCfgValue((isset($arrayData["CFG_VALUE"]))? $arrayData["CFG_VALUE"] : "");
|
||||
$configuration->setProUid($arrayData["PRO_UID"]);
|
||||
$configuration->setUsrUid($arrayData["USR_UID"]);
|
||||
$configuration->setAppUid($arrayData["APP_UID"]);
|
||||
|
||||
if ($configuration->validate()) {
|
||||
if ($this->validate()) {
|
||||
$cnn->begin();
|
||||
|
||||
$result = $configuration->save();
|
||||
$result = $this->save();
|
||||
|
||||
$cnn->commit();
|
||||
|
||||
@@ -27,7 +25,7 @@ class Configuration extends BaseConfiguration
|
||||
} else {
|
||||
$msg = "";
|
||||
|
||||
foreach ($configuration->getValidationFailures() as $validationFailure) {
|
||||
foreach ($this->getValidationFailures() as $validationFailure) {
|
||||
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ $_REQUEST['sSymbol']= isset($_REQUEST["sSymbol"])?$_REQUEST["sSymbol"]:'';
|
||||
|
||||
$_SERVER["QUERY_STRING"] = $filter->xssFilterHard($_SERVER["QUERY_STRING"]);
|
||||
|
||||
$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" onLoad="onLoad()" method="post" enctype="multipart/form-data" onsubmit="">';
|
||||
$html = '<title>Upload Variable</title>';
|
||||
$html .= '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" onLoad="onLoad()" method="post" enctype="multipart/form-data" onsubmit="" style="height:0px;">';
|
||||
$html .= '<div id="d_variables">';
|
||||
$html .= '<table width="90%" align="center">';
|
||||
|
||||
|
||||
@@ -999,8 +999,13 @@ class CaseScheduler
|
||||
|
||||
$caseScheduler = new \CaseScheduler();
|
||||
|
||||
$recalculateDate = false;
|
||||
$recalculateTime = false;
|
||||
|
||||
switch ($option) {
|
||||
case "INS":
|
||||
$recalculateDate = true;
|
||||
$recalculateTime = true;
|
||||
break;
|
||||
case "UPD":
|
||||
$arrayDataAux = $caseScheduler->load($caseSchedulerUid);
|
||||
@@ -1023,7 +1028,7 @@ class CaseScheduler
|
||||
$dCurrentDay = (int)(date("d"));
|
||||
$dCurrentMonth = (int)(date("m"));
|
||||
|
||||
$aStartDay = explode("|", $arrayCaseSchedulerData["SCH_START_DAY"]);
|
||||
$aStartDay = ($caseSchedulerOption == 3)? explode("|", $arrayCaseSchedulerData["SCH_START_DAY"]) : array();
|
||||
|
||||
if ($caseSchedulerOption == 3 && $aStartDay[0] == "1") {
|
||||
$monthsArray = explode("|", $sMonths);
|
||||
@@ -1119,7 +1124,7 @@ class CaseScheduler
|
||||
}
|
||||
|
||||
$arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = $arrayData["SCH_REPEAT_EVERY"];
|
||||
$arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = date("Y-m-d H:i", $date + (((int)($arrayData["SCH_REPEAT_EVERY"])) * 60 * 60));
|
||||
$arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = date("Y-m-d H:i:s", $date + (((int)($arrayData["SCH_REPEAT_EVERY"])) * 60 * 60));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,19 +1147,64 @@ class CaseScheduler
|
||||
}
|
||||
|
||||
//Create/Update
|
||||
$caseSchedulerAux = new \CaseScheduler();
|
||||
|
||||
$caseSchedulerUid = "";
|
||||
$arrayCaseSchedulerDataOld = array();
|
||||
|
||||
switch ($option) {
|
||||
case "INS":
|
||||
if (isset($arrayData["CASE_SH_PLUGIN_UID"]) && $arrayData["CASE_SH_PLUGIN_UID"] != "") {
|
||||
$arrayCaseSchedulerData["CASE_SH_PLUGIN_UID"] = $arrayData["CASE_SH_PLUGIN_UID"];
|
||||
}
|
||||
|
||||
$caseScheduler->create($arrayCaseSchedulerData);
|
||||
$result = $caseScheduler->create($arrayCaseSchedulerData);
|
||||
|
||||
$caseSchedulerUid = $caseScheduler->getSchUid();
|
||||
$arrayCaseSchedulerDataOld = $caseSchedulerAux->load($caseSchedulerUid);
|
||||
break;
|
||||
case "UPD":
|
||||
$caseScheduler->update($arrayCaseSchedulerData);
|
||||
$caseSchedulerUid = $caseScheduler->getSchUid();
|
||||
$arrayCaseSchedulerDataOld = $caseSchedulerAux->load($caseSchedulerUid);
|
||||
|
||||
$result = $caseScheduler->update($arrayCaseSchedulerData);
|
||||
break;
|
||||
}
|
||||
|
||||
//Update the SCH_TIME_NEXT_RUN field
|
||||
$caseScheduler = new \CaseScheduler();
|
||||
|
||||
$arrayCaseSchedulerData = $caseScheduler->load($caseSchedulerUid);
|
||||
|
||||
$flagUpdateTimeNextRun = false;
|
||||
|
||||
switch ((int)($arrayCaseSchedulerData["SCH_OPTION"])) {
|
||||
case 1:
|
||||
//Daily
|
||||
$flagUpdateTimeNextRun = $recalculateDate || $recalculateTime;
|
||||
break;
|
||||
case 2:
|
||||
//Weekly
|
||||
$flagUpdateTimeNextRun = $recalculateDate || $recalculateTime || $arrayCaseSchedulerData["SCH_WEEK_DAYS"] != $arrayCaseSchedulerDataOld["SCH_WEEK_DAYS"];
|
||||
break;
|
||||
case 3:
|
||||
//Monthly
|
||||
$flagUpdateTimeNextRun = $recalculateDate || $recalculateTime || $arrayCaseSchedulerData["SCH_START_DAY"] != $arrayCaseSchedulerDataOld["SCH_START_DAY"] || $arrayCaseSchedulerData["SCH_MONTHS"] != $arrayCaseSchedulerDataOld["SCH_MONTHS"];
|
||||
break;
|
||||
case 4:
|
||||
//One time only
|
||||
$flagUpdateTimeNextRun = $arrayCaseSchedulerData["SCH_START_TIME"] != $arrayCaseSchedulerDataOld["SCH_START_TIME"];
|
||||
break;
|
||||
case 5:
|
||||
//Every
|
||||
$flagUpdateTimeNextRun = $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] != $arrayCaseSchedulerDataOld["SCH_REPEAT_EVERY"];
|
||||
break;
|
||||
}
|
||||
|
||||
if ($flagUpdateTimeNextRun) {
|
||||
$caseSchedulerTimeNextRunNew = $caseScheduler->getTimeNextRunByDate($arrayCaseSchedulerData, date("Y-m-d H:i:s"));
|
||||
}
|
||||
|
||||
//Plugin
|
||||
if (isset($arrayData["CASE_SH_PLUGIN_UID"]) && $arrayData["CASE_SH_PLUGIN_UID"] != "") {
|
||||
$oPluginRegistry = &\PMPluginRegistry::getSingleton();
|
||||
|
||||
@@ -333,6 +333,18 @@ class User
|
||||
public function getUserDataFromRecord(array $record)
|
||||
{
|
||||
try {
|
||||
//Get Calendar
|
||||
$calendar = new \Calendar();
|
||||
$calendarInfo = $calendar->getCalendarFor( $record["USR_UID"], "", "" );
|
||||
$aFields["USR_CALENDAR_UID"] = ($calendarInfo["CALENDAR_APPLIED"] != "DEFAULT") ? $calendarInfo["CALENDAR_UID"] : "";
|
||||
$aFields["USR_CALENDAR"] = ($aFields["USR_CALENDAR_UID"] != "") ? $calendar->calendarName( $aFields["USR_CALENDAR_UID"] ) : $aFields["USR_CALENDAR_UID"];
|
||||
|
||||
//Get photo
|
||||
$pathPhotoUser = PATH_IMAGES_ENVIRONMENT_USERS . $record["USR_UID"] . ".gif";
|
||||
if (! file_exists( $pathPhotoUser )) {
|
||||
$pathPhotoUser = PATH_HOME . "public_html" . PATH_SEP . "images" . PATH_SEP . "user.gif";
|
||||
}
|
||||
|
||||
return array(
|
||||
$this->getFieldNameByFormatFieldName("USR_UID") => $record["USR_UID"],
|
||||
$this->getFieldNameByFormatFieldName("USR_USERNAME") => $record["USR_USERNAME"],
|
||||
@@ -359,6 +371,8 @@ class User
|
||||
$this->getFieldNameByFormatFieldName("USR_ROLE") => $record["USR_ROLE"],
|
||||
$this->getFieldNameByFormatFieldName("USR_REPORTS_TO") => $record["USR_REPORTS_TO"],
|
||||
$this->getFieldNameByFormatFieldName("USR_REPLACED_BY") => $record["USR_REPLACED_BY"],
|
||||
$this->getFieldNameByFormatFieldName("USR_CALENDAR_UID") => $aFields["USR_CALENDAR_UID"],
|
||||
$this->getFieldNameByFormatFieldName("USR_CALENDAR_NAME") => $aFields["USR_CALENDAR"],
|
||||
$this->getFieldNameByFormatFieldName("USR_UX") => $record["USR_UX"],
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->getFieldNameByFormatFieldName("USR_COST_BY_HOUR") => $record["USR_COST_BY_HOUR"],
|
||||
@@ -370,7 +384,8 @@ class User
|
||||
$this->getFieldNameByFormatFieldName("USR_TOTAL_PARTICIPATED") => $record["USR_TOTAL_PARTICIPATED"],
|
||||
$this->getFieldNameByFormatFieldName("USR_TOTAL_PAUSED") => $record["USR_TOTAL_PAUSED"],
|
||||
$this->getFieldNameByFormatFieldName("USR_TOTAL_COMPLETED") => $record["USR_TOTAL_COMPLETED"],
|
||||
$this->getFieldNameByFormatFieldName("USR_TOTAL_UNASSIGNED") => $record["USR_TOTAL_UNASSIGNED"]
|
||||
$this->getFieldNameByFormatFieldName("USR_TOTAL_UNASSIGNED") => $record["USR_TOTAL_UNASSIGNED"],
|
||||
$this->getFieldNameByFormatFieldName("USR_PHOTO_PATH") => $pathPhotoUser
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
|
||||
@@ -21,7 +21,7 @@ class Variable
|
||||
|
||||
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
||||
|
||||
$this->existsName($processUid, $arrayData["VAR_NAME"]);
|
||||
$this->existsName($processUid, $arrayData["VAR_NAME"], "");
|
||||
|
||||
$this->throwExceptionFieldDefinition($arrayData);
|
||||
|
||||
@@ -142,7 +142,8 @@ class Variable
|
||||
if ($variable->validate()) {
|
||||
$cnn->begin();
|
||||
if (isset($arrayData["VAR_NAME"])) {
|
||||
$this->existsName($processUid, $arrayData["VAR_NAME"]);
|
||||
$this->existsName($processUid, $arrayData["VAR_NAME"], $variableUid);
|
||||
|
||||
$variable->setVarName($arrayData["VAR_NAME"]);
|
||||
}
|
||||
if (isset($arrayData["VAR_FIELD_TYPE"])) {
|
||||
@@ -428,18 +429,30 @@ class Variable
|
||||
* @param string $variableName Name
|
||||
*
|
||||
*/
|
||||
public function existsName($processUid, $variableName)
|
||||
public function existsName($processUid, $variableName, $variableUidToExclude = "")
|
||||
{
|
||||
try {
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_UID);
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_NAME);
|
||||
|
||||
if ($variableUidToExclude != "") {
|
||||
$criteria->add(\ProcessVariablesPeer::VAR_UID, $variableUidToExclude, \Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
$criteria->add(\ProcessVariablesPeer::VAR_NAME, $variableName, \Criteria::EQUAL);
|
||||
$criteria->add(\ProcessVariablesPeer::PRJ_UID, $processUid, \Criteria::EQUAL);
|
||||
$rsCriteria = \ProcessVariablesPeer::doSelectRS($criteria);
|
||||
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$rsCriteria->next();
|
||||
if ($rsCriteria->getRow()) {
|
||||
throw new \Exception(\G::LoadTranslation("DYNAFIELD_ALREADY_EXIST"));
|
||||
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
if ($variableName == $row["VAR_NAME"]) {
|
||||
throw new \Exception(\G::LoadTranslation("DYNAFIELD_ALREADY_EXIST"));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
@@ -517,7 +530,7 @@ class Variable
|
||||
$field = $pmDynaform->searchField($arrayVariable["dyn_uid"], $arrayVariable["field_id"]);
|
||||
$variableDbConnectionUid = $field !== null ? $field->dbConnection : "";
|
||||
$variableSql = $field !== null ? $field->sql : "";
|
||||
|
||||
|
||||
//Get data
|
||||
$_SESSION["PROCESS"] = $processUid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user