Merged in victorsl/processmaker/HOR-722-31 (pull request #4587)

HOR-722
This commit is contained in:
Julio Cesar Laura Avendaño
2016-07-19 14:52:41 -04:00
11 changed files with 50 additions and 42 deletions

View File

@@ -3555,10 +3555,8 @@ class Cases
$oPMScript = new PMScript();
$oPMScript->setFields($aFields);
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
/*----------------------------------********---------------------------------*/
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$cs = new CodeScanner(SYS_SYS);
$strFoundDisabledCode = "";
/*----------------------------------********---------------------------------*/

View File

@@ -5913,11 +5913,12 @@ class Processes
/**
* Get disabled code
*
* @param string $processUid Unique id of Process
* @param string $processUid Unique id of Process
* @param string $workspaceName Workspace name
*
* return array Return array with disabled code found, array empty otherwise
* @return array Returns an array with disabled code found, array empty otherwise
*/
public function getDisabledCode($processUid = "")
public function getDisabledCode($processUid = null, $workspaceName = null)
{
try {
/*----------------------------------********---------------------------------*/
@@ -5933,7 +5934,7 @@ class Processes
}
//Set variables
$cs = new CodeScanner("DISABLED_CODE");
$cs = new CodeScanner((!is_null($workspaceName))? $workspaceName : SYS_SYS);
$delimiter = DBAdapter::getStringDelimiter();
@@ -5949,7 +5950,7 @@ class Processes
$arrayCondition[] = array(ContentPeer::CON_LANG, $delimiter . SYS_LANG . $delimiter, Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
if ($processUid != "") {
if (!is_null($processUid)) {
$criteria->add(ProcessPeer::PRO_UID, $processUid, Criteria::EQUAL);
}

View File

@@ -72,6 +72,7 @@ class System
'safari_cookie_lifetime' => 1,
'error_reporting' => "",
'display_errors' => 'On',
'enable_blacklist' => 0,
'system_utc_time_zone' => 0,
'server_protocol' => '',
'server_hostname_requests_frontend' => ''

View File

@@ -1946,7 +1946,7 @@ class workspaceTools
/**
* Get disabled code
*
* return array Return array with disabled code found, array empty otherwise
* @return array Returns an array with disabled code found, array empty otherwise
*/
public function getDisabledCode()
{
@@ -1958,7 +1958,7 @@ class workspaceTools
$process = new Processes();
//Return
return $process->getDisabledCode();
return $process->getDisabledCode(null, $this->name);
} catch (Exception $e) {
throw $e;
}