Merged in victorsl/processmaker/HOR-722-31 (pull request #4587)
HOR-722
This commit is contained in:
@@ -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 = "";
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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' => ''
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -71,9 +71,7 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
|
||||
if (!empty($arrayTrigger)) {
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$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 = "";
|
||||
|
||||
@@ -313,7 +311,7 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
G::LoadClass( 'Process' );
|
||||
$oProcess = new Process();
|
||||
$processData = $oProcess->load( $prjUid );
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
$proType = $processData["PRO_TYPE"];
|
||||
|
||||
$result = array(
|
||||
"success" => true,
|
||||
|
||||
@@ -58,9 +58,7 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$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);
|
||||
|
||||
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName));
|
||||
|
||||
|
||||
@@ -252,9 +252,7 @@ try {
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$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);
|
||||
|
||||
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", $path . $pluginFile), $cs->checkDisabledCode("PATH", $path . $sClassName));
|
||||
|
||||
|
||||
@@ -87,9 +87,7 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$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);
|
||||
|
||||
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $value["TRI_WEBBOT"]);
|
||||
|
||||
|
||||
@@ -188,9 +188,7 @@ class Trigger
|
||||
//Check disabled code
|
||||
\G::LoadClass("codeScanner");
|
||||
|
||||
$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);
|
||||
|
||||
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $dataTrigger["TRI_WEBBOT"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user