Merged in feature/PMC-1090 (pull request #7053)

PMC-1090

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Julio Cesar Laura Avendaño
2019-09-16 16:37:47 +00:00
39 changed files with 651 additions and 71077 deletions

View File

@@ -50,8 +50,12 @@ workflow/engine/classes/entities/SolrQueryResult.php
workflow/engine/classes/entities/SolrRequestData.php
workflow/engine/classes/entities/SolrUpdateDocument.php
workflow/engine/classes/triggers/api/class.zimbraApi.php
workflow/engine/controllers/authSourceProxy.php
workflow/engine/controllers/dashboard.php
workflow/engine/controllers/installer.php
workflow/engine/data/mssql/insert.sql
workflow/engine/data/mssql/schema.sql
workflow/engine/data/mssql/sqldb.map
workflow/engine/includes/inc.JSForms.php
workflow/engine/js/cases/core/cases_Step_Pmdynaform.js
workflow/engine/js/cases/reassignByUser.js
@@ -66,6 +70,9 @@ workflow/engine/methods/cases/saveFormSupervisor.php
workflow/engine/methods/controls/buscador.php
workflow/engine/methods/dbConnections/genericDbConnections.php
workflow/engine/methods/login/dbInfo.php
workflow/engine/methods/messages/messages_List.php
workflow/engine/methods/outputdocs/downloadFile.php
workflow/engine/methods/outputdocs/outputdocs_List.php
workflow/engine/methods/services/processHeartBeat_Ajax.php
workflow/engine/methods/services/soap.php
workflow/engine/methods/services/wsdl.php
@@ -109,6 +116,8 @@ workflow/engine/templates/cases/cases_UsersReassignCases.html
workflow/engine/templates/login/init.js
workflow/engine/templates/reportTables/mainLoad.php
workflow/engine/test
workflow/engine/xmlform/messages/messages_List.xml
workflow/engine/xmlform/outputdocs/outputdocs_List.xml
workflow/engine/xmlform/cases/cases_ReassignBy.xml
workflow/engine/xmlform/users/users_List.xml
workflow/engine/xmlform/users/users_Options.xml

View File

@@ -76,11 +76,11 @@ class DynaformHandler
}
/**
* Function __cloneEmpty
* Function cloneEmpty
* @access public
* @return void
*/
public function __cloneEmpty()
public function cloneEmpty()
{
$xPath = new DOMXPath($this->dom);
$nodeList = $xPath->query('/dynaForm/*');

View File

@@ -51,7 +51,7 @@ class Xml_Node
* @param eter string attributes
* @return string
*/
public function Xml_Node ($name, $type, $value, $attributes = array())
public function __construct ($name, $type, $value, $attributes = array())
{
$this->name = $name;
$this->type = $type;
@@ -266,7 +266,7 @@ class Xml_Document extends Xml_Node
* @access public
* @return string
*/
public function Xml_Document ()
public function __construct ()
{
$this->currentNode = &$this;
}

View File

@@ -4509,7 +4509,7 @@ class XmlFormFieldDate extends XmlFormFieldSimpleText
//$this->defaultValue = G::replaceDataField( $this->defaultValue, $owner->values);
$id = "form[$this->name]";
return $this->__draw_widget($id, $value, $owner);
return $this->draw_widget($id, $value, $owner);
}
/**
@@ -4546,7 +4546,7 @@ class XmlFormFieldDate extends XmlFormFieldSimpleText
$html = '<input ' . $this->NSRequiredValue() . ' class="module_app_input___gray" ' . $this->NSGridType() . ' id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities($v, ENT_COMPAT, 'utf-8') . '" pm:required="' . $isRequired . '" style="display:none;' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" />' . htmlentities($v, ENT_COMPAT, 'utf-8');
} else {
$id = 'form[' . $owner->name . '][' . $r . '][' . $this->name . ']';
$html = $this->__draw_widget($id, $v, $owner, true);
$html = $this->draw_widget($id, $v, $owner, true);
}
} else {
$html = $v;
@@ -4565,7 +4565,7 @@ class XmlFormFieldDate extends XmlFormFieldSimpleText
* @param $owner
* @return <String>
*/
public function __draw_widget($pID, $value, $owner = '', $inGrid = false)
public function draw_widget($pID, $value, $owner = '', $inGrid = false)
{
$startDate = G::replaceDataField($this->startDate, $owner->values);
$endDate = G::replaceDataField($this->endDate, $owner->values);
@@ -4957,7 +4957,7 @@ class XmlFormFieldDate5 extends XmlFormFieldSimpleText
}
//$this->defaultValue = G::replaceDataField( $this->defaultValue, $owner->values);
$id = "form[$this->name]";
return $this->__draw_widget($id, $value, $owner);
return $this->draw_widget($id, $value, $owner);
}
/**
@@ -4976,7 +4976,7 @@ class XmlFormFieldDate5 extends XmlFormFieldSimpleText
$v = ($v != '') ? G::replaceDataField($v, $owner->values) : $this->defaultValue;
if (!$onlyValue) {
$id = 'form[' . $owner->name . '][' . $r . '][' . $this->name . ']';
$html = $this->__draw_widget($id, $v, $owner);
$html = $this->draw_widget($id, $v, $owner);
} else {
$html = $v;
}
@@ -4994,7 +4994,7 @@ class XmlFormFieldDate5 extends XmlFormFieldSimpleText
* @param $owner
* @return <String>
*/
public function __draw_widget($pID, $value, $owner = '')
public function draw_widget($pID, $value, $owner = '')
{
/*for deprecated mask definitions...*/

View File

@@ -26,7 +26,7 @@ class Archive
* @return void
*
*/
public function archive($name)
public function __construct($name)
{
$this->options = array('basedir' => ".", 'name' => $name, 'prepend' => "", 'inmemory' => 0, 'overwrite' => 0, 'recurse' => 1, 'storepaths' => 1, 'followlinks' => 0, 'level' => 3, 'method' => 1, 'sfx' => "", 'type' => "", 'comment' => ""
);

View File

@@ -12,7 +12,7 @@ class BzipFile extends TarFile
* @param string $name
* @return void
*/
public function BzipFile($name)
public function __construct($name)
{
$this->tar_file($name);
$this->options['type'] = "bzip";

View File

@@ -30,7 +30,7 @@ class DynaformEditorAjax extends DynaformEditor implements IDynaformEditorAjax
*/
public function _run($post)
{
WebResource::WebResource($_SERVER['REQUEST_URI'], $post);
WebResource::__construct($_SERVER['REQUEST_URI'], $post);
}
/**

View File

@@ -694,7 +694,7 @@ class LdapAdvanced
$ldapcnn = $this->ldapcnn;
//Get Users
$limit = $this->__getPageSizeLimitByData($arrayAuthenticationSourceData);
$limit = $this->getPageSizeLimitByData($arrayAuthenticationSourceData);
$flagError = false;
if (!isset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["AUTH_SOURCE_USERS_FILTER"])) {
@@ -801,7 +801,7 @@ class LdapAdvanced
*
* @return array Return array data
*/
private function __ldapGroupSynchronizeMembers($ldapcnn, array $arrayAuthSourceData, $groupUid, array $arrayGroupLdap, $memberAttribute, array $arrayData = [])
private function ldapGroupSynchronizeMembers($ldapcnn, array $arrayAuthSourceData, $groupUid, array $arrayGroupLdap, $memberAttribute, array $arrayData = [])
{
try {
unset($arrayData['countMembers']);
@@ -946,7 +946,7 @@ class LdapAdvanced
}
}
$arrayData = $this->__ldapGroupSynchronizeMembers(
$arrayData = $this->ldapGroupSynchronizeMembers(
$ldapcnn,
$arrayAuthenticationSourceData,
$arrayGroupData['GRP_UID'],
@@ -984,7 +984,7 @@ class LdapAdvanced
}
}
$arrayData = $this->__ldapGroupSynchronizeMembers(
$arrayData = $this->ldapGroupSynchronizeMembers(
$ldapcnn,
$arrayAuthenticationSourceData,
$arrayGroupData['GRP_UID'],
@@ -1107,7 +1107,7 @@ class LdapAdvanced
$user = new User();
$arrayUserData = $user->getUserRecordByPk($usrUid, [], false);
$result = $this->__ldapUserUpdateByDnAndData(
$result = $this->ldapUserUpdateByDnAndData(
$this->ldapcnn,
$arrayAuthSource,
$userDn,
@@ -1625,7 +1625,7 @@ class LdapAdvanced
$ldapcnn = $this->ldapcnn;
//Get Departments
$limit = $this->__getPageSizeLimitByData($arrayAuthenticationSourceData);
$limit = $this->getPageSizeLimitByData($arrayAuthenticationSourceData);
$flagError = false;
$filter = '(' . $this->arrayObjectClassFilter['department'] . ')';
@@ -2251,7 +2251,7 @@ class LdapAdvanced
$ldapcnn = $this->ldapcnn;
//Get Groups
$limit = $this->__getPageSizeLimitByData($arrayAuthenticationSourceData);
$limit = $this->getPageSizeLimitByData($arrayAuthenticationSourceData);
$flagError = false;
$filter = '(' . $this->arrayObjectClassFilter['group'] . ')';
@@ -2677,7 +2677,7 @@ class LdapAdvanced
*
* @return bool
*/
private function __ldapUserUpdateByDnAndData($ldapcnn, array $arrayAuthSourceData, $userDn, array $arrayUser)
private function ldapUserUpdateByDnAndData($ldapcnn, array $arrayAuthSourceData, $userDn, array $arrayUser)
{
try {
//Set variables
@@ -2799,7 +2799,7 @@ class LdapAdvanced
*
* @return array
*/
private function __ldapUsersUpdateData($ldapcnn, array $arrayAuthSourceData, $filterUsers, array $arrayUserUid, array $arrayData)
private function ldapUsersUpdateData($ldapcnn, array $arrayAuthSourceData, $filterUsers, array $arrayUserUid, array $arrayData)
{
try {
$totalUser = $arrayData['totalUser'];
@@ -2835,7 +2835,7 @@ class LdapAdvanced
$entry = ldap_first_entry($ldapcnn, $searchResult);
do {
if ($this->__ldapUserUpdateByDnAndData(
if ($this->ldapUserUpdateByDnAndData(
$ldapcnn,
$arrayAuthSourceData,
ldap_get_dn($ldapcnn, $entry),
@@ -2887,7 +2887,7 @@ class LdapAdvanced
$ldapcnn = $this->ldapcnn;
//Update Users
$limit = $this->__getPageSizeLimitByData($arrayAuthenticationSourceData);
$limit = $this->getPageSizeLimitByData($arrayAuthenticationSourceData);
$count = 0;
$uidUserIdentifier = (isset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["AUTH_SOURCE_IDENTIFIER_FOR_USER"])) ? $arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["AUTH_SOURCE_IDENTIFIER_FOR_USER"] : "uid";
@@ -2904,7 +2904,7 @@ class LdapAdvanced
$arrayUserUid[] = $arrayUserData["USR_UID"];
if ($count == $limit) {
list($totalUser, $countUser) = $this->__ldapUsersUpdateData(
list($totalUser, $countUser) = $this->ldapUsersUpdateData(
$ldapcnn,
$arrayAuthenticationSourceData,
$filterUsers,
@@ -2920,7 +2920,7 @@ class LdapAdvanced
}
if ($count > 0) {
list($totalUser, $countUser) = $this->__ldapUsersUpdateData(
list($totalUser, $countUser) = $this->ldapUsersUpdateData(
$ldapcnn,
$arrayAuthenticationSourceData,
$filterUsers,
@@ -2940,7 +2940,7 @@ class LdapAdvanced
*
* @return int Returns the page size limit for a search result
*/
private function __getPageSizeLimitByData(array $arrayAuthSourceData)
private function getPageSizeLimitByData(array $arrayAuthSourceData)
{
if (isset($arrayAuthSourceData['AUTH_SOURCE_DATA']['LDAP_PAGE_SIZE_LIMIT'])) {
return $arrayAuthSourceData['AUTH_SOURCE_DATA']['LDAP_PAGE_SIZE_LIMIT'];

View File

@@ -252,29 +252,20 @@ class Net
}
break;
case 'mssql':
//todo
if (extension_loaded('sqlsrv')) {
if ($this->db_instance != "") {
$server = $this->ip . "\\" . $this->db_instance;
} else {
$server = $this->ip;
}
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ", " . $this->db_port;
$server .= $port;
$opt = [
'UID' => $this->db_user,
'PWD' => $this->db_passwd,
'Database' => $this->db_sourcename
];
$link = @sqlsrv_connect($server, $opt);
case 'sqlsrv':
if ($this->db_instance != "") {
$server = $this->ip . "\\" . $this->db_instance;
} else {
if ($this->db_instance != "") {
$link = @mssql_connect($this->ip . "\\" . $this->db_instance, $this->db_user, $this->db_passwd);
} else {
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ":" . $this->db_port;
$link = @mssql_connect($this->ip . $port, $this->db_user, $this->db_passwd);
}
$server = $this->ip;
}
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ", " . $this->db_port;
$server .= $port;
$opt = [
'UID' => $this->db_user,
'PWD' => $this->db_passwd,
'Database' => $this->db_sourcename
];
$link = @sqlsrv_connect($server, $opt);
if ($link) {
$stat->status = 'SUCCESS';
@@ -397,32 +388,21 @@ class Net
}
break;
case 'mssql':
if (extension_loaded('sqlsrv')) {
if ($this->db_instance != "") {
$server = $this->ip . "\\" . $this->db_instance;
} else {
$server = $this->ip;
}
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ", " . $this->db_port;
$server .= $port;
$opt = [
'UID' => $this->db_user,
'PWD' => $this->db_passwd,
'Database' => $this->db_sourcename
];
$link = $db = @sqlsrv_connect($server, $opt);
case 'sqlsrv':
if ($this->db_instance != "") {
$server = $this->ip . "\\" . $this->db_instance;
} else {
if ($this->db_instance != "") {
$link = @mssql_connect($this->ip . "\\" . $this->db_instance, $this->db_user, $this->db_passwd);
} else {
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ":" . $this->db_port;
$link = @mssql_connect($this->ip . $port, $this->db_user, $this->db_passwd);
}
$server = $this->ip;
}
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ", " . $this->db_port;
$server .= $port;
$opt = [
'UID' => $this->db_user,
'PWD' => $this->db_passwd,
'Database' => $this->db_sourcename
];
$link = $db = @sqlsrv_connect($server, $opt);
if ($link) {
if (!extension_loaded('sqlsrv')) {
$db = @mssql_select_db($this->db_sourcename, $link);
}
if ($db) {
$stat->status = 'SUCCESS';
$this->errstr = "";

View File

@@ -0,0 +1,30 @@
<?php
/**
* Class PmPluginCompatibility
*
* This class was created in order to keep the compatibility of the plugins that uses the method "PMPlugin"
*/
class PmPluginCompatibility
{
// The name of these properties should be equal that the properties in class "PMPlugin"
public $sNamespace;
public $sClassName;
public $sPluginFolder = '';
public $sFilename = null;
/**
* Method similar to PMPlugin::__construct, this method was created in order to keep the compatibility for the plugins,
* the plugins uses something similar to: parent::PMPlugin($namespace, $filename);
*
* @param string $namespace
* @param string $filename
*/
public function PMPlugin($namespace, $filename = null)
{
$this->sNamespace = $namespace;
$this->sClassName = $namespace . 'Plugin';
$this->sPluginFolder = $namespace;
$this->sFilename = $filename;
}
}

View File

@@ -595,304 +595,182 @@ class ReportTables
$oDataset = ReportTablePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aVars = array();
while ($aRow = $oDataset->getRow()) {
$aRow['REP_TAB_NAME'] = $this->sPrefix . $aRow['REP_TAB_NAME'];
$PropelDatabase = $this->chooseDB($aRow['REP_TAB_CONNECTION']);
$con = Propel::getConnection($PropelDatabase);
$con->getResource();
$stmt = $con->createStatement();
switch (DB_ADAPTER) {
case 'mysql':
$aTableFields = $this->getTableVars($aRow['REP_TAB_UID'], true);
if ($aRow['REP_TAB_TYPE'] == 'NORMAL') {
$sqlExists = "SELECT * FROM `" . $aRow['REP_TAB_NAME'] . "` WHERE APP_UID = '" . $sApplicationUid . "'";
$rsExists = $stmt->executeQuery($sqlExists, ResultSet::FETCHMODE_ASSOC);
$rsExists->next();
$aRow2 = $rsExists->getRow();
$aTableFields = $this->getTableVars($aRow['REP_TAB_UID'], true);
if ($aRow['REP_TAB_TYPE'] == 'NORMAL') {
$sqlExists = "SELECT * FROM `" . $aRow['REP_TAB_NAME'] . "` WHERE APP_UID = '" . $sApplicationUid . "'";
$rsExists = $stmt->executeQuery($sqlExists, ResultSet::FETCHMODE_ASSOC);
$rsExists->next();
$aRow2 = $rsExists->getRow();
if (is_array($aRow2)) {
$sQuery = 'UPDATE `' . $aRow['REP_TAB_NAME'] . '` SET ';
foreach ($aTableFields as $aField) {
$sQuery .= '`' . $aField['sFieldName'] . '` = ';
if (is_array($aRow2)) {
$sQuery = 'UPDATE `' . $aRow['REP_TAB_NAME'] . '` SET ';
foreach ($aTableFields as $aField) {
$sQuery .= '`' . $aField['sFieldName'] . '` = ';
if (!$isBpmn && !isset($aFields[$aField['sFieldName']])) {
foreach ($aFields as $row) {
if (is_array($row) && isset($row[count($row)])) {
$aFields = $row[count($row)];
}
}
}
switch ($aField['sType']) {
case 'number':
$sQuery .= (isset($aFields[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aFields[$aField['sFieldName']]
) : '0') . ',';
break;
case 'char':
case 'text':
if (!isset($aFields[$aField['sFieldName']])) {
$aFields[$aField['sFieldName']] = '';
}
if (!isset($aFields[$aField['sFieldName'] . '_label'])) {
$aFields[$aField['sFieldName'] . '_label'] = '';
}
if (is_array($aFields[$aField['sFieldName']])) {
$sQuery .= "'" . (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']][0] : '') . "',";
} else {
$sQuery .= '\'' . ((isset($aFields[$aField['sFieldName']])) ? mysqli_real_escape_string(
$con->getResource(),
$aFields[$aField['sFieldName']]
) : '') . '\',';
}
break;
case 'date':
$mysqlDate = (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']] : '');
if ($mysqlDate != '') {
$mysqlDate = str_replace('/', '-', $mysqlDate);
$mysqlDate = date('Y-m-d', strtotime($mysqlDate));
}
$value = trim($mysqlDate) != '' ? "'" . $mysqlDate . "'" : 'NULL';
$sQuery .= $value . ",";
break;
if (!$isBpmn && !isset($aFields[$aField['sFieldName']])) {
foreach ($aFields as $row) {
if (is_array($row) && isset($row[count($row)])) {
$aFields = $row[count($row)];
}
}
$sQuery = substr($sQuery, 0, -1);
$sQuery .= " WHERE APP_UID = '" . $sApplicationUid . "'";
}
//Only we will to executeQuery if we have additional field
if (count($aTableFields) > 0) {
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog(
'sqlExecution',
400,
'Sql Execution',
['sql' => $sQuery, 'error' => $e->getMessage()],
config("system.workspace"),
'processmaker.log'
);
switch ($aField['sType']) {
case 'number':
$sQuery .= (isset($aFields[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aFields[$aField['sFieldName']]
) : '0') . ',';
break;
case 'char':
case 'text':
if (!isset($aFields[$aField['sFieldName']])) {
$aFields[$aField['sFieldName']] = '';
}
}
} else {
if (!isset($aFields[$aField['sFieldName'] . '_label'])) {
$aFields[$aField['sFieldName'] . '_label'] = '';
}
if (is_array($aFields[$aField['sFieldName']])) {
$sQuery .= "'" . (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']][0] : '') . "',";
} else {
$sQuery .= '\'' . ((isset($aFields[$aField['sFieldName']])) ? mysqli_real_escape_string(
$con->getResource(),
$aFields[$aField['sFieldName']]
) : '') . '\',';
}
break;
case 'date':
$mysqlDate = (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']] : '');
if ($mysqlDate != '') {
$mysqlDate = str_replace('/', '-', $mysqlDate);
$mysqlDate = date('Y-m-d', strtotime($mysqlDate));
}
$value = trim($mysqlDate) != '' ? "'" . $mysqlDate . "'" : 'NULL';
$sQuery .= $value . ",";
break;
}
}
$sQuery = substr($sQuery, 0, -1);
$sQuery .= " WHERE APP_UID = '" . $sApplicationUid . "'";
//Only we will to executeQuery if we have additional field
if (count($aTableFields) > 0) {
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog(
'sqlExecution',
400,
'Sql Execution',
['sql' => $sQuery, 'error' => $e->getMessage()],
config("system.workspace"),
'processmaker.log'
);
}
}
} else {
$sQuery = 'INSERT INTO `' . $aRow['REP_TAB_NAME'] . '` (';
$sQuery .= '`APP_UID`,`APP_NUMBER`';
foreach ($aTableFields as $aField) {
$sQuery .= ',`' . $aField['sFieldName'] . '`';
}
$sQuery .= ") VALUES ('" . $sApplicationUid . "'," . (int)$iApplicationNumber;
foreach ($aTableFields as $aField) {
switch ($aField['sType']) {
case 'number':
$sQuery .= ',' . (isset($aFields[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aFields[$aField['sFieldName']]
) : '0');
break;
case 'char':
case 'text':
if (!isset($aFields[$aField['sFieldName']])) {
$aFields[$aField['sFieldName']] = '';
}
$sQuery .= ",'" . (isset($aFields[$aField['sFieldName']]) ? mysqli_real_escape_string(
$con->getResource(),
$aFields[$aField['sFieldName']]
) : '') . "'";
break;
case 'date':
$mysqlDate = (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']] : '');
if ($mysqlDate != '') {
$mysqlDate = str_replace('/', '-', $mysqlDate);
$mysqlDate = date('Y-m-d', strtotime($mysqlDate));
}
$value = trim($mysqlDate) != '' ? "'" . $mysqlDate . "'" : 'NULL';
$sQuery .= "," . $value;
break;
}
}
$sQuery .= ')';
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog(
'sqlExecution',
400,
'Sql Execution',
['sql' => $sQuery, 'error' => $e->getMessage()],
config("system.workspace"),
'processmaker.log'
);
}
}
} else {
//remove old rows from database
$sqlDelete = 'DELETE FROM `' . $aRow['REP_TAB_NAME'] . "` WHERE APP_UID = '" . $sApplicationUid . "'";
$rsDelete = $stmt->executeQuery($sqlDelete);
$aAux = explode('-', $aRow['REP_TAB_GRID']);
if (isset($aFields[$aAux[0]])) {
if (is_array($aFields[$aAux[0]])) {
foreach ($aFields[$aAux[0]] as $iRow => $aGridRow) {
$sQuery = 'INSERT INTO `' . $aRow['REP_TAB_NAME'] . '` (';
$sQuery .= '`APP_UID`,`APP_NUMBER`';
$sQuery .= '`APP_UID`,`APP_NUMBER`,`ROW`';
foreach ($aTableFields as $aField) {
$sQuery .= ',`' . $aField['sFieldName'] . '`';
}
$sQuery .= ") VALUES ('" . $sApplicationUid . "'," . (int)$iApplicationNumber;
$sQuery .= ") VALUES ('" . $sApplicationUid . "'," . (int)$iApplicationNumber . ',' . $iRow;
foreach ($aTableFields as $aField) {
switch ($aField['sType']) {
case 'number':
$sQuery .= ',' . (isset($aFields[$aField['sFieldName']]) ? (float)str_replace(
$sQuery .= ',' . (isset($aGridRow[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aFields[$aField['sFieldName']]
$aGridRow[$aField['sFieldName']]
) : '0');
break;
case 'char':
case 'text':
if (!isset($aFields[$aField['sFieldName']])) {
$aFields[$aField['sFieldName']] = '';
if (!isset($aGridRow[$aField['sFieldName']])) {
$aGridRow[$aField['sFieldName']] = '';
}
$sQuery .= ",'" . (isset($aFields[$aField['sFieldName']]) ? mysqli_real_escape_string(
$sQuery .= ",'" . (isset($aGridRow[$aField['sFieldName']]) ? mysqli_real_escape_string(
$con->getResource(),
$aFields[$aField['sFieldName']]
$aGridRow[$aField['sFieldName']]
) : '') . "'";
break;
case 'date':
$mysqlDate = (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']] : '');
if ($mysqlDate != '') {
$mysqlDate = str_replace('/', '-', $mysqlDate);
$mysqlDate = date('Y-m-d', strtotime($mysqlDate));
}
$value = trim($mysqlDate) != '' ? "'" . $mysqlDate . "'" : 'NULL';
$sQuery .= "," . $value;
$sQuery .= ",'" . (isset($aGridRow[$aField['sFieldName']]) ? $aGridRow[$aField['sFieldName']] : '') . "'";
break;
}
}
$sQuery .= ')';
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog(
'sqlExecution',
400,
'Sql Execution',
['sql' => $sQuery, 'error' => $e->getMessage()],
config("system.workspace"),
'processmaker.log'
);
}
}
} else {
//remove old rows from database
$sqlDelete = 'DELETE FROM `' . $aRow['REP_TAB_NAME'] . "` WHERE APP_UID = '" . $sApplicationUid . "'";
$rsDelete = $stmt->executeQuery($sqlDelete);
$aAux = explode('-', $aRow['REP_TAB_GRID']);
if (isset($aFields[$aAux[0]])) {
if (is_array($aFields[$aAux[0]])) {
foreach ($aFields[$aAux[0]] as $iRow => $aGridRow) {
$sQuery = 'INSERT INTO `' . $aRow['REP_TAB_NAME'] . '` (';
$sQuery .= '`APP_UID`,`APP_NUMBER`,`ROW`';
foreach ($aTableFields as $aField) {
$sQuery .= ',`' . $aField['sFieldName'] . '`';
}
$sQuery .= ") VALUES ('" . $sApplicationUid . "'," . (int)$iApplicationNumber . ',' . $iRow;
foreach ($aTableFields as $aField) {
switch ($aField['sType']) {
case 'number':
$sQuery .= ',' . (isset($aGridRow[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aGridRow[$aField['sFieldName']]
) : '0');
break;
case 'char':
case 'text':
if (!isset($aGridRow[$aField['sFieldName']])) {
$aGridRow[$aField['sFieldName']] = '';
}
$sQuery .= ",'" . (isset($aGridRow[$aField['sFieldName']]) ? mysqli_real_escape_string(
$con->getResource(),
$aGridRow[$aField['sFieldName']]
) : '') . "'";
break;
case 'date':
$sQuery .= ",'" . (isset($aGridRow[$aField['sFieldName']]) ? $aGridRow[$aField['sFieldName']] : '') . "'";
break;
}
}
$sQuery .= ')';
$rs = $stmt->executeQuery($sQuery);
}
}
$rs = $stmt->executeQuery($sQuery);
}
}
break;
/**
* For SQLServer code
*/
case 'mssql':
$aTableFields = $this->getTableVars($aRow['REP_TAB_UID'], true);
if ($aRow['REP_TAB_TYPE'] == 'NORMAL') {
$oDataset2 = mssql_query("SELECT * FROM [" . $aRow['REP_TAB_NAME'] . "] WHERE APP_UID = '" . $sApplicationUid . "'");
if ($aRow2 = mssql_fetch_row($oDataset2)) {
$sQuery = 'UPDATE [' . $aRow['REP_TAB_NAME'] . '] SET ';
foreach ($aTableFields as $aField) {
$sQuery .= '[' . $aField['sFieldName'] . '] = ';
switch ($aField['sType']) {
case 'number':
$sQuery .= (isset($aFields[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aFields[$aField['sFieldName']]
) : '0') . ',';
break;
case 'char':
case 'text':
if (!isset($aFields[$aField['sFieldName']])) {
$aFields[$aField['sFieldName']] = '';
}
$sQuery .= "'" . (isset($aFields[$aField['sFieldName']]) ? mysqli_real_escape_string(
$con->getResource(),
$aFields[$aField['sFieldName']]
) : '') . "',";
break;
case 'date':
$sQuery .= "'" . (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']] : '') . "',";
break;
}
}
$sQuery = substr($sQuery, 0, -1);
$sQuery .= " WHERE APP_UID = '" . $sApplicationUid . "'";
} else {
$sQuery = 'INSERT INTO [' . $aRow['REP_TAB_NAME'] . '] (';
$sQuery .= '[APP_UID],[APP_NUMBER]';
foreach ($aTableFields as $aField) {
$sQuery .= ',[' . $aField['sFieldName'] . ']';
}
$sQuery .= ") VALUES ('" . $sApplicationUid . "'," . (int)$iApplicationNumber;
foreach ($aTableFields as $aField) {
switch ($aField['sType']) {
case 'number':
$sQuery .= ',' . (isset($aFields[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aFields[$aField['sFieldName']]
) : '0');
break;
case 'char':
case 'text':
if (!isset($aFields[$aField['sFieldName']])) {
$aFields[$aField['sFieldName']] = '';
}
$sQuery .= ",'" . (isset($aFields[$aField['sFieldName']]) ? mysqli_real_escape_string(
$con->getResource(),
$aFields[$aField['sFieldName']]
) : '') . "'";
break;
case 'date':
$sQuery .= ",'" . (isset($aFields[$aField['sFieldName']]) ? $aFields[$aField['sFieldName']] : '') . "'";
break;
}
}
$sQuery .= ')';
}
$rs = $stmt->executeQuery($sQuery);
} else {
//Verify use in mssql
mysqli_query(
$con->getResource(),
'DELETE FROM [' . $aRow['REP_TAB_NAME'] . "] WHERE APP_UID = '" . $sApplicationUid . "'"
);
$aAux = explode('-', $aRow['REP_TAB_GRID']);
if (isset($aFields[$aAux[0]])) {
foreach ($aFields[$aAux[0]] as $iRow => $aGridRow) {
$sQuery = 'INSERT INTO [' . $aRow['REP_TAB_NAME'] . '] (';
$sQuery .= '[APP_UID],[APP_NUMBER],[ROW]';
foreach ($aTableFields as $aField) {
$sQuery .= ',[' . $aField['sFieldName'] . ']';
}
$sQuery .= ") VALUES ('" . $sApplicationUid . "'," . (int)$iApplicationNumber . ',' . $iRow;
foreach ($aTableFields as $aField) {
switch ($aField['sType']) {
case 'number':
$sQuery .= ',' . (isset($aGridRow[$aField['sFieldName']]) ? (float)str_replace(
',',
'',
$aGridRow[$aField['sFieldName']]
) : '0');
break;
case 'char':
case 'text':
if (!isset($aGridRow[$aField['sFieldName']])) {
$aGridRow[$aField['sFieldName']] = '';
}
$sQuery .= ",'" . (isset($aGridRow[$aField['sFieldName']]) ? mysqli_real_escape_string(
$con->getResource(),
$aGridRow[$aField['sFieldName']]
) : '') . "'";
break;
case 'date':
$sQuery .= ",'" . (isset($aGridRow[$aField['sFieldName']]) ? $aGridRow[$aField['sFieldName']] : '') . "'";
break;
}
}
$sQuery .= ')';
$rs = $stmt->executeQuery($sQuery);
}
}
}
break;
}
}
$oDataset->next();
}

View File

@@ -12,9 +12,9 @@ class TarFile extends Archive
*
* @param string $name
*/
public function TarFile($name)
public function __construct($name)
{
$this->archive($name);
parent::__construct($name);
$this->options['type'] = "tar";
}

View File

@@ -21,9 +21,9 @@
*/
class ZipFile extends Archive
{
public function ZipFile($name)
public function __construct($name)
{
$this->archive($name);
parent::__construct($name);
$this->options['type'] = "zip";
}

View File

@@ -5,7 +5,7 @@ use ProcessMaker\Plugins\PluginRegistry;
/**
* @package workflow.engine.classes
*/
class PMPlugin
class PMPlugin extends PmPluginCompatibility
{
public $sNamespace;
public $sClassName;
@@ -22,7 +22,7 @@ class PMPlugin
* @param string $sFilename
* @return void
*/
public function PMPlugin($sNamespace, $sFilename = null)
public function __construct($sNamespace, $sFilename = null)
{
$this->sNamespace = $sNamespace;
$this->sClassName = $sNamespace . 'Plugin';

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseAppTimeoutActionExecuted.php';
/**
* Skeleton subclass for representing a row from the 'APP_TIMEOUT_ACTION_EXECUTED' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -14,17 +14,18 @@ require_once 'classes/model/om/BaseAppTimeoutActionExecuted.php';
*
* @package classes.model
*/
class AppTimeoutActionExecuted extends BaseAppTimeoutActionExecuted {
public function create ($aData)
{
$con = Propel::getConnection( AppTimeoutActionExecutedPeer::DATABASE_NAME );
class AppTimeoutActionExecuted extends BaseAppTimeoutActionExecuted
{
public function create($aData)
{
$con = Propel::getConnection(AppTimeoutActionExecutedPeer::DATABASE_NAME);
try {
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
$this->fromArray($aData, BasePeer::TYPE_FIELDNAME);
if ($this->validate()) {
$result = $this->save();
} else {
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
$e = new Exception("Failed Validation in class " . get_class($this) . ".");
$e->aValidationFailures = $this->getValidationFailures();
throw ($e);
}
@@ -33,6 +34,6 @@ class AppTimeoutActionExecuted extends BaseAppTimeoutActionExecuted {
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
}
}
} // AppTimeoutActionExecuted

View File

@@ -38451,60 +38451,6 @@ msgstr "Content"
msgid "[messages/messages_Edit.xml?ACCEPT] Save"
msgstr "Save"
# messages/messages_List.xml?fMESS_TITLE
# messages/messages_List.xml
#: text - fMESS_TITLE
msgid "[messages/messages_List.xml?fMESS_TITLE] Output document"
msgstr "Output document"
# messages/messages_List.xml?MESS_TYPE
# messages/messages_List.xml
#: dropdown - MESS_TYPE
msgid "[messages/messages_List.xml?MESS_TYPE] Type"
msgstr "Type"
# messages/messages_List.xml?MESS_TYPE-HTML
# messages/messages_List.xml
#: dropdown - MESS_TYPE - HTML
msgid "[messages/messages_List.xml?MESS_TYPE-HTML]"
msgstr "HTML"
# messages/messages_List.xml?MESS_TYPE-TEXT
# messages/messages_List.xml
#: dropdown - MESS_TYPE - TEXT
msgid "[messages/messages_List.xml?MESS_TYPE-TEXT]"
msgstr "Plain text"
# messages/messages_List.xml?MESS_TYPE-SMS
# messages/messages_List.xml
#: dropdown - MESS_TYPE - SMS
msgid "[messages/messages_List.xml?MESS_TYPE-SMS]"
msgstr "SMS"
# messages/messages_List.xml?fMESS_DESCRIPTION
# messages/messages_List.xml
#: textarea - fMESS_DESCRIPTION
msgid "[messages/messages_List.xml?fMESS_DESCRIPTION] Content"
msgstr "Content"
# messages/messages_List.xml?EDIT
# messages/messages_List.xml
#: link - EDIT
msgid "[messages/messages_List.xml?EDIT] "
msgstr ""
# messages/messages_List.xml?DELETE
# messages/messages_List.xml
#: link - DELETE
msgid "[messages/messages_List.xml?DELETE] "
msgstr ""
# messages/messages_List.xml?SEARCH
# messages/messages_List.xml
#: button - SEARCH
msgid "[messages/messages_List.xml?SEARCH] Apply Filter"
msgstr "Apply Filter"
# messages/messages_Options.xml?MNU_ADD
# messages/messages_Options.xml
#: link - MNU_ADD
@@ -38607,42 +38553,6 @@ msgstr "Save"
msgid "[outputdocs/outputdocs_Edit.xml?BTN_CANCEL] Cancel"
msgstr "Cancel"
# outputdocs/outputdocs_List.xml?OUT_DOC_TITLE
# outputdocs/outputdocs_List.xml
#: text - OUT_DOC_TITLE
msgid "[outputdocs/outputdocs_List.xml?OUT_DOC_TITLE] Output document"
msgstr "Output document"
# outputdocs/outputdocs_List.xml?OUT_DOC_FILENAME
# outputdocs/outputdocs_List.xml
#: text - OUT_DOC_FILENAME
msgid "[outputdocs/outputdocs_List.xml?OUT_DOC_FILENAME] Filename"
msgstr "Filename"
# outputdocs/outputdocs_List.xml?OUT_DOC_DESCRIPTION
# outputdocs/outputdocs_List.xml
#: textarea - OUT_DOC_DESCRIPTION
msgid "[outputdocs/outputdocs_List.xml?OUT_DOC_DESCRIPTION] Description"
msgstr "Description"
# outputdocs/outputdocs_List.xml?EDIT
# outputdocs/outputdocs_List.xml
#: link - EDIT
msgid "[outputdocs/outputdocs_List.xml?EDIT] "
msgstr ""
# outputdocs/outputdocs_List.xml?DELETE
# outputdocs/outputdocs_List.xml
#: link - DELETE
msgid "[outputdocs/outputdocs_List.xml?DELETE] "
msgstr ""
# outputdocs/outputdocs_List.xml?SEARCH
# outputdocs/outputdocs_List.xml
#: button - SEARCH
msgid "[outputdocs/outputdocs_List.xml?SEARCH] Apply Filter"
msgstr "Apply Filter"
# outputdocs/outputdocs_New.xml?TITLE
# outputdocs/outputdocs_New.xml
#: title - TITLE

View File

@@ -5,7 +5,6 @@ use ProcessMaker\Core\System;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
global $translation;
@@ -117,7 +116,7 @@ class InstallerModule extends Controller
$this->setJSVar('DB_ADAPTER', DB_ADAPTER);
$aux = explode(':', DB_HOST);
$this->setJSVar('DB_HOST', $aux[0]);
$this->setJSVar('DB_PORT', isset($aux[1]) ? $aux[1] : (DB_ADAPTER == 'mssql' ? '1433' : '3306'));
$this->setJSVar('DB_PORT', isset($aux[1]) ? $aux[1] : '3306');
$this->setJSVar('DB_NAME', 'workflow');
$this->setJSVar('DB_USER', '');
$this->setJSVar('DB_PASS', '');
@@ -196,7 +195,6 @@ class InstallerModule extends Controller
$info = new stdclass();
$info->php = new stdclass();
$info->mysql = new stdclass();
$info->mssql = new stdclass();
$info->openssl = new stdclass();
$info->curl = new stdclass();
$info->dom = new stdclass();
@@ -222,14 +220,6 @@ class InstallerModule extends Controller
$info->mysql->result = $mysqlNum >= 5.0;
}
// MSSQL info and verification
$info->mssql->result = false;
$info->mssql->version = G::LoadTranslation('ID_NOT_ENABLED');
if (function_exists('mssql_query')) {
$info->mssql->result = true;
$info->mssql->version = G::LoadTranslation('ID_ENABLED');
}
// OpenSSL info
$info->openssl->result = false;
$info->openssl->version = G::LoadTranslation('ID_NOT_ENABLED');
@@ -436,15 +426,7 @@ class InstallerModule extends Controller
$this->setResponseType('json');
$info = new StdClass();
try {
switch ($_REQUEST['db_engine']) {
case 'mysql':
case 'mysqli':
$info = $this->testMySQLConnection();
break;
case 'mssql':
$info = $this->testMSSQLConnection();
break;
}
$info = $this->testMySQLConnection();
} catch (Exception $e) {
$info->result = false;
$info->message = G::LoadTranslation('DBCONNECTIONS_MSGA');
@@ -495,7 +477,7 @@ class InstallerModule extends Controller
/**
* function to create a workspace
* in fact this function is calling appropriate functions for mysql and mssql
* in fact this function is calling appropriate functions for mysql
* need permission PM_SETUP_ADVANCE for this action
* @return stdClass information create a workspace.
*/
@@ -510,14 +492,7 @@ class InstallerModule extends Controller
$this->setResponseType('json');
$info = new StdClass();
try {
switch ($_REQUEST['db_engine']) {
case 'mysql':
$info = $this->createMySQLWorkspace();
break;
case 'mssql':
$info = $this->createMSSQLWorkspace();
break;
}
$info = $this->createMySQLWorkspace();
} catch (Exception $e) {
$info->result = false;
$info->message = G::LoadTranslation('DBCONNECTIONS_MSGA');
@@ -564,30 +539,6 @@ class InstallerModule extends Controller
curl_close($ch);
}
/**
* Send a query to MSSQL and log the query
*
* @param string $sql
*
* @return boolean
* @throws Exception
*/
public function mssqlQuery($sql)
{
$filter = new InputFilter();
$sql = $filter->preventSqlInjection($sql, array());
$this->installLog($sql);
$query = @mssql_query($sql, $this->link);
if (!$query) {
$errorMessage = mssql_get_last_message();
$this->installLog(G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, array($errorMessage)));
throw (new Exception($errorMessage));
return false;
}
@mssql_free_result($query);
return true;
}
/**
* query_sql_file send many statements to server
*
@@ -651,38 +602,6 @@ class InstallerModule extends Controller
return true;
}
/**
* query_sql_file send many statements to server
*
* @param string $file
* @param string $connection
* @return array $report
*/
public function mssqlFileQuery($file)
{
if (!is_file($file)) {
throw (new Exception(G::LoadTranslation('ID_SQL_FILE_INVALID', SYS_LANG, array($file))));
return $false;
}
$this->installLog(G::LoadTranslation('ID_PROCESING', SYS_LANG, array($file)));
$startTime = microtime(true);
$content = file_get_contents($file);
$queries = explode(';', $content);
foreach ($queries as $sql) {
$query = @mssql_query($sql, $this->link);
if (!$query) {
$errorMessage = mssql_get_last_message();
$this->installLog(G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, array($errorMessage . G::LoadTranslation('ID_QUERY') . ": " . $sql)));
throw (new Exception($errorMessage));
return false;
}
}
$endTime = microtime(true);
$this->installLog(G::LoadTranslation('ID_FILE_PROCESSED', SYS_LANG, array(basename($file), $endTime - $startTime)));
return true;
}
/**
* set Grant Privileges for MySQL
*
@@ -710,46 +629,6 @@ class InstallerModule extends Controller
}
}
/**
* set Grant Privileges for SQLServer
*
* @param string $psUser
* @param string $psPassword
* @param string $psDatabase
* @return void
*/
public function setGrantPrivilegesMSSQL($psUser, $psPassword, $psDatabase)
{
$query = sprintf("IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'%s') DROP LOGIN [%s]", $psUser, $psUser);
$this->mssqlQuery($query);
$query = sprintf("CREATE LOGIN [%s] WITH PASSWORD=N'%s', DEFAULT_DATABASE=[%s], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF ", $psUser, $psPassword, $psDatabase);
$this->mssqlQuery($query);
$query = sprintf("USE %s;", $psDatabase);
$this->mssqlQuery($query);
$query = sprintf("IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'%s') DROP USER [%s]", $psUser, $psUser);
$this->mssqlQuery($query);
$query = sprintf("CREATE USER %s FOR LOGIN %s;", $psUser, $psUser);
$this->mssqlQuery($query);
$query = sprintf("sp_addrolemember 'db_owner', '%s' ", $psUser);
$this->mssqlQuery($query);
$query = sprintf("sp_addrolemember 'db_ddladmin', '%s' ", $psUser);
$this->mssqlQuery($query);
$query = sprintf("sp_addrolemember 'db_accessadmin', '%s' ", $psUser);
$this->mssqlQuery($query);
$query = sprintf("use master ");
$this->mssqlQuery($query);
return true;
}
/**
* Create a workspace in a MySQL database
*
@@ -1055,190 +934,6 @@ class InstallerModule extends Controller
return $info;
}
public function createMSSQLWorkspace()
{
$filter = new InputFilter();
ini_set('max_execution_time', '0');
$info = new stdClass();
$info->result = false;
$info->message = '';
$db_hostname = trim($_REQUEST['db_hostname']);
$db_hostname = $filter->validateInput($db_hostname);
$db_port = trim($_REQUEST['db_port']);
$db_port = $filter->validateInput($db_port);
$db_username = trim($_REQUEST['db_username']);
$db_username = $filter->validateInput($db_username);
$db_password = urlencode(trim($_REQUEST['db_password']));
$db_password = urldecode($filter->validateInput($db_password));
$wf = trim($_REQUEST['wfDatabase']);
$rb = trim($_REQUEST['wfDatabase']);
$rp = trim($_REQUEST['wfDatabase']);
$workspace = trim($_REQUEST['workspace']);
$pathConfig = trim($_REQUEST['pathConfig']);
$pathLanguages = trim($_REQUEST['pathLanguages']);
$pathPlugins = trim($_REQUEST['pathPlugins']);
$pathShared = trim($_REQUEST['pathShared']);
$pathXmlforms = trim($_REQUEST['pathXmlforms']);
$adminPassword = trim($_REQUEST['adminPassword']);
$adminUsername = trim($_REQUEST['adminUsername']);
$deleteDB = ($_REQUEST['deleteDB'] == 'true');
if (substr($pathShared, -1) != '/') {
$pathShared .= '/';
}
$this->installLog('-------------------------------------------');
$this->installLog(G::LoadTranslation('ID_CREATING_WORKSPACE', SYS_LANG, array($workspace)));
try {
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
$this->link = @mssql_connect($db_host, $db_username, $db_password);
$this->installLog(G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, array($db_hostname, $db_port, $db_username)));
$this->mssqlQuery('USE [master]');
// DROP databases wf_workflow, rb_workflow and rp_workflow
if ($deleteDB) {
$q = sprintf("IF EXISTS (SELECT name FROM sys.databases WHERE name='%s' ) DROP DATABASE %s", $wf, $wf);
$this->mssqlQuery($q);
}
// CREATE databases wf_workflow, rb_workflow and rp_workflow
$q = sprintf("IF NOT EXISTS (SELECT * FROM sys.databases WHERE name='%s' ) CREATE DATABASE %s", $wf, $wf);
$this->mssqlQuery($q);
//CREATE users and GRANT Privileges
$wfPass = G::generate_password(15);
$this->setGrantPrivilegesMSSQL($wf, $wfPass, $wf);
//Generate the db.php file and folders
$path_site = $pathShared . "/sites/" . $workspace . "/";
$db_file = $path_site . "db.php";
mkdir($path_site, 0777, true);
@mkdir($path_site . "files/", 0777, true);
@mkdir($path_site . "mailTemplates/", 0777, true);
@mkdir($path_site . "public/", 0777, true);
@mkdir($path_site . "reports/", 0777, true);
@mkdir($path_site . "xmlForms", 0777, true);
$dbText = "<?php\n";
$dbText .= sprintf("// Processmaker configuration\n");
$dbText .= sprintf(" define ('DB_ADAPTER', '%s' );\n", 'mssql');
$dbText .= sprintf(" define ('DB_HOST', '%s' );\n", $db_host);
$dbText .= sprintf(" define ('DB_NAME', '%s' );\n", $wf);
$dbText .= sprintf(" define ('DB_USER', '%s' );\n", $wf);
$dbText .= sprintf(" define ('DB_PASS', '%s' );\n", $wfPass);
$dbText .= sprintf(" define ('DB_RBAC_HOST', '%s' );\n", $db_host);
$dbText .= sprintf(" define ('DB_RBAC_NAME', '%s' );\n", $wf);
$dbText .= sprintf(" define ('DB_RBAC_USER', '%s' );\n", $wf);
$dbText .= sprintf(" define ('DB_RBAC_PASS', '%s' );\n", $wfPass);
$dbText .= sprintf(" define ('DB_REPORT_HOST', '%s' );\n", $db_host);
$dbText .= sprintf(" define ('DB_REPORT_NAME', '%s' );\n", $wf);
$dbText .= sprintf(" define ('DB_REPORT_USER', '%s' );\n", $wf);
$dbText .= sprintf(" define ('DB_REPORT_PASS', '%s' );\n", $wfPass);
if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) {
$dbText .= "\n";
$dbText .= " define ('PARTNER_FLAG', " . ((defined('PARTNER_FLAG')) ? PARTNER_FLAG : ((isset($_REQUEST['PARTNER_FLAG'])) ? $_REQUEST['PARTNER_FLAG'] : 'false')) . ");\n";
if ($this->systemName != '') {
$dbText .= " define ('SYSTEM_NAME', '" . $this->systemName . "');\n";
}
}
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, array($db_file)));
file_put_contents($db_file, $dbText);
// Generate the databases.php file
$databases_file = $path_site . 'databases.php';
$dbData = sprintf("\$dbAdapter = '%s';\n", 'mssql');
$dbData .= sprintf("\$dbHost = '%s';\n", $db_host);
$dbData .= sprintf("\$dbName = '%s';\n", $wf);
$dbData .= sprintf("\$dbUser = '%s';\n", $wf);
$dbData .= sprintf("\$dbPass = '%s';\n", $wfPass);
$dbData .= sprintf("\$dbRbacHost = '%s';\n", $db_host);
$dbData .= sprintf("\$dbRbacName = '%s';\n", $wf);
$dbData .= sprintf("\$dbRbacUser = '%s';\n", $wf);
$dbData .= sprintf("\$dbRbacPass = '%s';\n", $wfPass);
$dbData .= sprintf("\$dbReportHost = '%s';\n", $db_host);
$dbData .= sprintf("\$dbReportName = '%s';\n", $wf);
$dbData .= sprintf("\$dbReportUser = '%s';\n", $wf);
$dbData .= sprintf("\$dbReportPass = '%s';\n", $wfPass);
$databasesText = str_replace('{dbData}', $dbData, @file_get_contents(PATH_HOME . 'engine/templates/installer/databases.tpl'));
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, array($databases_file)));
file_put_contents($databases_file, $databasesText);
//execute scripts to create and populates databases
$query = sprintf("USE %s;", $wf);
$this->mssqlQuery($query);
$this->mssqlFileQuery(PATH_RBAC_HOME . 'engine/data/mssql/schema.sql');
$this->mssqlFileQuery(PATH_RBAC_HOME . 'engine/data/mssql/insert.sql');
$query = sprintf("USE %s;", $wf);
$this->mssqlQuery($query);
$this->mssqlFileQuery(PATH_HOME . 'engine/data/mssql/schema.sql');
$this->mssqlFileQuery(PATH_HOME . 'engine/data/mssql/insert.sql');
// Create the triggers
if (file_exists(PATH_HOME . 'engine/plugins/enterprise/data/triggerAppDelegationInsert.sql') && file_exists(PATH_HOME . 'engine/plugins/enterprise/data/triggerAppDelegationUpdate.sql') && file_exists(PATH_HOME . 'engine/plugins/enterprise/data/triggerApplicationUpdate.sql') && file_exists(PATH_HOME . 'engine/plugins/enterprise/data/triggerApplicationDelete.sql') && file_exists(PATH_HOME . 'engine/plugins/enterprise/data/triggerContentUpdate.sql')) {
$this->mssqlQuery(@file_get_contents(PATH_HOME . 'engine/plugins/enterprise/data/triggerAppDelegationInsert.sql'));
$this->mssqlQuery(@file_get_contents(PATH_HOME . 'engine/plugins/enterprise/data/triggerAppDelegationUpdate.sql'));
$this->mssqlQuery(@file_get_contents(PATH_HOME . 'engine/plugins/enterprise/data/triggerApplicationUpdate.sql'));
$this->mssqlQuery(@file_get_contents(PATH_HOME . 'engine/plugins/enterprise/data/triggerApplicationDelete.sql'));
$this->mssqlQuery(@file_get_contents(PATH_HOME . "engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql"));
$this->mssqlQuery(@file_get_contents(PATH_HOME . 'engine/plugins/enterprise/data/triggerContentUpdate.sql'));
$this->mssqlQuery("INSERT INTO CONFIGURATION (
CFG_UID,
CFG_VALUE
)
VALUES (
'APP_CACHE_VIEW_ENGINE',
'" . addslashes(serialize(array('LANG' => 'en', 'STATUS' => 'active'
))) . "'
)");
$this->mssqlQuery("INSERT INTO EMAIL_SERVER(MESS_UID, MESS_ENGINE) VALUES('" . Common::generateUID() . "','MAIL')");
}
//change admin user
$query = sprintf("USE %s;", $wf);
$this->mssqlQuery($query);
$query = sprintf("UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptHash($adminPassword));
$this->mssqlQuery($query);
$query = sprintf("USE %s;", $wf);
$this->mssqlQuery($query);
$query = sprintf("UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptHash($adminPassword));
$this->mssqlQuery($query);
// Write the paths_installed.php file (contains all the information configured so far)
if (!file_exists(FILE_PATHS_INSTALLED)) {
$sh = G::encryptOld(filemtime(PATH_GULLIVER . '/class.g.php'));
$h = G::encrypt($db_hostname . $sh . $db_username . $sh . $db_password . '1', $sh);
$dbText = "<?php\n";
$dbText .= sprintf(" define ('PATH_DATA', '%s' );\n", $pathShared);
$dbText .= sprintf(" define ('PATH_C', '%s' );\n", $pathShared . 'compiled/');
$dbText .= sprintf(" define ('HASH_INSTALLATION', '%s' );\n", $h);
$dbText .= sprintf(" define ('SYSTEM_HASH', '%s' );\n", $sh);
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, array(FILE_PATHS_INSTALLED)));
file_put_contents(FILE_PATHS_INSTALLED, $dbText);
}
$this->installLog(G::LoadTranslation('ID_INSTALL_SUCESS'));
$info->result = true;
$info->message = G::LoadTranslation('ID_INSTALL_SUCESS');
$info->url = '/sys' . $_REQUEST['workspace'] . '/en/neoclassic/login/login';
$info->messageFinish = G::LoadTranslation('ID_PROCESSMAKER_SUCCESS_INSTALLED', SYS_LANG, array($workspace));
} catch (Exception $e) {
$info->result = false;
$info->message = $e->getMessage();
}
return $info;
}
public function getSystemName($siteShared)
{
$systemName = '';
@@ -1270,15 +965,6 @@ class InstallerModule extends Controller
$engine->label = 'MySQL';
$engines[] = $engine;
}
/**
* DISABLED TEMPORARELY
* if (function_exists('mssql_query')) {
* $engine = new stdclass();
* $engine->id = 'mssql';
* $engine->label = 'Microsoft SQL Server';
* $engines[] = $engine;
* }
*/
return $engines;
}
@@ -1304,14 +990,6 @@ class InstallerModule extends Controller
$info->wfDatabaseExists = count($response) > 0;
break;
case 'mssql':
$link = @mssql_connect($db_hostname, $db_username, $db_password);
$wfDatabase = $filter->validateInput($_REQUEST['wfDatabase'], 'nosql');
$query = "select * from sys.databases where name = '%s' ";
$query = $filter->preventSqlInjection($query, array($wfDatabase));
$dataSet = @mssql_query($query, $link);
$info->wfDatabaseExists = (@mssql_num_rows($dataSet) > 0);
break;
case 'sqlsrv':
$arguments = array("UID" => $db_username, "PWD" => $db_password);
$link = @sqlsrv_connect($db_hostname, $arguments);
@@ -1378,89 +1056,6 @@ class InstallerModule extends Controller
return $info;
}
/**
* This function test a SQL Server connection
*
* @return object
*/
private function testMSSQLConnection()
{
$filter = new InputFilter();
$info = new stdClass();
$info->result = false;
$info->message = '';
if (!function_exists("mssql_connect")) {
$info->message = G::LoadTranslation('ID_PHP_MSSQL_NOT_INSTALLED');
return $info;
}
$dataRequest = $_REQUEST;
$db_hostname = $filter->validateInput($dataRequest['db_hostname']);
$db_port = $filter->validateInput($dataRequest['db_port']);
$db_username = $filter->validateInput($dataRequest['db_username']);
$db_password = urlencode($dataRequest['db_password']);
$db_password = urldecode($filter->validateInput($db_password));
$fp = @fsockopen($db_hostname, $db_port, $errno, $errstr, 30);
if (!$fp) {
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR', SYS_LANG, array("$errstr ($errno)"));
return $info;
}
\Illuminate\Support\Facades\DB::connection();
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
$link = @mssql_connect($db_host, $db_username, $db_password);
if (!$link) {
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
return $info;
}
//checking if user has the dbcreator role
$hasDbCreator = false;
$hasSecurityAdmin = false;
$hasSysAdmin = false;
$res = @mssql_query("EXEC sp_helpsrvrolemember 'dbcreator' ", $link);
$row = mssql_fetch_array($res);
while (is_array($row)) {
if ($row['MemberName'] == $db_username) {
$hasDbCreator = true;
}
$row = mssql_fetch_array($res);
}
mssql_free_result($res);
$res = @mssql_query("EXEC sp_helpsrvrolemember 'sysadmin' ", $link);
$row = mssql_fetch_array($res);
while (is_array($row)) {
if ($row['MemberName'] == $db_username) {
$hasSysAdmin = true;
}
$row = mssql_fetch_array($res);
}
mssql_free_result($res);
$res = @mssql_query("EXEC sp_helpsrvrolemember 'SecurityAdmin' ", $link);
$row = mssql_fetch_array($res);
while (is_array($row)) {
if ($row['MemberName'] == $db_username) {
$hasSecurityAdmin = true;
}
$row = mssql_fetch_array($res);
}
mssql_free_result($res);
if (!($hasSysAdmin || ($hasSecurityAdmin && $hasDbCreator))) {
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR_SECURITYADMIN', SYS_LANG, array($db_username));
return $info;
}
$info->message .= G::LoadTranslation('ID_MSSQL_SUCCESS_CONNECT');
$info->result = true;
return $info;
}
/**
* This function define the partner behaviour when the PARTNER_FLAG is defined
* Execute to change of skin

View File

@@ -1,81 +0,0 @@
<?php
class authSourceProxy extends HttpProxyController
{
function testingOption ($params)
{
/*global $RBAC;
$fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS);
$G_PUBLISH = new Publisher();
$data=array();
$aCommonFields = array('AUTH_SOURCE_UID',
'AUTH_SOURCE_NAME',
'AUTH_SOURCE_PROVIDER',
'AUTH_SOURCE_SERVER_NAME',
'AUTH_SOURCE_PORT',
'AUTH_SOURCE_ENABLED_TLS',
'AUTH_ANONYMOUS',
'AUTH_SOURCE_SEARCH_USER',
'AUTH_SOURCE_PASSWORD',
'AUTH_SOURCE_VERSION',
'AUTH_SOURCE_BASE_DN',
'AUTH_SOURCE_OBJECT_CLASSES',
'AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array();
unset($params->PHPSESSID);
foreach ($params as $sField => $sValue) {
if (in_array($sField, $aCommonFields)) {
$aFields[$sField] = (($sField=='AUTH_SOURCE_ENABLED_TLS' || $sField=='AUTH_ANONYMOUS'))? ($sValue=='yes')?1:0 :$sValue;
}
else {
$aData[$sField] = $sValue;
}
}
$aFields['AUTH_SOURCE_DATA'] = $aData;
if (isset($aFields['AUTH_SOURCE_UID']) && $aFields['AUTH_SOURCE_UID'] != '') {
$RBAC->updateAuthSource($aFields);
}
else {
$aAuth = $RBAC->createAuthSource($aFields);
}*/
//G::pr($aAuth);die;
$data['success'] = true;
$data['optionAuthS'] = $params->optionAuthS;
//$data['sUID'] = $aAuth;
return $data;
}
function saveAuthSources ($params)
{
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$aCommonFields = array ('AUTH_SOURCE_UID','AUTH_SOURCE_NAME','AUTH_SOURCE_PROVIDER','AUTH_SOURCE_SERVER_NAME','AUTH_SOURCE_PORT','AUTH_SOURCE_ENABLED_TLS','AUTH_ANONYMOUS','AUTH_SOURCE_SEARCH_USER','AUTH_SOURCE_PASSWORD','AUTH_SOURCE_VERSION','AUTH_SOURCE_BASE_DN','AUTH_SOURCE_OBJECT_CLASSES','AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array ();
unset( $params->PHPSESSID );
foreach ($params as $sField => $sValue) {
if (in_array( $sField, $aCommonFields )) {
$aFields[$sField] = (($sField == 'AUTH_SOURCE_ENABLED_TLS' || $sField == 'AUTH_ANONYMOUS')) ? ($sValue == 'yes') ? 1 : 0 : $sValue;
} else {
$aData[$sField] = $sValue;
}
}
$aFields['AUTH_SOURCE_DATA'] = $aData;
if ($aFields['AUTH_SOURCE_UID'] == '') {
$RBAC->createAuthSource( $aFields );
} else {
$RBAC->updateAuthSource( $aFields );
}
$data = array ();
$data['success'] = true;
return $data;
} //end saveAuthSoruces function
} //end authSourceProxy class

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
# Sqlfile -> Database map
schema.sql=workflow

View File

@@ -47,7 +47,7 @@ switch ($request) {
$e[] = $o->getNode( $element );
}
$o->__cloneEmpty();
$o->cloneEmpty();
foreach ($e as $e1) {
$o->setNode( $e1 );

View File

@@ -15,7 +15,7 @@ set_include_path(PATH_PM_ENTERPRISE . PATH_SEPARATOR . get_include_path());
class enterprisePlugin extends PMPlugin
{
public function enterprisePlugin($sNamespace, $sFilename = null)
public function __construct($sNamespace, $sFilename = null)
{
$pathPluginTrunk = PATH_CORE . "enterprise";

View File

@@ -1,45 +0,0 @@
<?php
/**
* messages_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'processes';
$G_ID_MENU_SELECTED = 'PROCESSES';
$G_ID_SUB_MENU_SELECTED = 'MESSAGES';
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
//Hardcode: UID of the library by default
$PRO_UID = '746B734DC23311';
$G_PUBLISH = new Publisher();
$Fields = array ('SYS_LANG' => SYS_LANG,'PRO_UID' => $PRO_UID);
$G_PUBLISH->AddContent( 'pagedtable', 'paged-table', 'messages/messages_List', '', $Fields, 'messages_Save' );
G::RenderPage( "publish" );

View File

@@ -1,23 +0,0 @@
<?php
require_once 'classes/model/OutputDocument.php';
$uid = $_SERVER['QUERY_STRING'];
$oOutputDocument = new OutputDocument();
$aFields = $oOutputDocument->load( $uid );
$type = $aFields['OUT_DOC_TYPE'];
if ($type == 'JRXML') {
$extension = 'jrxml';
}
if ($type == 'ACROFORM') {
$extension = 'pdf';
}
$fileJrxml = PATH_DYNAFORM . $aFields['PRO_UID'] . PATH_SEP . $aFields['OUT_DOC_UID'] . '.' . $extension;
$bDownload = true;
// The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
// $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$downFileName = preg_replace( '/[^A-Za-z0-9_]/i', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
G::streamFile( $fileJrxml, $bDownload, $downFileName );

View File

@@ -86,31 +86,6 @@ try {
G::RenderPage( 'publish', 'blank' );
die();
break;
case 'JRXML':
break;
case 'ACROFORM':
$type = $aFields['OUT_DOC_TYPE'];
if ($type == 'JRXML') {
$extension = 'jrxml';
}
if ($type == 'ACROFORM') {
$extension = 'pdf';
}
// The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
// $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$downFileName = preg_replace( '/[^A-Za-z0-9_]/i', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$filename = PATH_DYNAFORM . $aFields['PRO_UID'] . PATH_SEP . $aFields['OUT_DOC_UID'] . '.' . $extension;
if (file_exists( $filename )) {
$aFields['FILENAME'] = $downFileName;
} else {
$aFields['FILENAME'] = '';
}
$aFields['FILELINK'] = '../outputdocs/downloadFile?' . $aFields['OUT_DOC_UID'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocsUploadFile', '', $aFields, '../outputdocs/uploadFile' );
$G_PUBLISH->AddContent( 'view', 'outputdocs/editJrxml' );
break;
}
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {

View File

@@ -1,42 +0,0 @@
<?php
/**
* outputdocs_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'processes';
$G_ID_MENU_SELECTED = 'PROCESSES';
$G_ID_SUB_MENU_SELECTED = 'OUTPUTDOCS';
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$G_PUBLISH = new Publisher();
$Fields = array ('SYS_LANG' => SYS_LANG);
$G_PUBLISH->AddContent( 'pagedtable', 'paged-table', 'outputdocs/outputdocs_List', '', $Fields, 'outputdocs_Save' );
G::RenderPage( "publish" );

View File

@@ -36,7 +36,6 @@ switch ($option) {
$oHeadPublisher->assign("SYSINFO_PHP", "\"" . $systemInfo->php->version . "\", " . (($systemInfo->php->result)? 1 : 0));
$oHeadPublisher->assign("SYSINFO_MYSQL", "\"" . $systemInfo->mysql->version . "\", " . (($systemInfo->mysql->result)? 1 : 0));
$oHeadPublisher->assign("SYSINFO_MSSQL", "\"" . $systemInfo->mssql->version . "\", " . (($systemInfo->mssql->result)? 1 : 0));
$oHeadPublisher->assign("SYSINFO_CURL", "\"" . $systemInfo->curl->version . "\", " . (($systemInfo->curl->result)? 1 : 0));
$oHeadPublisher->assign("SYSINFO_OPENSSL", "\"" . $systemInfo->openssl->version . "\", " . (($systemInfo->openssl->result)? 1 : 0));
$oHeadPublisher->assign("SYSINFO_DOMXML", "\"" . $systemInfo->dom->version . "\", " . (($systemInfo->dom->result)? 1 : 0));

View File

@@ -76,20 +76,20 @@ try {
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptCode('
var pb=leimnud.dom.capture("tag.body 0");
Sm=new stagesmap();
Sm.options = {
target : "sm_target",
dataServer: "../tracker/tracker_Ajax",
uid : "' . $_POST['PRO_UID'] . '",
lang : "' . SYS_LANG . '",
theme : "processmaker",
size : {w:"780",h:"540"},
images_dir: "/jscore/processmap/core/images/",
rw : true,
hideMenu : false
};
$oHeadPublisher->addScriptCode('
var pb=leimnud.dom.capture("tag.body 0");
Sm=new stagesmap();
Sm.options = {
target : "sm_target",
dataServer: "../tracker/tracker_Ajax",
uid : "' . $_POST['PRO_UID'] . '",
lang : "' . SYS_LANG . '",
theme : "processmaker",
size : {w:"780",h:"540"},
images_dir: "/jscore/processmap/core/images/",
rw : true,
hideMenu : false
};
Sm.make();');
G::RenderPage('publish', 'raw');
break;
@@ -197,13 +197,13 @@ try {
break;
case 'load':
$oConnection = Propel::getConnection('workflow');
$oStatement = $oConnection->prepareStatement("CREATE TABLE IF NOT EXISTS `STAGE` (
`STG_UID` VARCHAR( 32 ) NOT NULL ,
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `STG_UID` )
$oStatement = $oConnection->prepareStatement("CREATE TABLE IF NOT EXISTS `STAGE` (
`STG_UID` VARCHAR( 32 ) NOT NULL ,
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `STG_UID` )
);");
$oStatement->executeQuery();
/**

View File

@@ -1,28 +1,27 @@
<?php
if (isset( $_POST['form'] ))
<?php
if (isset( $_POST['form'] ))
$sValue = $_POST['form']; //For old processmap
else
$sValue = $_POST;
unset( $sValue['SAVE'] );
if (! isset( $sValue['CT_DERIVATION_HISTORY'] )) {
$sValue['CT_DERIVATION_HISTORY'] = 0;
}
if (! isset( $sValue['CT_MESSAGE_HISTORY'] )) {
$sValue['CT_MESSAGE_HISTORY'] = 0;
}
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$oCaseTracker->update( $sValue );
$infoProcess = new Process();
$resultProcess = $infoProcess->load($sValue['PRO_UID']);
if($sValue['CT_DERIVATION_HISTORY'] == 1) {
$type[] = "Routing History";
}
if($sValue['CT_MESSAGE_HISTORY'] == 1) {
$type[] = "Messages History";
}
G::auditLog('CaseTrackers','Save Case Tracker Properties ('.$sValue['CT_MAP_TYPE'].' - '.implode(', ',$type).') in Process "'.$resultProcess['PRO_TITLE'].'"');
else
$sValue = $_POST;
unset( $sValue['SAVE'] );
if (! isset( $sValue['CT_DERIVATION_HISTORY'] )) {
$sValue['CT_DERIVATION_HISTORY'] = 0;
}
if (! isset( $sValue['CT_MESSAGE_HISTORY'] )) {
$sValue['CT_MESSAGE_HISTORY'] = 0;
}
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$oCaseTracker->update( $sValue );
$infoProcess = new Process();
$resultProcess = $infoProcess->load($sValue['PRO_UID']);
if($sValue['CT_DERIVATION_HISTORY'] == 1) {
$type[] = "Routing History";
}
if($sValue['CT_MESSAGE_HISTORY'] == 1) {
$type[] = "Messages History";
}
G::auditLog('CaseTrackers','Save Case Tracker Properties ('.$sValue['CT_MAP_TYPE'].' - '.implode(', ',$type).') in Process "'.$resultProcess['PRO_TITLE'].'"');

View File

@@ -1,82 +1,81 @@
<?php
/**
* tracker_ShowDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
<?php
/**
* tracker_ShowDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
if (! isset( $_GET['v'] )) { //Load last version of the document
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
} else {
$docVersion = $_GET['v'];
}
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
$ext = $info['extension'];
if (isset( $_GET['b'] )) {
if ($_GET['b'] == '0') {
$bDownload = false;
} else {
$bDownload = true;
}
} else {
$bDownload = true;
}
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
$realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/' . $sAppDocUid . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
$sw_file_exists = true;
$realPath = $realPath1;
}
if (! $sw_file_exists) {
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
print G::json_encode( $res );
} else {
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
}
}
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
} else {
$docVersion = $_GET['v'];
}
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
$ext = $info['extension'];
if (isset( $_GET['b'] )) {
if ($_GET['b'] == '0') {
$bDownload = false;
} else {
$bDownload = true;
}
} else {
$bDownload = true;
}
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
$realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/' . $sAppDocUid . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
$sw_file_exists = true;
$realPath = $realPath1;
}
if (! $sw_file_exists) {
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
print G::json_encode( $res );
} else {
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
}
}

View File

@@ -1,86 +1,85 @@
<?php
/**
* cases_ShowOutputDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
<?php
/**
* cases_ShowOutputDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Created on 13-02-2008
*
* @author David Callizaya <davidsantos@colosa.com>
*/
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : NULL );
$sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
} else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
} else {
$ext = $info['extension'];
}
}
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
*/
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : NULL );
$sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
} else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
} else {
$ext = $info['extension'];
}
}
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
if (! $ver) //This code is in the case the outputdocument won't be versioned
$ver = '_1';
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
$realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
$realPath2 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
$sw_file_exists = true;
$realPath = $realPath1;
} elseif (file_exists( $realPath2 )) {
$sw_file_exists = true;
$realPath = $realPath2;
}
if (! $sw_file_exists) {
$error_message = "'" . $info['basename'] . $ver . '.' . $ext . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $info['basename'] . $ver . '.' . $ext;
print G::json_encode( $res );
} else {
G::streamFile( $realPath, true, $info['basename'] . $ver . '.' . $ext );
}
}
//G::streamFile ( $realPath, true);
$ver = '_1';
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
$realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
$realPath2 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
$sw_file_exists = true;
$realPath = $realPath1;
} elseif (file_exists( $realPath2 )) {
$sw_file_exists = true;
$realPath = $realPath2;
}
if (! $sw_file_exists) {
$error_message = "'" . $info['basename'] . $ver . '.' . $ext . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $info['basename'] . $ver . '.' . $ext;
print G::json_encode( $res );
} else {
G::streamFile( $realPath, true, $info['basename'] . $ver . '.' . $ext );
}
}
//G::streamFile ( $realPath, true);

View File

@@ -284,7 +284,7 @@ class BpmnWorkflow extends Project\Bpmn
));
}
$taskData = self::__updateServiceTask($activityBefore, $activityCurrent, $taskData);
$taskData = self::updateServiceTask($activityBefore, $activityCurrent, $taskData);
if ($activityCurrent->getActLoopType() == "PARALLEL") {
$task = \TaskPeer::retrieveByPK($actUid);
@@ -326,7 +326,7 @@ class BpmnWorkflow extends Project\Bpmn
* @param $taskData
* @return mixed
*/
public static function __updateServiceTask($activityBefore, $activityCurrent, $taskData)
public static function updateServiceTask($activityBefore, $activityCurrent, $taskData)
{
$registry = PluginRegistry::loadSingleton();
if ($activityBefore->getActTaskType() != "SERVICETASK" && $activityCurrent->getActTaskType() == "SERVICETASK") {
@@ -439,7 +439,7 @@ class BpmnWorkflow extends Project\Bpmn
//$this->updateEventStartObjects($data["FLO_ELEMENT_ORIGIN"], $data["FLO_ELEMENT_DEST"]);
//WebEntry-Event - Update
$this->__updateWebEntryEventByEvent($data['FLO_ELEMENT_ORIGIN'], ['ACT_UID' => $data['FLO_ELEMENT_DEST']]);
$this->updateWebEntryEventByEvent($data['FLO_ELEMENT_ORIGIN'], ['ACT_UID' => $data['FLO_ELEMENT_DEST']]);
break;
case "bpmnEvent":
$messageEventRelationUid = $this->createMessageEventRelationByBpmnFlow(\BpmnFlowPeer::retrieveByPK($floUid));
@@ -489,7 +489,7 @@ class BpmnWorkflow extends Project\Bpmn
//$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest());
//WebEntry-Event - Update
$this->__updateWebEntryEventByEvent($flowCurrent->getFloElementOrigin(), ['ACT_UID' => $flowCurrent->getFloElementDest()]);
$this->updateWebEntryEventByEvent($flowCurrent->getFloElementOrigin(), ['ACT_UID' => $flowCurrent->getFloElementDest()]);
}
}
@@ -586,7 +586,7 @@ class BpmnWorkflow extends Project\Bpmn
//WebEntry-Event - Update
if (is_null($bpmnFlow)) {
$this->__updateWebEntryEventByEvent($flow->getFloElementOrigin(), ['WEE_STATUS' => 'DISABLED']);
$this->updateWebEntryEventByEvent($flow->getFloElementOrigin(), ['WEE_STATUS' => 'DISABLED']);
}
} elseif ($flow->getFloElementOriginType() == "bpmnActivity" &&
$flow->getFloElementDestType() == "bpmnEvent") {
@@ -633,7 +633,7 @@ class BpmnWorkflow extends Project\Bpmn
// TODO Complete for other routes, activity->activity, activity->gateway and viceversa
}
private function __updateEventActivityDefinition(\BpmnEvent $bpmnEvent, $flagStartTask)
private function updateEventActivityDefinition(\BpmnEvent $bpmnEvent, $flagStartTask)
{
try {
if ($bpmnEvent->getEvnType() == "START") {
@@ -655,7 +655,7 @@ class BpmnWorkflow extends Project\Bpmn
if (!is_null(\BpmnActivityPeer::retrieveByPK($arrayFlowData['FLO_ELEMENT_DEST']))) {
$this->wp->setStartTask($arrayFlowData['FLO_ELEMENT_DEST'], $flagStartTask);
$this->__updateWebEntryEventByEvent($bpmnEvent->getEvnUid());
$this->updateWebEntryEventByEvent($bpmnEvent->getEvnUid());
}
break;
}
@@ -758,7 +758,7 @@ class BpmnWorkflow extends Project\Bpmn
if ((isset($arrayEventData["EVN_TYPE"]) && $arrayEventData["EVN_TYPE"] != $bpmnEvent->getEvnType()) ||
(isset($arrayEventData["EVN_MARKER"]) && $arrayEventData["EVN_MARKER"] != $bpmnEvent->getEvnMarker())
) {
$this->__updateEventActivityDefinition($bpmnEvent, false);
$this->updateEventActivityDefinition($bpmnEvent, false);
$this->removeEventDefinition($bpmnEvent);
}
@@ -773,7 +773,7 @@ class BpmnWorkflow extends Project\Bpmn
try {
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
$this->__updateEventActivityDefinition($bpmnEvent, false);
$this->updateEventActivityDefinition($bpmnEvent, false);
$this->removeEventDefinition($bpmnEvent);
parent::removeEvent($eventUid);
@@ -794,7 +794,7 @@ class BpmnWorkflow extends Project\Bpmn
* @return string
* @throws Exception
*/
private function __createTaskByElement($elementUid, $elementType, $key, $eventName = '')
private function createTaskByElement($elementUid, $elementType, $key, $eventName = '')
{
try {
$taskTitle = $taskType = $this->arrayTaskAttribute[$key]["type"];
@@ -940,7 +940,7 @@ class BpmnWorkflow extends Project\Bpmn
break;
case "bpmnGateway":
//Gateway ----> Gateway
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$arrayFlowData['FLO_ELEMENT_DEST'],
'bpmnGateway',
'gateway-to-gateway'
@@ -963,7 +963,7 @@ class BpmnWorkflow extends Project\Bpmn
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
switch ($event->getEvnMarker()) {
case "MESSAGETHROW":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event->getEvnUid(),
"bpmnEvent",
"end-message-event"
@@ -973,7 +973,7 @@ class BpmnWorkflow extends Project\Bpmn
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
break;
case "EMAIL":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event->getEvnUid(),
"bpmnEvent",
"end-email-event"
@@ -1026,7 +1026,7 @@ class BpmnWorkflow extends Project\Bpmn
"EMAIL" => "intermediate-throw-email-event"
);
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$eventUid,
"bpmnEvent",
$arrayKey[$arrayEventData["EVN_MARKER"]],
@@ -1080,7 +1080,7 @@ class BpmnWorkflow extends Project\Bpmn
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
switch ($event->getEvnMarker()) {
case "MESSAGETHROW":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event->getEvnUid(),
"bpmnEvent",
"end-message-event"
@@ -1090,7 +1090,7 @@ class BpmnWorkflow extends Project\Bpmn
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
break;
case "EMAIL":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event->getEvnUid(),
"bpmnEvent",
"end-email-event"
@@ -1173,7 +1173,7 @@ class BpmnWorkflow extends Project\Bpmn
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
switch ($event->getEvnMarker()) {
case "MESSAGETHROW":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event->getEvnUid(),
"bpmnEvent",
"end-message-event"
@@ -1183,7 +1183,7 @@ class BpmnWorkflow extends Project\Bpmn
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
break;
case "EMAIL":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event->getEvnUid(),
"bpmnEvent",
"end-email-event"
@@ -1218,7 +1218,7 @@ class BpmnWorkflow extends Project\Bpmn
case "START":
switch ($event["EVN_MARKER"]) {
case "MESSAGECATCH":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event["EVN_UID"],
"bpmnEvent",
"start-message-event"
@@ -1229,7 +1229,7 @@ class BpmnWorkflow extends Project\Bpmn
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
break;
case "TIMER":
$taskUid = $this->__createTaskByElement(
$taskUid = $this->createTaskByElement(
$event["EVN_UID"],
"bpmnEvent",
"start-timer-event"
@@ -1240,7 +1240,7 @@ class BpmnWorkflow extends Project\Bpmn
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
break;
case "EMPTY":
$this->__updateEventActivityDefinition(\BpmnEventPeer::retrieveByPK($event['EVN_UID']), true);
$this->updateEventActivityDefinition(\BpmnEventPeer::retrieveByPK($event['EVN_UID']), true);
break;
}
break;
@@ -2048,7 +2048,7 @@ class BpmnWorkflow extends Project\Bpmn
//Map Bpmn-Flows to Workflow-Routes
$bwp->mapBpmnFlowsToWorkflowRoutes();
$bwp->__gatewayToGatewayDeleteCorruptedRecords(); //Delete corrupted records in task and element_task_relation tables
$bwp->gatewayToGatewayDeleteCorruptedRecords(); //Delete corrupted records in task and element_task_relation tables
//Return
return $result;
@@ -2071,7 +2071,7 @@ class BpmnWorkflow extends Project\Bpmn
$this->wp->setDisabled($value);
}
private function __updateWebEntryEventByEvent($eventUid, array $arrayData = null)
private function updateWebEntryEventByEvent($eventUid, array $arrayData = null)
{
try {
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
@@ -2145,7 +2145,7 @@ class BpmnWorkflow extends Project\Bpmn
return $diagram;
}
private function __gatewayToGatewayDeleteCorruptedRecords()
private function gatewayToGatewayDeleteCorruptedRecords()
{
//Delete corrupted records in task and element_task_relation tables

View File

@@ -1594,7 +1594,7 @@ class Bpmn extends Handler
}
}
private function __getElementsBetweenElementOriginAndElementDest(
private function getElementsBetweenElementOriginAndElementDestPriv(
$elementOriginUid,
$elementOriginType,
$elementDestUid,
@@ -1632,7 +1632,7 @@ class Bpmn extends Handler
foreach ($arrayFlow as $value) {
$arrayFlowData = $value->toArray();
$arrayEvent = $this->__getElementsBetweenElementOriginAndElementDest(
$arrayEvent = $this->getElementsBetweenElementOriginAndElementDestPriv(
$arrayFlowData["FLO_ELEMENT_DEST"],
$arrayFlowData["FLO_ELEMENT_DEST_TYPE"],
$elementDestUid,
@@ -1668,7 +1668,7 @@ class Bpmn extends Handler
$this->arrayElementOriginChecked = [];
//Return
return call_user_func_array([$this, "__getElementsBetweenElementOriginAndElementDest"], array_merge(func_get_args(), [0]));
return call_user_func_array([$this, "getElementsBetweenElementOriginAndElementDestPriv"], array_merge(func_get_args(), [0]));
} catch (\Exception $e) {
self::log("Exception: ", $e->getMessage(), "Trace: ", $e->getTraceAsString());

View File

@@ -27,37 +27,37 @@
*/
if (!((isset($_SESSION['USER_LOGGED']))&&(!(isset($_GET['sid']))))||!isset($_SESSION['Current_Dynafom'])) {
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptCode("
window.parent.location.href = '../processes/mainInit';
$oHeadPublisher->addScriptCode("
window.parent.location.href = '../processes/mainInit';
");
G::RenderPage('publish');
exit();
}
?>
<html>
<head>
<link type="text/css" href="/js/jquery/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<link type="text/css" href="/skin/<?php echo SYS_SKIN;?>/style.css" rel="stylesheet" />
<style> body{ background-color: #fff; }</style>
<script type="text/javascript" src="/js/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/jscore/dynaforms/dynaforms_fieldsHandler.js"></script>
</head>
?>
<html>
<head>
<link type="text/css" href="/js/jquery/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<link type="text/css" href="/skin/<?php echo SYS_SKIN;?>/style.css" rel="stylesheet" />
<style> body{ background-color: #fff; }</style>
<script type="text/javascript" src="/js/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/jscore/dynaforms/dynaforms_fieldsHandler.js"></script>
</head>
<?php
$content = file_get_contents(PATH_DYNAFORM.$_SESSION['Current_Dynafom']['Parameters']['FILE'].".xml");
$oXxml = G::xmlParser($content);
if (!isset($oXxml->result['dynaForm']['__CONTENT__'])) {
?>
<br/>
<div class="ui-widget-header ui-corner-all" style="height:17px" align="center">
<?php echo G::loadTranslation('ID_NO_FIELD_FOUND')?>
</div>
<script>
parent.document.getElementById('light').style.display='none';
parent.document.getElementById('fade').style.display='none';
</script>
?>
<br/>
<div class="ui-widget-header ui-corner-all" style="height:17px" align="center">
<?php echo G::loadTranslation('ID_NO_FIELD_FOUND')?>
</div>
<script>
parent.document.getElementById('light').style.display='none';
parent.document.getElementById('fade').style.display='none';
</script>
<?php
die();
}
@@ -73,58 +73,58 @@
$hidden_fields = G::decrypt($boot_strap['__ATTRIBUTES__']['meta'], 'dynafieldsHandler');
//echo $hidden_fields;
$hidden_fields_list = explode(',', $hidden_fields);
unset($elements[$node_name]); ?>
<script>
parent.jsMeta = "<?php echo $boot_strap['__ATTRIBUTES__']['meta'] ?>";
</script>
unset($elements[$node_name]); ?>
<script>
parent.jsMeta = "<?php echo $boot_strap['__ATTRIBUTES__']['meta'] ?>";
</script>
<?php
}
}
?>
<body>
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="fieldshandler_item">
<tr>
<td width="15%" valign="top" align="left">
<a href='#' onclick="return false;" onmouseout="parent.hideTooltip()" onmouseover="parent.showTooltip(event,document.getElementById('help').innerHTML);return false;">
<image src="/images/help4.gif" width="16" height="16" border="0"/>
</a>
</td>
<td valign="top" width="990px"><center>
<div style="width:100%">
<div class="ui-widget-header ui-corner-all" style="height:17px">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<td width="7%"><div style="font-size:9px; color:#fff;" align="left">&nbsp;<b><?php echo G::loadTranslation('ID_VISIBLE')?></b></div></td>
<td width="15%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left">&nbsp;<?php echo G::loadTranslation('ID_TYPE')?></div></td>
<td width="28%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left">&nbsp;<?php echo G::loadTranslation('ID_NAME')?></div></td>
<td width="6"><div style="font-size:12px;color:#fff; font-weight:bold" align="left">&nbsp;<?php echo G::loadTranslation('ID_LABEL')?></div></td>
</table>
</div>
</div>
<div id="dynafields">
<ul id="sortable" style="margin:0; padding:0;">
?>
<body>
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="fieldshandler_item">
<tr>
<td width="15%" valign="top" align="left">
<a href='#' onclick="return false;" onmouseout="parent.hideTooltip()" onmouseover="parent.showTooltip(event,document.getElementById('help').innerHTML);return false;">
<image src="/images/help4.gif" width="16" height="16" border="0"/>
</a>
</td>
<td valign="top" width="990px"><center>
<div style="width:100%">
<div class="ui-widget-header ui-corner-all" style="height:17px">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<td width="7%"><div style="font-size:9px; color:#fff;" align="left">&nbsp;<b><?php echo G::loadTranslation('ID_VISIBLE')?></b></div></td>
<td width="15%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left">&nbsp;<?php echo G::loadTranslation('ID_TYPE')?></div></td>
<td width="28%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left">&nbsp;<?php echo G::loadTranslation('ID_NAME')?></div></td>
<td width="6"><div style="font-size:12px;color:#fff; font-weight:bold" align="left">&nbsp;<?php echo G::loadTranslation('ID_LABEL')?></div></td>
</table>
</div>
</div>
<div id="dynafields">
<ul id="sortable" style="margin:0; padding:0;">
<?php foreach ($elements as $node_name=>$node) {
if (isset($hidden_fields_list)) {
$checked = !(in_array($node_name, $hidden_fields_list))? 'checked="checked"': '';
} else {
$checked = 'checked="checked"';
} ?>
<li style="list-style:none;" id="<?php echo $node_name?>" class="ui-state-default" onmouseover="setClass(this, 'ui-state-hover')" onmouseout="setClass(this, 'ui-state-default')">
<table class="dynalist" border="0" width="100%" cellpadding="0" cellspacing="0" id="fieldshandler_items_table">
<tr>
<td width="7%">
} ?>
<li style="list-style:none;" id="<?php echo $node_name?>" class="ui-state-default" onmouseover="setClass(this, 'ui-state-hover')" onmouseout="setClass(this, 'ui-state-default')">
<table class="dynalist" border="0" width="100%" cellpadding="0" cellspacing="0" id="fieldshandler_items_table">
<tr>
<td width="7%">
<?php if ($node['__ATTRIBUTES__']['type'] != 'javascript' && $dynaformType != 'grid') {
?>
<input id="chk@<?php echo $node_name?>" type="checkbox" onclick="parent.jsMeta = fieldsHandlerSaveHidden();" <?php echo $checked?> />
?>
<input id="chk@<?php echo $node_name?>" type="checkbox" onclick="parent.jsMeta = fieldsHandlerSaveHidden();" <?php echo $checked?> />
<?php
} else {
?>
&nbsp;
?>
&nbsp;
<?php
} ?>
</td>
<td width="15%" >
} ?>
</td>
<td width="15%" >
<?php $type = $node['__ATTRIBUTES__']['type'];
switch ($type) {
case 'yesno': $type = 'yes_no'; break;
@@ -132,23 +132,23 @@
case 'checkgroup': $type = 'check_group'; break;
case 'radiogroup': $type = 'radio_group'; break;
case 'file': $type = 'upload_files'; break;
} ?>
} ?>
<?php if (is_file(PATH_HTML.'images'.PATH_SEP.'dynamicForm'.PATH_SEP."$type.gif")) {
?>
<img src="/images/dynamicForm/<?php echo $type?>.gif"/>
?>
<img src="/images/dynamicForm/<?php echo $type?>.gif"/>
<?php
} else {
?>
<img src="/images/unknown_icon.gif" border="0" width="20" height="16"/>
?>
<img src="/images/unknown_icon.gif" border="0" width="20" height="16"/>
<?php
} ?>
<span style="font-size:10px;">&nbsp;<?php echo "({$node['__ATTRIBUTES__']['type']})"; ?></span>
</td>
<td width="28%" style="font-size:12px;">
&nbsp;<?php echo "$node_name"; ?>
</td>
<td><p style="font-size:12px; color:#1C3166; font-weight:bold">
} ?>
<span style="font-size:10px;">&nbsp;<?php echo "({$node['__ATTRIBUTES__']['type']})"; ?></span>
</td>
<td width="28%" style="font-size:12px;">
&nbsp;<?php echo "$node_name"; ?>
</td>
<td><p style="font-size:12px; color:#1C3166; font-weight:bold">
<?php if (isset($node["__CONTENT__"][SYS_LANG]["__VALUE__"]) && $node["__CONTENT__"][SYS_LANG]["__VALUE__"] != "") {
if (strlen($node['__CONTENT__'][SYS_LANG]['__VALUE__']) > 30) {
$label = substr(trim(strip_tags(G::stripCDATA($node['__CONTENT__'][SYS_LANG]['__VALUE__']))), 0, 30) . '...';
@@ -158,98 +158,97 @@
print($label);
} else {
print("&nbsp;");
} ?></p>
</td>
<td width="40px" class="options" align="right">
} ?></p>
</td>
<td width="40px" class="options" align="right">
<?php if (in_array($node['__ATTRIBUTES__']['type'], $_POST['fieldsList'])) {
?>
<!-- <div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>-->
<div class="jq-checkpointSubhead" style="display:block">
<a title="<?php echo G::loadTranslation('ID_EDIT_FIELD')?>" href="#" onclick="__ActionEdit('<?php echo $node_name?>'); return false;"><img src="/images/e_Edit.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
</div>
?>
<!-- <div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>-->
<div class="jq-checkpointSubhead" style="display:block">
<a title="<?php echo G::loadTranslation('ID_EDIT_FIELD')?>" href="#" onclick="__ActionEdit('<?php echo $node_name?>'); return false;"><img src="/images/e_Edit.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
</div>
<?php
} else {
?>
<div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>
<div class="jq-checkpointSubhead" style="display:none">
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
</div>
?>
<div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>
<div class="jq-checkpointSubhead" style="display:none">
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
</div>
<?php
} ?>
</td>
</tr>
</table>
</li>
} ?>
</td>
</tr>
</table>
</li>
<?php
}?>
</ul>
</div>
</center>
<br/><br/>
</td>
<td valign="top" align="right" width="300" style="text-align:right">
<div id="help" style="display:none">
<h3 class="ui-widget-header ui-corner-all">Processmaker - DynaFields Handler</h3>
<b><?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP1');?></b><br/><br/>
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP2');?><br/>
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP3');?>
</div>
</td>
</tr>
</table>
</body>
<script language="javascript">
var lastUidFHSelected;
var lastFTypeFHSelected;
function __ActionEdit(uid){
lastUidFHSelected = uid;
if (!parent.sessionPersits()) {
parent.showPrompt('__ActionEdit');
return;
}
var client_window = parent.getClientWindowSize();
h = client_window.height;
h1 = (h / 100) * 92;
window.parent.popupWindow('', "fields_Edit?A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME="+ uid , 600, h1);
}
function __ActionDelete(uid, ftype){
lastUidFHSelected = uid;
lastFTypeFHSelected = ftype;
if (!parent.sessionPersits()) {
parent.showPrompt('__ActionDelete');
return;
}
new window.parent.leimnud.module.app.confirm().make({
label: '<?php echo G::LoadTranslation('ID_FIELD_HANDLER_ACTION_DELETE');?>' + ' ' + ftype + "?",
action:function(){
$.ajax({
type: "POST",
url: "fields_Delete",
data: 'A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME='+uid,
success: function(httpResponse){
window.parent.dynaformEditor.refreshFieldsList();
}
});
}
});
}
window.onload = function() {
parent_divs = parent.document.getElementsByTagName('div');
for(i=0; i<parent_divs.length; i++){
if(parent_divs[i].className == 'panel_containerWindow___processmaker'){
content_div = parent_divs[i];
}
}
h = content_div.style.height.split('px');
window.parent.document.getElementById('dynaframe').height = (h[0]-120);
parent.document.getElementById('light').style.display='none';
parent.document.getElementById('fade').style.display='none';
}
</script>
</html>
}?>
</ul>
</div>
</center>
<br/><br/>
</td>
<td valign="top" align="right" width="300" style="text-align:right">
<div id="help" style="display:none">
<h3 class="ui-widget-header ui-corner-all">Processmaker - DynaFields Handler</h3>
<b><?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP1');?></b><br/><br/>
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP2');?><br/>
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP3');?>
</div>
</td>
</tr>
</table>
</body>
<script language="javascript">
var lastUidFHSelected;
var lastFTypeFHSelected;
function __ActionEdit(uid){
lastUidFHSelected = uid;
if (!parent.sessionPersits()) {
parent.showPrompt('__ActionEdit');
return;
}
var client_window = parent.getClientWindowSize();
h = client_window.height;
h1 = (h / 100) * 92;
window.parent.popupWindow('', "fields_Edit?A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME="+ uid , 600, h1);
}
function __ActionDelete(uid, ftype){
lastUidFHSelected = uid;
lastFTypeFHSelected = ftype;
if (!parent.sessionPersits()) {
parent.showPrompt('__ActionDelete');
return;
}
new window.parent.leimnud.module.app.confirm().make({
label: '<?php echo G::LoadTranslation('ID_FIELD_HANDLER_ACTION_DELETE');?>' + ' ' + ftype + "?",
action:function(){
$.ajax({
type: "POST",
url: "fields_Delete",
data: 'A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME='+uid,
success: function(httpResponse){
window.parent.dynaformEditor.refreshFieldsList();
}
});
}
});
}
window.onload = function() {
parent_divs = parent.document.getElementsByTagName('div');
for(i=0; i<parent_divs.length; i++){
if(parent_divs[i].className == 'panel_containerWindow___processmaker'){
content_div = parent_divs[i];
}
}
h = content_div.style.height.split('px');
window.parent.document.getElementById('dynaframe').height = (h[0]-120);
parent.document.getElementById('light').style.display='none';
parent.document.getElementById('fade').style.display='none';
}
</script>
</html>

View File

@@ -61,7 +61,6 @@ Ext.onReady(function () {
var response = Ext.util.JSON.decode(response.responseText);
Ext.getCmp('php').setValue(getFieldOutput(response.php.version, response.php.result));
Ext.getCmp('mysql').setValue(getFieldOutput(response.mysql.version, response.mysql.result));
//Ext.getCmp('mssql').setValue (getFieldOutput(response.mssql.version, response.mssql.result));
Ext.getCmp('curl').setValue(getFieldOutput(response.curl.version, response.curl.result));
Ext.getCmp('openssl').setValue(getFieldOutput(response.openssl.version, response.openssl.result));
Ext.getCmp('dom').setValue(getFieldOutput(response.dom.version, response.dom.result));
@@ -72,7 +71,7 @@ Ext.onReady(function () {
Ext.getCmp('ldap').setValue(getFieldOutput(response.ldap.version, response.ldap.result));
Ext.getCmp('memory').setValue(getFieldOutput(response.memory.version, response.memory.result));
dbReq = response.mysql.result || response.mssql.result;
dbReq = response.mysql.result;
phpReq = response.php.result && response.curl.result && response.dom.result && response.gd.result && response.multibyte.result && response.soap.result && response.memory.result && response.mcrypt.result;
wizard.onClientValidation(0, dbReq && phpReq);
wizard.showLoadMask(false);

View File

@@ -29,7 +29,6 @@ systemInfo.application = {
case "SYS":
Ext.getCmp("php").setValue(fieldFormatValue(dataResponse.php.version, dataResponse.php.result));
Ext.getCmp("mysql").setValue(fieldFormatValue(dataResponse.mysql.version, dataResponse.mysql.result));
//Ext.getCmp("mssql").setValue(fieldFormatValue(dataResponse.mssql.version, dataResponse.mssql.result));
Ext.getCmp("curl").setValue(fieldFormatValue(dataResponse.curl.version, dataResponse.curl.result));
Ext.getCmp("openssl").setValue(fieldFormatValue(dataResponse.openssl.version, dataResponse.openssl.result));
Ext.getCmp("dom").setValue(fieldFormatValue(dataResponse.dom.version, dataResponse.dom.result));
@@ -100,14 +99,6 @@ systemInfo.application = {
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MYSQL"),
value: eval("fieldFormatValue(" + SYSINFO_MYSQL + ");")
},
/*
{
xtype: "displayfield",
id: "mssql",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MSSQL"),
value: eval("fieldFormatValue(" + SYSINFO_MSSQL + ");")
},
*/
{
xtype: "displayfield",
id: "curl",

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="dynaforms_List" type="filterform" sql="SELECT *, T.CON_VALUE AS fMESS_TITLE, D.CON_VALUE AS fMESS_DESCRIPTION FROM MESSAGE LEFT JOIN CONTENT as T ON (T.CON_ID=MESS_UID AND T.CON_CATEGORY='MESS_TITLE') LEFT JOIN CONTENT AS D ON (D.CON_ID=MESS_UID AND D.CON_CATEGORY='MESS_DESCRIPTION') WHERE PRO_UID=@@PRO_UID" sqlConnection="" menu="messages/messages_Options" filterForm="messages/messages_List" searchBy="T.CON_VALUE | D.CON_VALUE" width="100%">
<MESS_UID type="hidden" showInTable="0"/>
<fMESS_TITLE type="text" colWidth="200" titleAlign="left" align="left" dataCompareField="T.CON_VALUE" dataCompareType="contains">
<en><![CDATA[Output document]]></en>
</fMESS_TITLE>
<MESS_TYPE type="dropdown" colWidth="120" titleAlign="left" align="left" dataCompareField="TYPE" dataCompareType="=">
<en><![CDATA[Type]]><option name="HTML"><![CDATA[HTML]]></option><option name="TEXT"><![CDATA[Plain text]]></option><option name="SMS"><![CDATA[SMS]]></option></en>
</MESS_TYPE>
<fMESS_DESCRIPTION type="textarea" rows="3" cols="32" colWidth="200" titleAlign="left" align="left" dataCompareField="D.CON_VALUE" dataCompareType="contains">
<en><![CDATA[Content]]></en>
</fMESS_DESCRIPTION>
<EDIT type="link" colWidth="40" value="@G::LoadTranslation(ID_EDIT)" link="#" onclick="messagesEdit(@QMESS_UID);return false;">
<en><![CDATA[]]></en>
</EDIT>
<DELETE type="link" colWidth="40" value="@G::LoadTranslation(ID_DELETE)" link="#" onclick="if (confirm('@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_MESSAGE)')) messagesDelete(@QMESS_UID);return false;">
<en><![CDATA[]]></en>
</DELETE>
<SEARCH type="button" onclick="pagedTableFilter( this.form );" showInTable="0">
<en><![CDATA[Apply Filter]]></en>
</SEARCH>
<PAGED_TABLE_ID type="private" showInTable="0"/>
<JSFILTER type="javascript" replaceTags="1" showInTable="0">
function pagedTableFilter( form ) {
@#PAGED_TABLE_ID.doFilter( form );
}
</JSFILTER>
</dynaForm>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="dynaforms_List" type="filterform" sql="SELECT *, T.CON_VALUE AS OUT_DOC_TITLE, D.CON_VALUE AS OUT_DOC_DESCRIPTION FROM OUTPUT_DOCUMENT LEFT JOIN CONTENT as T ON (T.CON_ID=OUT_DOC_UID AND T.CON_CATEGORY='OUT_DOC_TITLE') LEFT JOIN CONTENT AS D ON (D.CON_ID=OUT_DOC_UID AND D.CON_CATEGORY='OUT_DOC_DESCRIPTION')" sqlConnection="" menu="outputdocs/outputdocs_Options" filterForm="outputdocs/outputdocs_List" width="100%">
<OUT_DOC_UID type="hidden" showInTable="0"/>
<OUT_DOC_TITLE type="text" colWidth="200" titleAlign="left" align="left" dataCompareField="T.CON_VALUE" dataCompareType="contains">
<en><![CDATA[Output document]]></en>
</OUT_DOC_TITLE>
<OUT_DOC_FILENAME type="text" colWidth="200" titleAlign="left" align="left" dataCompareField="OUT_DOC_FILENAME" dataCompareType="contains">
<en><![CDATA[Filename]]></en>
</OUT_DOC_FILENAME>
<OUT_DOC_DESCRIPTION type="textarea" rows="3" cols="32" colWidth="200" titleAlign="left" align="left" dataCompareField="D.CON_VALUE" dataCompareType="contains">
<en><![CDATA[Description]]></en>
</OUT_DOC_DESCRIPTION>
<EDIT type="link" colWidth="40" value="@G::LoadTranslation(ID_EDIT)" link="#" onclick="outputdocsEdit(@QOUT_DOC_UID);return false;">
<en><![CDATA[]]></en>
</EDIT>
<DELETE type="link" colWidth="40" value="@G::LoadTranslation(ID_DELETE)" link="#" onclick="if (confirm('@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_OUTDOC)')) outputdocsDelete(@QOUT_DOC_UID);return false;">
<en><![CDATA[]]></en>
</DELETE>
<SEARCH type="button" onclick="pagedTableFilter( this.form );" showInTable="0">
<en><![CDATA[Apply Filter]]></en>
</SEARCH>
<PAGED_TABLE_ID type="private" showInTable="0"/>
<JSFILTER type="javascript" replaceTags="1" showInTable="0">
function pagedTableFilter( form ) {
@#PAGED_TABLE_ID.doFilter( form );
}
</JSFILTER>
</dynaForm>