Merged colosa/processmaker into master
This commit is contained in:
9
gulliver/thirdparty/propel/Propel.php
vendored
9
gulliver/thirdparty/propel/Propel.php
vendored
@@ -602,11 +602,12 @@ class Propel {
|
||||
|
||||
foreach (self::$connectionMap as $cnn) {
|
||||
if (get_class($cnn) != "DBArrayConnection") {
|
||||
if (gettype($cnn->getResource()) == "resource" && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
||||
$cnn->close();
|
||||
if(isset($cnn->lastQuery)){
|
||||
if (gettype($cnn->getResource()) == "resource" && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
||||
$cnn->close();
|
||||
}
|
||||
$lastQuery = $cnn->lastQuery;
|
||||
}
|
||||
|
||||
$lastQuery = $cnn->lastQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ CLI::taskOpt("multiple", "Restore from multiple compresed enumerated files.", "m
|
||||
CLI::taskOpt("workspace", "Select which workspace to restore if multiple workspaces are present in the archive.",
|
||||
"w:", "workspace=");
|
||||
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
||||
CLI::taskOpt("port", "You must specify mysql port.", "p:");
|
||||
CLI::taskRun("run_workspace_restore");
|
||||
|
||||
CLI::taskName('cacheview-repair');
|
||||
@@ -327,6 +328,7 @@ function database_upgrade($command, $args) {
|
||||
print_r("Checking database in ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||
else
|
||||
print_r("Upgrading database in ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||
|
||||
try {
|
||||
$changes = $workspace->upgradeDatabase($checkOnly);
|
||||
if ($changes != false) {
|
||||
@@ -346,51 +348,6 @@ function database_upgrade($command, $args) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
//There records in table "EMAIL_SERVER"
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_UID);
|
||||
$criteria->setOffset(0);
|
||||
$criteria->setLimit(1);
|
||||
|
||||
$rsCriteria = EmailServerPeer::doSelectRS($criteria);
|
||||
|
||||
if (!$rsCriteria->next()) {
|
||||
//Insert the first record
|
||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
||||
|
||||
$emailConfiguration = System::getEmailConfiguration();
|
||||
|
||||
if (count($emailConfiguration) > 0) {
|
||||
$arrayData = array();
|
||||
|
||||
$arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"];
|
||||
$arrayData["MESS_SERVER"] = $emailConfiguration["MESS_SERVER"];
|
||||
$arrayData["MESS_PORT"] = (int)($emailConfiguration["MESS_PORT"]);
|
||||
$arrayData["MESS_RAUTH"] = (int)($emailConfiguration["MESS_RAUTH"]);
|
||||
$arrayData["MESS_ACCOUNT"] = $emailConfiguration["MESS_ACCOUNT"];
|
||||
$arrayData["MESS_PASSWORD"] = $emailConfiguration["MESS_PASSWORD"];
|
||||
$arrayData["MESS_FROM_MAIL"] = isset($emailConfiguration["MESS_FROM_MAIL"]) ? $emailConfiguration["MESS_FROM_MAIL"] : "";
|
||||
$arrayData["MESS_FROM_NAME"] = isset($emailConfiguration["MESS_FROM_NAME"]) ? $emailConfiguration["MESS_FROM_NAME"] : "";
|
||||
$arrayData["SMTPSECURE"] = $emailConfiguration["SMTPSecure"];
|
||||
$arrayData["MESS_TRY_SEND_INMEDIATLY"] = (int)($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]);
|
||||
$arrayData["MAIL_TO"] = $emailConfiguration["MAIL_TO"];
|
||||
$arrayData["MESS_DEFAULT"] = (isset($emailConfiguration["MESS_ENABLED"]) && $emailConfiguration["MESS_ENABLED"] . "" == "1")? 1 : 0;
|
||||
|
||||
$arrayData = $emailSever->create($arrayData);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayData = $emailSever->create2(array("MESS_ENGINE" => "MAIL"));
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function delete_app_from_table($con, $tableName, $appUid, $col="APP_UID") {
|
||||
@@ -551,6 +508,7 @@ function run_workspace_restore($args, $opts) {
|
||||
}
|
||||
$info = array_key_exists("info", $opts);
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
$port = array_key_exists("port", $opts) ? $opts['port'] : '';
|
||||
if ($info) {
|
||||
workspaceTools::getBackupInfo($filename);
|
||||
} else {
|
||||
@@ -578,7 +536,7 @@ function run_workspace_restore($args, $opts) {
|
||||
CLI::error("Please, you should use -m parameter to restore them.\n");
|
||||
return;
|
||||
}
|
||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite, $lang);
|
||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite, $lang, $port );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -680,7 +638,7 @@ function run_check_workspace_disabled_code($args, $opts)
|
||||
}
|
||||
}
|
||||
|
||||
function migrate_new_cases_lists($command, $args) {
|
||||
function migrate_new_cases_lists($command, $args) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
$checkOnly = (strcmp($command, "migrate") == 0);
|
||||
foreach ($workspaces as $workspace) {
|
||||
@@ -701,11 +659,11 @@ function migrate_new_cases_lists($command, $args) {
|
||||
$changes = $workspace->listFirstExecution('check');
|
||||
if ($workspace->onedb && $changes != true) {
|
||||
$workspace->migrateList($workspace->name);
|
||||
}
|
||||
}
|
||||
if ($changes) {
|
||||
if ($checkOnly) {
|
||||
echo "-> List tables are done\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "> List tables are done\n";
|
||||
}
|
||||
|
||||
@@ -968,7 +968,7 @@ class Processes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($oData->taskExtraProperties)) {
|
||||
foreach ($oData->taskExtraProperties as $key => $value) {
|
||||
$record = $value;
|
||||
@@ -3642,8 +3642,12 @@ class Processes
|
||||
//Calculating the maximum length of file name
|
||||
$pathLength = strlen( PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP );
|
||||
$length = strlen( $proTitle ) + $pathLength;
|
||||
if ($length >= 250) {
|
||||
$proTitle = myTruncate( $proTitle, 250 - $pathLength, '_', '' );
|
||||
$limit = 200;
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$limit = 150;
|
||||
}
|
||||
if ($length >= $limit) {
|
||||
$proTitle = $this->truncateName($proTitle);
|
||||
}
|
||||
$index = '';
|
||||
|
||||
@@ -3751,9 +3755,9 @@ class Processes
|
||||
}
|
||||
}
|
||||
|
||||
//For public files
|
||||
// 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();
|
||||
|
||||
@@ -4126,6 +4130,7 @@ class Processes
|
||||
$fsData = intval( fread( $fp, 9 ) ); //reading the size of $oData
|
||||
$contents = fread( $fp, $fsData ); //reading string $oData
|
||||
|
||||
|
||||
$path = PATH_DYNAFORM . $oData->process['PRO_UID'] . PATH_SEP;
|
||||
if (! is_dir( $path )) {
|
||||
G::verifyPath( $path, true );
|
||||
@@ -4245,7 +4250,7 @@ class Processes
|
||||
if ($fsContent > 0) {
|
||||
$fileContent = fread( $fp, $fsContent ); //reading string $XmlContent
|
||||
$newFileName = $pathPublic . $sFileName;
|
||||
|
||||
|
||||
if (in_array($sFileName, $arrayWebEntryFile)) {
|
||||
continue;
|
||||
}
|
||||
@@ -4262,6 +4267,7 @@ class Processes
|
||||
fclose( $fp );
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5161,6 +5167,18 @@ class Processes
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function truncateName($proTitle)
|
||||
{
|
||||
$proTitle = str_replace(".","_",$proTitle);
|
||||
$limit = 200;
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$limit = 150;
|
||||
}
|
||||
$excess = strlen($proTitle) - $limit;
|
||||
$proTitle = substr($proTitle,0,strlen($proTitle)-$excess);
|
||||
return $proTitle;
|
||||
}
|
||||
}
|
||||
//end class processes
|
||||
|
||||
|
||||
@@ -781,7 +781,75 @@ class workspaceTools
|
||||
$this->upgradeSchema( $systemSchema );
|
||||
$this->upgradeSchema( $systemSchemaRbac, false, true, $onedb ); // perform Upgrade to Rbac
|
||||
$this->upgradeData();
|
||||
|
||||
//There records in table "EMAIL_SERVER"
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_UID);
|
||||
$criteria->setOffset(0);
|
||||
$criteria->setLimit(1);
|
||||
|
||||
$rsCriteria = EmailServerPeer::doSelectRS($criteria);
|
||||
|
||||
if (!$rsCriteria->next()) {
|
||||
//Insert the first record
|
||||
$arrayData = array();
|
||||
|
||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
||||
$emailConfiguration = System::getEmailConfiguration();
|
||||
|
||||
if (count($emailConfiguration) > 0) {
|
||||
$arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"];
|
||||
|
||||
switch ($emailConfiguration["MESS_ENGINE"]) {
|
||||
case "PHPMAILER":
|
||||
$arrayData["MESS_SERVER"] = $emailConfiguration["MESS_SERVER"];
|
||||
$arrayData["MESS_PORT"] = (int)($emailConfiguration["MESS_PORT"]);
|
||||
$arrayData["MESS_RAUTH"] = (is_numeric($emailConfiguration["MESS_RAUTH"]))? (int)($emailConfiguration["MESS_RAUTH"]) : (($emailConfiguration["MESS_RAUTH"] . "" == "true")? 1 : 0);
|
||||
$arrayData["MESS_ACCOUNT"] = $emailConfiguration["MESS_ACCOUNT"];
|
||||
$arrayData["MESS_PASSWORD"] = $emailConfiguration["MESS_PASSWORD"];
|
||||
$arrayData["MESS_FROM_MAIL"] = (isset($emailConfiguration["MESS_FROM_MAIL"]))? $emailConfiguration["MESS_FROM_MAIL"] : "";
|
||||
$arrayData["MESS_FROM_NAME"] = (isset($emailConfiguration["MESS_FROM_NAME"]))? $emailConfiguration["MESS_FROM_NAME"] : "";
|
||||
$arrayData["SMTPSECURE"] = $emailConfiguration["SMTPSecure"];
|
||||
$arrayData["MESS_TRY_SEND_INMEDIATLY"] = (isset($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]) && ($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"] . "" == "true" || $emailConfiguration["MESS_TRY_SEND_INMEDIATLY"] . "" == "1"))? 1 : 0;
|
||||
$arrayData["MAIL_TO"] = $emailConfiguration["MAIL_TO"];
|
||||
$arrayData["MESS_DEFAULT"] = (isset($emailConfiguration["MESS_ENABLED"]) && $emailConfiguration["MESS_ENABLED"] . "" == "1")? 1 : 0;
|
||||
break;
|
||||
case "MAIL":
|
||||
$arrayData["MESS_SERVER"] = "";
|
||||
$arrayData["MESS_FROM_MAIL"] = (isset($emailConfiguration["MESS_FROM_MAIL"]))? $emailConfiguration["MESS_FROM_MAIL"] : "";
|
||||
$arrayData["MESS_FROM_NAME"] = (isset($emailConfiguration["MESS_FROM_NAME"]))? $emailConfiguration["MESS_FROM_NAME"] : "";
|
||||
$arrayData["MESS_TRY_SEND_INMEDIATLY"] = (isset($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]) && ($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"] . "" == "true" || $emailConfiguration["MESS_TRY_SEND_INMEDIATLY"] . "" == "1"))? 1 : 0;
|
||||
$arrayData["MESS_ACCOUNT"] = "";
|
||||
$arrayData["MESS_PASSWORD"] = "";
|
||||
$arrayData["MAIL_TO"] = (isset($emailConfiguration["MAIL_TO"]))? $emailConfiguration["MAIL_TO"] : "";
|
||||
$arrayData["MESS_DEFAULT"] = (isset($emailConfiguration["MESS_ENABLED"]) && $emailConfiguration["MESS_ENABLED"] . "" == "1")? 1 : 0;
|
||||
break;
|
||||
}
|
||||
|
||||
$arrayData = $emailSever->create($arrayData);
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayData["MESS_ENGINE"] = "MAIL";
|
||||
$arrayData["MESS_SERVER"] = "";
|
||||
$arrayData["MESS_ACCOUNT"] = "";
|
||||
$arrayData["MESS_PASSWORD"] = "";
|
||||
$arrayData["MAIL_TO"] = "";
|
||||
$arrayData["MESS_DEFAULT"] = 1;
|
||||
|
||||
$arrayData = $emailSever->create2($arrayData);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
|
||||
p11835::execute();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1303,6 +1371,8 @@ class workspaceTools
|
||||
mysql_select_db($database);
|
||||
$script = file_get_contents($filename);
|
||||
|
||||
//Replace TYPE by ENGINE
|
||||
$script = preg_replace('/\)TYPE\=|\)\sTYPE\=/', ')ENGINE=', $script);
|
||||
$lines = explode("\n", $script);
|
||||
$previous = null;
|
||||
$insert = false;
|
||||
@@ -1434,7 +1504,7 @@ class workspaceTools
|
||||
* @param string $newWorkspaceName if defined, supplies the name for the
|
||||
* workspace to restore to
|
||||
*/
|
||||
static public function restore($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true, $lang = 'en')
|
||||
static public function restore($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true, $lang = 'en', $port = '')
|
||||
{
|
||||
G::LoadThirdParty('pear/Archive', 'Tar');
|
||||
$backup = new Archive_Tar($filename);
|
||||
@@ -1553,6 +1623,9 @@ class workspaceTools
|
||||
CLI::logging(CLI::error("Could not get the shared folder permissions, not changing workspace permissions") . "\n");
|
||||
}
|
||||
list ($dbHost, $dbUser, $dbPass) = @explode(SYSTEM_HASH, G::decrypt(HASH_INSTALLATION, SYSTEM_HASH));
|
||||
if($port != ''){
|
||||
$dbHost = $dbHost.$port;
|
||||
}
|
||||
$aParameters = array('dbHost'=>$dbHost,'dbUser'=>$dbUser,'dbPass'=>$dbPass);
|
||||
CLI::logging("> Connecting to system database in '$dbHost'\n");
|
||||
$link = mysql_connect($dbHost, $dbUser, $dbPass);
|
||||
@@ -1886,7 +1959,7 @@ class workspaceTools
|
||||
$users = new Users();
|
||||
G::LoadClass("case");
|
||||
$case = new Cases();
|
||||
|
||||
|
||||
//Select data CANCELLED
|
||||
$canCriteria = $appCache->getSelAllColumns();
|
||||
$canCriteria->add(AppCacheViewPeer::APP_STATUS, "CANCELLED", CRITERIA::EQUAL);
|
||||
@@ -1902,7 +1975,7 @@ class workspaceTools
|
||||
$listCanceled->create($row);
|
||||
}
|
||||
CLI::logging("> Completed table LIST_CANCELED\n");
|
||||
|
||||
|
||||
//Select data COMPLETED
|
||||
$comCriteria = $appCache->getSelAllColumns();
|
||||
$comCriteria->add(AppCacheViewPeer::APP_STATUS, "COMPLETED", CRITERIA::EQUAL);
|
||||
@@ -1918,7 +1991,7 @@ class workspaceTools
|
||||
$listCompleted->create($row);
|
||||
}
|
||||
CLI::logging("> Completed table LIST_COMPLETED\n");
|
||||
|
||||
|
||||
//Select data TO_DO OR DRAFT
|
||||
$inbCriteria = $appCache->getSelAllColumns();
|
||||
$rsCriteria = AppCacheViewPeer::doSelectRS($inbCriteria);
|
||||
@@ -1967,14 +2040,14 @@ class workspaceTools
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->refresh($row);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
CLI::logging("> Completed table LIST_INBOX\n");
|
||||
//With this List is populated the LIST_PARTICIPATED_HISTORY and LIST_PARTICIPATED_LAST
|
||||
CLI::logging("> Completed table LIST_PARTICIPATED_HISTORY\n");
|
||||
CLI::logging("> Completed table LIST_PARTICIPATED_LAST\n");
|
||||
|
||||
|
||||
//Select data TO_DO OR DRAFT CASES CREATED BY AN USER
|
||||
$myiCriteria = $appCache->getSelAllColumns();
|
||||
$myiCriteria->add(AppCacheViewPeer::DEL_INDEX, "1", CRITERIA::EQUAL);
|
||||
@@ -1982,14 +2055,14 @@ class workspaceTools
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
//Insert new data LIST_MY_INBOX
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
$row = $rsCriteria->getRow();
|
||||
$listMyInbox = new ListMyInbox();
|
||||
$listMyInbox ->remove($row["APP_UID"],$row["USR_UID"]);
|
||||
$listMyInbox->setDeleted(false);
|
||||
$listMyInbox->create($row);
|
||||
}
|
||||
CLI::logging("> Completed table LIST_MY_INBOX\n");
|
||||
|
||||
|
||||
//Select data PAUSED
|
||||
$delaycriteria = new Criteria("workflow");
|
||||
$delaycriteria->addSelectColumn(AppDelayPeer::APP_UID);
|
||||
@@ -2011,11 +2084,12 @@ class workspaceTools
|
||||
$data = $row;
|
||||
$data["DEL_INDEX"] = $row["APP_DEL_INDEX"];
|
||||
$listPaused = new ListPaused();
|
||||
$listPaused ->remove($row["APP_UID"],$row["APP_DEL_INDEX"],$data);
|
||||
$listPaused->setDeleted(false);
|
||||
$listPaused->create($data);
|
||||
}
|
||||
CLI::logging("> Completed table LIST_PAUSED\n");
|
||||
|
||||
|
||||
//Select and Insert LIST_UNASSIGNED
|
||||
$unaCriteria = $appCache->getSelAllColumns();
|
||||
$unaCriteria->add(AppCacheViewPeer::USR_UID, "", CRITERIA::EQUAL);
|
||||
@@ -2024,12 +2098,12 @@ class workspaceTools
|
||||
$del = new ListUnassignedPeer();
|
||||
$del->doDeleteAll();
|
||||
$del = new ListUnassignedGroupPeer();
|
||||
$del->doDeleteAll();
|
||||
$del->doDeleteAll();
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
$listUnassigned = new ListUnassigned();
|
||||
$unaUid = $listUnassigned->generateData($row["APP_UID"],$row["PREVIOUS_USR_UID"]);
|
||||
}
|
||||
$unaUid = $listUnassigned->generateData($row["APP_UID"],$row["PREVIOUS_USR_UID"]);
|
||||
}
|
||||
CLI::logging("> Completed table LIST_UNASSIGNED\n");
|
||||
CLI::logging("> Completed table LIST_UNASSIGNED_GROUP\n");
|
||||
|
||||
@@ -2070,7 +2144,7 @@ class workspaceTools
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks if List tables are going to migrated
|
||||
* This function checks if List tables are going to migrated
|
||||
*
|
||||
* return boolean value
|
||||
*/
|
||||
@@ -2109,6 +2183,6 @@ class workspaceTools
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -373,11 +373,11 @@ class XmlForm_Field_hours extends XmlForm_Field_SimpleText
|
||||
* @param eter boolean $bSystemVars
|
||||
* @return array
|
||||
*/
|
||||
function getDynaformsVars ($sProcessUID, $bSystemVars = true, $bIncMulSelFields = 0)
|
||||
function getDynaformsVars ($sProcessUID, $typeVars = 'all', $bIncMulSelFields = 0)
|
||||
{
|
||||
$aFields = array ();
|
||||
$aFieldsNames = array ();
|
||||
if ($bSystemVars) {
|
||||
if ($typeVars == 'system' || $typeVars == 'all') {
|
||||
$aAux = G::getSystemConstants();
|
||||
foreach ($aAux as $sName => $sValue) {
|
||||
$aFields[] = array ('sName' => $sName,'sType' => 'system','sLabel' => G::LoadTranslation('ID_TINY_SYSTEM_VARIABLES'));
|
||||
@@ -401,21 +401,54 @@ function getDynaformsVars ($sProcessUID, $bSystemVars = true, $bIncMulSelFields
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
if (isset($row["PRJ_UID"])) {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_UID);
|
||||
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_NAME);
|
||||
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_FIELD_TYPE);
|
||||
$oCriteria->add(ProcessVariablesPeer::PRJ_UID, $sProcessUID);
|
||||
$oDataset = DynaformPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
while ($oDataset->next()) {
|
||||
$row = $oDataset->getRow();
|
||||
array_push($aFields, array(
|
||||
"sName" => $row["VAR_NAME"],
|
||||
"sType" => $row["VAR_FIELD_TYPE"],
|
||||
"sLabel" => $row["VAR_NAME"] . " [" . $row["VAR_FIELD_TYPE"] . "]"
|
||||
));
|
||||
if($typeVars == 'process' || $typeVars == 'all') {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_UID);
|
||||
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_NAME);
|
||||
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_FIELD_TYPE);
|
||||
$oCriteria->add(ProcessVariablesPeer::PRJ_UID, $sProcessUID);
|
||||
$oDataset = DynaformPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
while ($oDataset->next()) {
|
||||
$row = $oDataset->getRow();
|
||||
array_push($aFields, array(
|
||||
"sName" => $row["VAR_NAME"],
|
||||
"sType" => $row["VAR_FIELD_TYPE"],
|
||||
"sLabel" => $row["VAR_FIELD_TYPE"]
|
||||
));
|
||||
}
|
||||
}
|
||||
if($typeVars == 'grid' || $typeVars == 'all') {
|
||||
$oC = new Criteria( 'workflow' );
|
||||
$oC->addSelectColumn( DynaformPeer::DYN_CONTENT );
|
||||
$oC->add( DynaformPeer::PRO_UID, $sProcessUID );
|
||||
$oC->add( DynaformPeer::DYN_TYPE, 'xmlform' );
|
||||
$oData = DynaformPeer::doSelectRS( $oC );
|
||||
$oData->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oData->next();
|
||||
while ($aRowd = $oData->getRow()) {
|
||||
$dynaform = G::json_decode($aRowd['DYN_CONTENT'],true);
|
||||
if(is_array($dynaform) && sizeof($dynaform)) {
|
||||
$items = $dynaform['items'][0]['items'];
|
||||
foreach($items as $key => $val){
|
||||
if($val[0]['type'] == 'grid'){
|
||||
if(sizeof($val[0]['columns'])) {
|
||||
$columns = $val[0]['columns'];
|
||||
foreach($columns as $column) {
|
||||
array_push($aFields, array(
|
||||
"sName" => $column['name'],
|
||||
"sType" => $column['type'],
|
||||
"sLabel" => $column['type']
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$oData->next();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
|
||||
@@ -1,19 +1,35 @@
|
||||
var setVariablePickerJS = function(){
|
||||
if (document.getElementById('_Var_Form_').addEventListener) // W3C DOM
|
||||
document.getElementById('_Var_Form_').addEventListener('dblclick', function(){
|
||||
if (this.getAttribute('displayOption')=='event'){
|
||||
e.insertFormVar(this.value.substring(2), this.value.substring(2), 'dyn' );
|
||||
if(this.value.substring(0,5) == 'gridt') {
|
||||
try {
|
||||
updateEditorContent(this.value.substring(5));
|
||||
} catch(err) {
|
||||
closePluginPopup();
|
||||
}
|
||||
} else {
|
||||
insertFormVar(document.getElementById('selectedField').value, this.value);
|
||||
if (this.getAttribute('displayOption')=='event'){
|
||||
e.insertFormVar(this.value.substring(2), this.value.substring(2), 'dyn' );
|
||||
} else {
|
||||
insertFormVar(document.getElementById('selectedField').value, this.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
else if (document.getElementById('selectedField').attachEvent) { // IE DOM
|
||||
var element = document.getElementById('_Var_Form_');
|
||||
element.attachEvent("ondblclick", function(){
|
||||
if (element.displayOption=='event'){
|
||||
e.insertFormVar(element.value.substring(2), element.value.substring(2), 'dyn' );
|
||||
} else {
|
||||
insertFormVar(document.getElementById('selectedField').value, element.value);
|
||||
if(element.value.substring(0,5) == 'gridt') {
|
||||
try {
|
||||
updateEditorContent(element.value.substring(5));
|
||||
} catch(err) {
|
||||
closePluginPopup();
|
||||
}
|
||||
} else {
|
||||
if (element.displayOption=='event'){
|
||||
e.insertFormVar(element.value.substring(2), element.value.substring(2), 'dyn' );
|
||||
} else {
|
||||
insertFormVar(document.getElementById('selectedField').value, element.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -99,7 +115,12 @@ var setVariablePickerJS = function(){
|
||||
});
|
||||
|
||||
leimnud.event.add(document.getElementById('_Var_Form_'), 'change', function(event) {
|
||||
document.getElementById('selectedVariableLabel').textContent = document.getElementById('_Var_Form_').value
|
||||
var selectElement = document.getElementById('_Var_Form_');
|
||||
if(selectElement.value.substring(0,5) == 'gridt') {
|
||||
document.getElementById('selectedVariableLabel').textContent = selectElement.options[selectElement.selectedIndex].text;
|
||||
} else {
|
||||
document.getElementById('selectedVariableLabel').textContent = selectElement.value
|
||||
}
|
||||
});
|
||||
|
||||
leimnud.event.add(document.getElementById('search'), 'keypress', function(e) {
|
||||
@@ -130,6 +151,7 @@ var setVariablePickerJS = function(){
|
||||
var list = getVariableList(document.getElementById('search').value, document.getElementById('process').value, document.getElementById('type_variables').value);
|
||||
var combo = document.getElementById("_Var_Form_");
|
||||
var option = document.createElement('option');
|
||||
var isBpmn = document.getElementById('isBpmn').value;
|
||||
|
||||
for(i=(combo.length-1); i>=0; i--)
|
||||
{
|
||||
@@ -140,8 +162,15 @@ var setVariablePickerJS = function(){
|
||||
if(list.length>0){
|
||||
for(i=0; i<list.length; i++)
|
||||
{
|
||||
var optionValue = prefix+list[i].sName;
|
||||
if(isBpmn) {
|
||||
if(list[i].sLabel.toLowerCase() == 'grid') {
|
||||
var gridValue = 'gridt<table border=1 cellspacing=0><tr><th>Header_1</th></tr><tbody><!--@>'+list[i].sName+'--><tr><td>column_name1</td></tr><!--@<'+list[i].sName+'--></tbody></table>';
|
||||
optionValue = gridValue;
|
||||
}
|
||||
}
|
||||
option = document.createElement("OPTION");
|
||||
option.value = prefix+list[i].sName;
|
||||
option.value = optionValue;
|
||||
option.text = prefix+list[i].sName+' ('+list[i].sLabel+')';
|
||||
combo.add(option);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,20 @@ $html .= '<select name="type_variables" id="type_variables">';
|
||||
$html .= '<option value="all">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_ALL_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="system">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_SYSTEM_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="process">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_PROCESS_VARIABLES' )).'</option>';
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(BpmnProjectPeer::PRJ_UID);
|
||||
$oCriteria->add(BpmnProjectPeer::PRJ_UID, $_REQUEST['sProcess']);
|
||||
$oDataset = ProcessPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
$isBpmn = false;
|
||||
if (isset($row["PRJ_UID"])) {
|
||||
$isBpmn = true;
|
||||
$html .= '<option value="grid">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_GRID_VARIABLES' )).'</option>';
|
||||
}
|
||||
|
||||
$html .= '</select> ';
|
||||
$html .= '</td>';
|
||||
|
||||
@@ -104,7 +118,14 @@ if (isset($_REQUEST['displayOption'])){
|
||||
$html .= '<select name="_Var_Form_" id="_Var_Form_" size="8" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:170;' : '') . '" '.$displayOption.'>';
|
||||
|
||||
foreach ($aFields as $aField) {
|
||||
$html .= '<option value="' . $_REQUEST['sSymbol'] . $aField['sName'] . '">' . $_REQUEST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
||||
$value = $_REQUEST['sSymbol'] . $aField['sName'];
|
||||
if ($isBpmn) {
|
||||
if(strtolower($aField['sType']) == 'grid') {
|
||||
$gridValue = 'gridt<table border=1 cellspacing=0> <tr> <th>Header_1</th> </tr> <!--@>'.$aField['sName'].'--> <tr> <td>column_name1</td> </tr><!--@<'.$aField['sName'].'--> </table>';
|
||||
$value = htmlentities($gridValue);
|
||||
}
|
||||
}
|
||||
$html .= '<option value="' . $value . '">' . $_REQUEST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
||||
}
|
||||
|
||||
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char');
|
||||
@@ -114,6 +135,13 @@ foreach ($aFields as $aField) {
|
||||
}
|
||||
$html .= '</select>';
|
||||
|
||||
if ($isBpmn) {
|
||||
$valueBpmn = 1;
|
||||
} else {
|
||||
$valueBpmn = 0;
|
||||
}
|
||||
$html .= '<input type="hidden" id="isBpmn" value="'.$valueBpmn.'">';
|
||||
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
$html .= '</table>';
|
||||
|
||||
@@ -806,15 +806,21 @@ try {
|
||||
G::LoadClass('xmlfield_InputPM');
|
||||
$proUid = isset($_REQUEST['process']) ? $_REQUEST['process'] : '';
|
||||
$queryText = isset($_REQUEST['queryText']) ? $_REQUEST['queryText'] : '';
|
||||
if ($_REQUEST['type'] == 'system') {
|
||||
$isSystem = true;
|
||||
} else {
|
||||
$isSystem = false;
|
||||
switch($_REQUEST['type']) {
|
||||
case 'system';
|
||||
$typeVars = $_REQUEST['type'];
|
||||
break;
|
||||
case 'process';
|
||||
$typeVars = $_REQUEST['type'];
|
||||
break;
|
||||
case 'grid';
|
||||
$typeVars = $_REQUEST['type'];
|
||||
break;
|
||||
}
|
||||
if ($_REQUEST['type'] == 'all') {
|
||||
$aFields = getDynaformsVars($proUid);
|
||||
} else {
|
||||
$aFields = getDynaformsVars($proUid, $isSystem, isset($_REQUEST['bIncMulSelFields']) ? $_REQUEST['bIncMulSelFields'] : 1);
|
||||
$aFields = getDynaformsVars($proUid, $typeVars, isset($_REQUEST['bIncMulSelFields']) ? $_REQUEST['bIncMulSelFields'] : 1);
|
||||
}
|
||||
$aVariables = array();
|
||||
|
||||
|
||||
@@ -32,10 +32,11 @@ try {
|
||||
}
|
||||
if (\BpmnProject::exists($_GET["pro_uid"])) {
|
||||
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(),false);
|
||||
|
||||
$version = ProcessMaker\Util\Common::getLastVersion($outputDir . $exporter->getProjectName() . "-*.pmx") + 1;
|
||||
$outputFilename = sprintf("%s-%s.%s", str_replace(" ", "_", $exporter->getProjectName()), $version, "pmx");
|
||||
$exporter->saveExport($outputDir . $outputFilename);
|
||||
$version = ProcessMaker\Util\Common::getLastVersion($outputDir . $getProjectName . "-*.pmx") + 1;
|
||||
$outputFilename = sprintf("%s-%s.%s", str_replace(" ","_",$getProjectName), $version, "pmx");
|
||||
$outputFilename = $exporter->saveExport($outputDir . $outputFilename);
|
||||
} else {
|
||||
$oProcess = new Processes();
|
||||
$proFields = $oProcess->serializeProcess($_GET["pro_uid"]);
|
||||
@@ -47,15 +48,15 @@ try {
|
||||
$response->file_hash = base64_encode($outputFilename);
|
||||
$response->success = true;
|
||||
|
||||
/* Render page */
|
||||
/* Render page */
|
||||
if (isset( $_REQUEST["processMap"] ) && $_REQUEST["processMap"] == 1) {
|
||||
$link = parse_url($result['FILENAME_LINK']);
|
||||
$result['FILENAME_LINK'] = $link['path'] . '?file_hash=' . $response->file_hash;
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "xmlform", "xmlform", "processes/processes_Export", "", $result );
|
||||
|
||||
G::RenderPage( "publish", "raw" );
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( "xmlform", "xmlform", "processes/processes_Export", "", $result );
|
||||
|
||||
G::RenderPage( "publish", "raw" );
|
||||
} else{
|
||||
echo json_encode($response);
|
||||
}
|
||||
|
||||
@@ -219,6 +219,10 @@ ul.x-tab-strip-bottom{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.x-form-check-wrap {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.x-editor .x-form-check-wrap {
|
||||
background-color:#fff;
|
||||
}
|
||||
@@ -304,6 +308,7 @@ ul.x-tab-strip-bottom{
|
||||
|
||||
.x-fieldset {
|
||||
border-color:#CCCCCC;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.x-fieldset legend {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
}
|
||||
#loading{
|
||||
position:absolute;
|
||||
left:40%;
|
||||
left:45%;
|
||||
top:37%;
|
||||
padding:2px;
|
||||
z-index:20001;
|
||||
|
||||
@@ -362,6 +362,11 @@ textarea.x-form-field {
|
||||
border-bottom: 1px solid #dddddd;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.x-form-check-wrap {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.x-editor .x-form-check-wrap {
|
||||
background-color: #fff;
|
||||
}
|
||||
@@ -431,6 +436,7 @@ textarea.x-form-inner-invalid {
|
||||
}
|
||||
.x-fieldset {
|
||||
border-color: #CCCCCC;
|
||||
margin-top: -5px;
|
||||
}
|
||||
.x-fieldset legend {
|
||||
font: bold 11px "Open Sans", Tahoma, sans-serif, MiscFixed;
|
||||
@@ -1465,6 +1471,7 @@ a.x-menu-item {
|
||||
}
|
||||
.x-panel-body .x-panel-body {
|
||||
border: #dddddd 1px solid;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.x-panel-bbar .x-toolbar,
|
||||
.x-panel-tbar .x-toolbar {
|
||||
|
||||
@@ -246,31 +246,31 @@ class DataBaseConnection
|
||||
|
||||
// STEP 3 : Trying to connect to host
|
||||
$respTest['2'] = array();
|
||||
$respTest['2']['test'] = 'Trying to connect to host ' . $dataCon['DBS_SERVER'] . (($dataCon['DBS_PORT'] != '') ? ':'.$dataCon['DBS_PORT'] : '');
|
||||
$respTest['2']['test'] = 'Connecting to host ' . $dataCon['DBS_SERVER'] . (($dataCon['DBS_PORT'] != '') ? ':'.$dataCon['DBS_PORT'] : '');
|
||||
$Server->loginDbServer($dataCon['DBS_USERNAME'], $dataCon['DBS_PASSWORD']);
|
||||
$Server->setDataBase($dataCon['DBS_DATABASE_NAME'], $dataCon['DBS_PORT']);
|
||||
if ($Server->errno == 0) {
|
||||
$response = $Server->tryConnectServer($dataCon['DBS_TYPE']);
|
||||
if ($response->status != 'SUCCESS') {
|
||||
if ($returnArray) {
|
||||
$respTest['2']['error'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
|
||||
$respTest['2']['error'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error;
|
||||
} else {
|
||||
$resp['message'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
|
||||
$resp['message'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error;
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($returnArray) {
|
||||
$respTest['2']['error'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
|
||||
$respTest['2']['error'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error;
|
||||
} else {
|
||||
$resp['message'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
|
||||
$resp['message'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error;
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
|
||||
// STEP 4 : Trying to open database
|
||||
$respTest['3'] = array();
|
||||
$respTest['3']['test'] = 'Trying to open database [' . $dataCon['DBS_DATABASE_NAME'] . ']';
|
||||
$respTest['3']['test'] = 'Opening database [' . $dataCon['DBS_DATABASE_NAME'] . ']';
|
||||
$Server->loginDbServer($dataCon['DBS_USERNAME'], $dataCon['DBS_PASSWORD']);
|
||||
$Server->setDataBase($dataCon['DBS_DATABASE_NAME'], $dataCon['DBS_PORT']);
|
||||
if ($Server->errno == 0) {
|
||||
@@ -279,25 +279,25 @@ class DataBaseConnection
|
||||
$response = $Server->tryOpenDataBase($dataCon['DBS_TYPE']);
|
||||
if ($response->status != 'SUCCESS') {
|
||||
if ($returnArray) {
|
||||
$respTest['3']['error'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
|
||||
$respTest['3']['error'] = "Error Testing Connection: Opening database FAILED : " . $Server->error;
|
||||
} else {
|
||||
$resp['message'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
|
||||
$resp['message'] = "Error Testing Connection: Opening database FAILED : " . $Server->error;
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($returnArray) {
|
||||
$respTest['3']['error'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
|
||||
$respTest['3']['error'] = "Error Testing Connection: Opening database FAILED : " . $Server->error;
|
||||
} else {
|
||||
$resp['message'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
|
||||
$resp['message'] = "Error Testing Connection: Opening database FAILED : " . $Server->error;
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($returnArray) {
|
||||
$respTest['3']['error'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
|
||||
$respTest['3']['error'] = "Error Testing Connection: Opening database FAILED : " . $Server->error;
|
||||
} else {
|
||||
$resp['message'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
|
||||
$resp['message'] = "Error Testing Connection: Opening database FAILED : " . $Server->error;
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
@@ -374,4 +374,3 @@ class DataBaseConnection
|
||||
return $dbs_uid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,9 +127,13 @@ class XmlExporter extends Exporter
|
||||
if (! is_dir($parentDir)) {
|
||||
Util\Common::mk_dir($parentDir, 0775);
|
||||
}
|
||||
|
||||
|
||||
$outputFile = $this->Truncatename($outputFile);
|
||||
|
||||
file_put_contents($outputFile, $this->export());
|
||||
chmod($outputFile, 0755);
|
||||
|
||||
return basename($outputFile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,4 +153,36 @@ class XmlExporter extends Exporter
|
||||
return $this->dom->createCDATASection($value);
|
||||
}
|
||||
}
|
||||
|
||||
public function truncateName($outputFile,$dirName = true)
|
||||
{
|
||||
$limit = 200;
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$limit = 150;
|
||||
}
|
||||
if($dirName) {
|
||||
if (strlen(basename($outputFile)) >= $limit) {
|
||||
$lastPos = strrpos(basename($outputFile),'.');
|
||||
$fileName = substr(basename($outputFile),0,$lastPos);
|
||||
$newFileName = str_replace(".","_",$fileName);
|
||||
$newFileName = str_replace(" ","_",$fileName);
|
||||
$excess = strlen($newFileName) - $limit;
|
||||
$newFileName = substr($newFileName,0,strlen($newFileName)-$excess);
|
||||
$newOutputFile = str_replace($fileName,$newFileName,$outputFile);
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$newOutputFile = str_replace("/", DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR, $newOutputFile);
|
||||
}
|
||||
$outputFile = $newOutputFile;
|
||||
}
|
||||
} else {
|
||||
$outputFile = str_replace(".","_",$outputFile);
|
||||
$outputFile = str_replace(" ","_",$outputFile);
|
||||
if (strlen($outputFile) >= $limit) {
|
||||
$excess = strlen($outputFile) - $limit;
|
||||
$newFileName = substr($outputFile,0,strlen($outputFile)-$excess);
|
||||
$outputFile = $newFileName;
|
||||
}
|
||||
}
|
||||
return $outputFile;
|
||||
}
|
||||
}
|
||||
@@ -108,13 +108,14 @@ class Project extends Api
|
||||
public function export($prj_uid)
|
||||
{
|
||||
$exporter = new \ProcessMaker\Exporter\XmlExporter($prj_uid);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(),false);
|
||||
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$version = \ProcessMaker\Util\Common::getLastVersion($outputDir . $exporter->getProjectName() . "-*.pmx") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $exporter->getProjectName()), $version, "pmx");
|
||||
$version = \ProcessMaker\Util\Common::getLastVersion($outputDir . $getProjectName . "-*.pmx") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
|
||||
$exporter->setMetadata("export_version", $version);
|
||||
$exporter->saveExport($outputFilename);
|
||||
$outputFilename = $outputDir . $exporter->saveExport($outputFilename);
|
||||
|
||||
$httpStream = new \ProcessMaker\Util\IO\HttpStream();
|
||||
$fileExtension = pathinfo($outputFilename, PATHINFO_EXTENSION);
|
||||
|
||||
@@ -33,13 +33,15 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
||||
var startRecord=0;
|
||||
var loadSize=10;
|
||||
|
||||
startRecord=startRecord+loadSize;
|
||||
|
||||
storeNotes = new Ext.data.JsonStore({
|
||||
url: "../appProxy/getNotesList?appUid=" + appUid + "&delIndex=" + delIndex + "&pro=" + proUid + "&tas=" + taskUid,
|
||||
root: 'notes',
|
||||
totalProperty: 'totalCount',
|
||||
fields: ['USR_USERNAME','USR_FIRSTNAME','USR_LASTNAME','USR_FULL_NAME','NOTE_DATE','NOTE_CONTENT', 'USR_UID', 'user'],
|
||||
baseParams:{
|
||||
start:startRecord,
|
||||
start:0,
|
||||
limit:startRecord+loadSize
|
||||
},
|
||||
listeners:{
|
||||
|
||||
@@ -101,13 +101,14 @@
|
||||
</nav>
|
||||
|
||||
</section>
|
||||
<div class="bpmn_shapes">
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<div id="p-center-layout"/>
|
||||
<!--BODY-->
|
||||
<div class="ui-layout-center tab-content" id="div-layout-canvas">
|
||||
</div>
|
||||
<div class="bpmn_shapes">
|
||||
</div>
|
||||
|
||||
<section class="content" id="idContent">
|
||||
|
||||
<div class="content_controls">
|
||||
|
||||
@@ -558,7 +558,14 @@ function newProcess(params)
|
||||
width: 260,
|
||||
maskRe: /^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\...*)(\..+)?$)[^\x00-\x1f\\?*\";|/]+$/i,
|
||||
allowBlank: false,
|
||||
vtype: "textWithoutTags"
|
||||
vtype: "textWithoutTags",
|
||||
listeners: {
|
||||
'focus' : function(value){
|
||||
document.getElementById("PRO_TITLE").onpaste = function() {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: 'PRO_DESCRIPTION',
|
||||
fieldLabel: _('ID_DESCRIPTION'),
|
||||
|
||||
@@ -98,7 +98,7 @@ function showGettingStarted() {
|
||||
panel.options = {
|
||||
size: {w:620,h:500},
|
||||
position: {x:50,y:50,center:true},
|
||||
control: {close:true,resize:false},fx:{modal:true},
|
||||
control: {close:true,resize:false, drag: false},fx:{modal:true},
|
||||
statusBar: false,
|
||||
fx: {shadow:true,modal:true}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user