Merge remote-tracking branch 'origin/bugfix/HOR-3670' into release/3.2.2

This commit is contained in:
David Callizaya
2017-08-15 10:07:12 -04:00
326 changed files with 11383 additions and 24998 deletions

View File

@@ -2,7 +2,10 @@
namespace ProcessMaker\BusinessModel;
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
use PmDynaform;
use SpoolRun;
/**
* Description of ActionsByEmailService
@@ -406,9 +409,9 @@ class ActionsByEmail
$arrayConfigAux = $row;
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
}
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \PmSystem::getEmailConfiguration();
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : System::getEmailConfiguration();
$spool = new \spoolRun();
$spool = new SpoolRun();
$spool->setConfig($aSetup);
$spool->create(array(
@@ -579,7 +582,7 @@ class ActionsByEmail
$configuration = $resultD->getRow();
$field = new \stdClass();
$obj = new \pmDynaform($configuration);
$obj = new PmDynaform($configuration);
if ($dataRes['ABE_RES_DATA'] !== '') {
$value = unserialize($dataRes['ABE_RES_DATA']);
@@ -670,7 +673,7 @@ class ActionsByEmail
//SSO
if (\PMLicensedFeatures::getSingleton()->verifyfeature('x4TTzlISnp2K2tnSTJoMC8rTDRMTjlhMCtZeXV0QnNCLzU=')) {
$sso = new \pmSsoClass();
$sso = new \PmSsoClass();
if ($sso->ssocVerifyUser()) {
global $RBAC;

View File

@@ -5,16 +5,14 @@ use G;
use UsersPeer;
use CasesPeer;
use AppDelegation;
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
use Exception;
use wsBase;
use WsBase;
use RBAC;
use pmDynaform;
use Applications;
use PmDynaform;
/**
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
class Cases
{
private $formatFieldNameInUppercase = true;
@@ -187,7 +185,7 @@ class Cases
{
try {
$solrEnabled = false;
$solrConf = \PmSystem::solrEnv();
$solrConf = System::solrEnv();
if ($solrConf !== false) {
$ApplicationSolrIndex = new \AppSolr(
@@ -262,7 +260,7 @@ class Cases
$newerThan = (!empty($dataList['newerThan']))? $dataList['newerThan'] : '';
$oldestThan = (!empty($dataList['oldestthan']))? $dataList['oldestthan'] : '';
$apps = new \Applications();
$apps = new Applications();
$response = $apps->getAll(
$userUid,
$start,
@@ -336,7 +334,7 @@ class Cases
$dateTo = (!empty( $dataList["dateTo"] )) ? substr( $dataList["dateTo"], 0, 10 ) : "";
$filterStatus = isset( $dataList["filterStatus"] ) ? strtoupper( $dataList["filterStatus"] ) : "";
$apps = new \Applications();
$apps = new Applications();
$response = $apps->searchAll(
$userId,
$start,
@@ -379,7 +377,7 @@ class Cases
{
try {
$solrEnabled = 0;
if (($solrEnv = \PmSystem::solrEnv()) !== false) {
if (($solrEnv = System::solrEnv()) !== false) {
$appSolr = new \AppSolr(
$solrEnv["solr_enabled"],
$solrEnv["solr_host"],
@@ -406,7 +404,7 @@ class Cases
$solrSearchText = "($solrSearchText)";
//Add del_index dynamic fields to list of resulting columns
$columsToIncludeFinal = array_merge($columsToInclude, $delegationIndexes);
$solrRequestData = \Entity_SolrRequestData::createForRequestPagination(
$solrRequestData = \EntitySolrRequestData::createForRequestPagination(
array(
"workspace" => $solrEnv["solr_instance"],
"startAfter" => 0,
@@ -420,7 +418,7 @@ class Cases
)
);
//Use search index to return list of cases
$searchIndex = new \BpmnEngine_Services_SearchIndex($appSolr->isSolrEnabled(), $solrEnv["solr_host"]);
$searchIndex = new \BpmnEngineServicesSearchIndex($appSolr->isSolrEnabled(), $solrEnv["solr_host"]);
//Execute query
$solrQueryResult = $searchIndex->getDataTablePaginatedList($solrRequestData);
//Get the missing data from database
@@ -467,7 +465,7 @@ class Cases
if (!isset($row)) {
continue;
}
$ws = new wsBase();
$ws = new WsBase();
$fields = $ws->getCaseInfo($applicationUid, $row["DEL_INDEX"]);
$array = json_decode(json_encode($fields), true);
if ($array ["status_code"] != 0) {
@@ -534,7 +532,7 @@ class Cases
throw (new Exception($arrayData));
}
} else {
$ws = new wsBase();
$ws = new WsBase();
$fields = $ws->getCaseInfo($applicationUid, 0);
$array = json_decode(json_encode($fields), true);
@@ -680,7 +678,7 @@ class Cases
{
try {
$ws = new wsBase();
$ws = new WsBase();
if ($variables) {
$variables = array_shift($variables);
}
@@ -724,7 +722,7 @@ class Cases
{
try {
$ws = new wsBase();
$ws = new WsBase();
if ($variables) {
$variables = array_shift($variables);
} elseif ($variables == null) {
@@ -779,7 +777,7 @@ class Cases
$delIndex = AppDelegation::getCurrentIndex($applicationUid);
}
$ws = new wsBase();
$ws = new WsBase();
$fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidSource, $userUidTarget);
$array = json_decode(json_encode($fields), true);
if (array_key_exists("status_code", $array)) {
@@ -1010,7 +1008,7 @@ class Cases
$RBAC->sSystem = 'PROCESSMAKER';
}
$case = new wsBase();
$case = new WsBase();
$result = $case->executeTrigger($userUid, $appUid, $triUid, $delIndex);
if ($result->status_code != 0) {
@@ -1077,7 +1075,7 @@ class Cases
}
}
$ws = new wsBase();
$ws = new WsBase();
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $bExecuteTriggersBeforeAssignment = false);
$array = json_decode(json_encode($fields), true);
if ($array ["status_code"] != 0) {
@@ -1651,7 +1649,7 @@ class Cases
}
}
return $caseVariable;
} catch (Exception $e) {
} catch (\Exception $e) {
throw $e;
}
}
@@ -1683,7 +1681,7 @@ class Cases
if (!is_null($dynaFormUid)) {
$data["CURRENT_DYNAFORM"] = $dynaFormUid;
$pmDynaForm = new \pmDynaform($data);
$pmDynaForm = new PmDynaform($data);
$arrayDynaFormData = $pmDynaForm->getDynaform();
$arrayDynContent = \G::json_decode($arrayDynaFormData['DYN_CONTENT']);
$pmDynaForm->jsonr($arrayDynContent);
@@ -2302,7 +2300,7 @@ class Cases
$tas_uid = $aCaseField["TAS_UID"];
$pro_uid = $aCaseField["PRO_UID"];
$oApplication = new \Applications();
$oApplication = new Applications();
$aField = $oApplication->getSteps($app_uid, $del_index, $tas_uid, $pro_uid);
return $aField;

View File

@@ -701,7 +701,7 @@ class InputDocument
throw new \Exception(\G::LoadTranslation("ID_CASES_INPUT_DOES_NOT_EXIST", array($inputDocumentUid)));
}
$ws = new \wsBase();
$ws = new \WsBase();
$ws->removeDocument($inputDocumentUid);
} catch (\Exception $e) {
throw $e;

View File

@@ -1,18 +1,16 @@
<?php
namespace ProcessMaker\BusinessModel;
use \G;
use \Smarty;
use \Criteria;
use \ReportTablePeer;
use \ResultSet;
use \CaseConsolidatedCorePeer;
use \ContentPeer;
use G;
use Smarty;
use Criteria;
use ReportTablePeer;
use ResultSet;
use CaseConsolidatedCorePeer;
use ContentPeer;
use PmDynaform;
use ReportTables;
/**
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
class Consolidated
{
/**
@@ -69,7 +67,7 @@ class Consolidated
*/
public function postDerivate($app_uid, $app_number, $del_index, $usr_uid, $fieldName = '', $fieldValue = '')
{
$ws = new \wsBase();
$ws = new \WsBase();
$oCase = new \Cases();
if (!isset($Fields["DEL_INIT_DATE"])) {
@@ -361,7 +359,7 @@ class Consolidated
$filter = new \InputFilter();
if ($sort != "") {
$reportTable = new \ReportTables();
$reportTable = new ReportTables();
$arrayReportTableVar = $reportTable->getTableVars($tableUid);
$tableName = $filter->validateInput($tableName);
$sort = $filter->validateInput($sort);
@@ -468,7 +466,7 @@ class Consolidated
$dataTask = $oDyna->load($dyn_uid);
if ($dataTask['DYN_VERSION'] > 0) {
$_SESSION['PROCESS'] = $pro_uid;
$pmDyna = new \pmDynaform(array('APP_DATA' => array(), "CURRENT_DYNAFORM" => $dyn_uid));
$pmDyna = new PmDynaform(array('APP_DATA' => array(), "CURRENT_DYNAFORM" => $dyn_uid));
$json = G::json_decode($dataTask["DYN_CONTENT"]);
$pmDyna->jsonr($json);
$fieldsDyna = $json->items[0]->items;

View File

@@ -271,7 +271,7 @@ class DataBaseConnection
$flagTns = ($dataCon["DBS_TYPE"] == "oracle" && $dataCon["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0;
if ($flagTns == 0) {
$Server = new \NET($dataCon['DBS_SERVER']);
$Server = new \Net($dataCon['DBS_SERVER']);
// STEP 1 : Resolving Host Name
$respTest['0'] = array();
@@ -356,7 +356,7 @@ class DataBaseConnection
}
}
} else {
$net = new \NET();
$net = new \Net();
//STEP 0: Trying to open database type TNS
$respTest["0"] = array();

View File

@@ -1,8 +1,10 @@
<?php
namespace ProcessMaker\BusinessModel;
use \G;
use \Exception;
use \Bootstrap;
use G;
use Exception;
use Bootstrap;
use SpoolRun;
use ProcessMaker\Core\System;
class EmailServer
{
@@ -181,12 +183,12 @@ class EmailServer
$sBodyPre->prepare();
$sBodyPre->assign("server", $_SERVER["SERVER_NAME"]);
$sBodyPre->assign("date", date("H:i:s"));
$sBodyPre->assign("ver", \PmSystem::getVersion());
$sBodyPre->assign("ver", System::getVersion());
$sBodyPre->assign("engine", $engine);
$sBodyPre->assign("msg", $msg);
$sBody = $sBodyPre->getOutputContent();
$oSpool = new \spoolRun();
$oSpool = new SpoolRun();
$oSpool->setConfig($aConfiguration);
@@ -316,7 +318,7 @@ class EmailServer
$mailTo = $arrayData["MAIL_TO"];
$smtpSecure = $arrayData["SMTPSECURE"];
$serverNet = new \NET($server);
$serverNet = new \Net($server);
$smtp = new \SMTP();
$timeout = 10;

View File

@@ -1,6 +1,8 @@
<?php
namespace ProcessMaker\BusinessModel;
use PmDynaform;
class InputDocument
{
private $arrayFieldDefinition = array(
@@ -378,7 +380,7 @@ class InputDocument
$result = $inputDocument->update($arrayData);
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$pmDynaform->synchronizeInputDocument($processUid, $arrayData);
//Return

View File

@@ -7,7 +7,9 @@ use Criteria;
use UsersPeer;
use AppDelegationPeer;
use AppDelayPeer;
use ProcessMaker\Core\System;
use ProcessMaker\Util\DateTime;
use PmLicenseManager;
class Light
{
@@ -524,7 +526,7 @@ class Light
$delIndex = \AppDelegation::getCurrentIndex($applicationUid);
}
$ws = new \wsBase();
$ws = new \WsBase();
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks);
$array = json_decode(json_encode($fields), true);
$array['message'] = trim(strip_tags($array['message']));
@@ -779,7 +781,7 @@ class Light
/*----------------------------------********---------------------------------*/
$licenseManager =& \pmLicenseManager::getSingleton();
$licenseManager =& PmLicenseManager::getSingleton();
if (in_array(md5($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
$G_PUBLISH = new \Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');
@@ -1259,7 +1261,7 @@ class Light
$offset = timezone_offset_get( new \DateTimeZone( $tz ), new \DateTime() );
$response['timeZone'] = sprintf( "GMT%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( ($offset % 3600) / 60 ) );
$response['multiTimeZone'] = $multiTimeZone;
$fields = \PmSystem::getSysInfo();
$fields = System::getSysInfo();
$response['version'] = $fields['PM_VERSION'];
$buildType = 'Community';

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel\Light;
use ProcessMaker\Core\System;
use \ProcessMaker\Services\Api;
use G;
@@ -11,7 +12,7 @@ class NotificationDevice
public function checkMobileNotifications()
{
$conf = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$conf = System::getSystemConfiguration('', '', SYS_SYS);
$activeNotifications = true;
if (isset($conf['mobileNotifications'])) {
$activeNotifications = $conf['mobileNotifications'] == 1 ? true : false;

View File

@@ -13,6 +13,8 @@
namespace ProcessMaker\BusinessModel\Light;
use ProcessMaker\Core\System;
class PushMessageAndroid
{
private $url = 'https://android.googleapis.com/gcm/send';
@@ -54,7 +56,7 @@ class PushMessageAndroid
*/
public function setSettingNotification()
{
$conf = \PmSystem::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$conf = System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['android']['url']);
$this->setKey($conf['android']['serverApiKey']);
}

View File

@@ -12,6 +12,8 @@
namespace ProcessMaker\BusinessModel\Light;
use ProcessMaker\Core\System;
class PushMessageIOS
{
private $url = 'ssl://gateway.sandbox.push.apple.com:2195';
@@ -67,7 +69,7 @@ class PushMessageIOS
*/
public function setSettingNotification()
{
$conf = \PmSystem::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$conf = System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['apple']['url']);
$this->setKey($conf['apple']['passphrase']);
$this->setPemFile($conf['apple']['pemFile']);

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel\Light;
use PmDynaform;
class Tracker
{
@@ -266,7 +267,7 @@ class Tracker
$Fields["PRO_UID"] = $pro_uid;
$Fields["CURRENT_DYNAFORM"] = $obj_uid;
$pmDynaForm = new \pmDynaform($Fields);
$pmDynaForm = new PmDynaform($Fields);
// if ($pmDynaForm->isResponsive()) {
// $pmDynaForm->printTracker();

View File

@@ -368,7 +368,7 @@ class MessageApplication
try {
//Set variables
$ws = new \wsBase();
$ws = new \WsBase();
$case = new \Cases();
$common = new \ProcessMaker\Util\Common();
$sysSys = (defined("SYS_SYS"))? SYS_SYS : "Undefined";

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel\Migrator;
use ProcessMaker\Core\System;
use ProcessMaker\Project;
use ProcessMaker\Util\Common;
@@ -134,7 +135,7 @@ class GranularExporter
$data["version"] = "3.1";
$data["container"] = "ProcessMaker-Project";
$data["metadata"] = array(
"vendor_version" => \PmSystem::getVersion(),
"vendor_version" => System::getVersion(),
"vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -1,12 +1,12 @@
<?php
namespace ProcessMaker\BusinessModel;
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "Task.php");
use \G;
use \Criteria;
use \UsersPeer;
use \GroupUserPeer;
use \ResultSet;
use ProcessMaker\Core\System;
/**
* @copyright Colosa - Bolivia
@@ -30,7 +30,7 @@ class Pmgmail {
//getting the skin
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php");
$sysConf = new \PmSystem();
$sysConf = new System();
$responseSysConfig = $sysConf->getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$response['enviroment'] = $responseSysConfig['default_skin'];
@@ -357,7 +357,7 @@ class Pmgmail {
return false;
}
$ws = new \wsBase();
$ws = new \WsBase();
$resultMail = $ws->sendMessage(
$application['APP_UID'],
$defaultEmail, //From,

View File

@@ -1617,7 +1617,7 @@ class Process
$triggerWizard->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$triggerWizard->setArrayFieldNameForException($this->arrayFieldNameForException);
$triggerLibrary = \triggerLibrary::getSingleton();
$triggerLibrary = \TriggerLibrary::getSingleton();
$library = $triggerLibrary->getRegisteredClasses();
ksort($library);

View File

@@ -1,7 +1,7 @@
<?php
namespace ProcessMaker\BusinessModel;
use PmSystem;
use ProcessMaker\Core\System;
use Exception;
use G;
@@ -18,7 +18,7 @@ class Skins
*/
public function getSkins()
{
$list = PmSystem::getSkingList();
$list = System::getSkingList();
return $list['skins'];
}

View File

@@ -1211,7 +1211,7 @@ class TimerEvent
try {
//Set variables
$ws = new \wsBase();
$ws = new \WsBase();
$case = new \Cases();
$common = new \ProcessMaker\Util\Common();
$sysSys = (defined("SYS_SYS"))? SYS_SYS : "Undefined";

View File

@@ -38,7 +38,7 @@ class TriggerWizard
//Library
$this->library = \triggerLibrary::getSingleton();
$this->library = \TriggerLibrary::getSingleton();
} catch (\Exception $e) {
throw $e;
}

View File

@@ -4,6 +4,7 @@ namespace ProcessMaker\BusinessModel;
use G;
use Exception;
use AdditionalTables;
use PmDynaform;
class Variable
{
@@ -194,7 +195,7 @@ class Variable
"VAR_ACCEPTED_VALUES" => $variable->getVarAcceptedValues()
);
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$pmDynaform->synchronizeVariable($processUid, $newVariable, $oldVariable);
} else {
@@ -236,7 +237,7 @@ class Variable
$this->throwExceptionIfVariableIsAssociatedAditionalTable($variableUid);
$variable = $this->getVariable($processUid, $variableUid);
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$isUsed = $pmDynaform->isUsed($processUid, $variable);
if ($isUsed !== false) {
$titleDynaform=$pmDynaform->getDynaformTitle($isUsed);
@@ -783,7 +784,7 @@ class Variable
//This value is required to be able to query the database.
$_SESSION["PROCESS"] = $proUid;
//The pmdynaform class is instantiated
$pmDynaform = new \pmDynaform(array("APP_DATA" => $params));
$pmDynaform = new PmDynaform(array("APP_DATA" => $params));
//Get control from dynaform.
//The parameters: queryFilter, queryStart, queryLimit, are only necessary

View File

@@ -1,6 +1,8 @@
<?php
namespace ProcessMaker\BusinessModel;
use ProcessMaker\Core\System;
class WebEntry
{
private $arrayFieldDefinition = array(
@@ -453,7 +455,7 @@ class WebEntry
$template->assign("dynaform", empty($arrayDynaFormData) ? '' : $arrayDynaFormData["DYN_TITLE"]);
$template->assign("timestamp", date("l jS \of F Y h:i:s A"));
$template->assign("ws", $this->sysSys);
$template->assign("version", \PmSystem::getVersion());
$template->assign("version", System::getVersion());
$fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php";