Merge remote branch 'upstream/3.0.1.7' into 3.0.1.7-Gmail
This commit is contained in:
@@ -84,6 +84,7 @@ try {
|
||||
G::LoadSystem('dvEditor');
|
||||
G::LoadSystem('table');
|
||||
G::LoadSystem('pagedTable');
|
||||
G::LoadSystem('httpProxyController');
|
||||
G::LoadClass('system');
|
||||
|
||||
require_once('propel/Propel.php');
|
||||
@@ -150,6 +151,7 @@ try {
|
||||
G::LoadClass('processes');
|
||||
G::LoadClass('derivation');
|
||||
G::LoadClass('dates'); //Load Criteria
|
||||
G::LoadClass('spool');
|
||||
|
||||
//Set variables
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -2391,7 +2391,11 @@ class wsBase
|
||||
|
||||
if (isset($val['NEXT_TASK']['USER_ASSIGNED'])) {
|
||||
$usrasgdUid = $val['NEXT_TASK']['USER_ASSIGNED']['USR_UID'];
|
||||
$usrasgdUserName = '(' . $val['NEXT_TASK']['USER_ASSIGNED']['USR_USERNAME'] . ')';
|
||||
if(isset($val['NEXT_TASK']['USER_ASSIGNED']['USR_USERNAME'])){
|
||||
$usrasgdUserName = '(' . $val['NEXT_TASK']['USER_ASSIGNED']['USR_USERNAME'] . ')';
|
||||
}else{
|
||||
$usrasgdUserName = '';
|
||||
}
|
||||
}
|
||||
|
||||
$nodeNext['TAS_UID'] = $val['NEXT_TASK']['TAS_UID'];
|
||||
|
||||
@@ -79,6 +79,9 @@ class AppCacheView extends BaseAppCacheView
|
||||
default:
|
||||
return $type;
|
||||
}
|
||||
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
|
||||
$criteria->addJoin(AppCacheViewPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
|
||||
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
|
||||
|
||||
return AppCacheViewPeer::doCount($criteria, $distinct);
|
||||
}
|
||||
|
||||
@@ -1033,5 +1033,20 @@ class Process extends BaseProcess
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllConfiguredCurrencies()
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( ProcessPeer::PRO_UNIT_COST);
|
||||
$oCriteria->setDistinct();
|
||||
$oDataSet = ProcessPeer::doSelectRS( $oCriteria, Propel::getDbConnection('workflow_ro') );
|
||||
$oDataSet->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$aProc = Array ();
|
||||
while ($oDataSet->next()) {
|
||||
$row = $oDataSet->getRow();
|
||||
$aProc[$row['PRO_UNIT_COST']] = $row['PRO_UNIT_COST'];
|
||||
}
|
||||
return $aProc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,11 +30,7 @@ class StrategicDashboard extends Controller
|
||||
$this->usrId = $RBAC->aUserInfo['USER_INFO']['USR_UID'];
|
||||
$user = new Users();
|
||||
$user = $user->load($RBAC->aUserInfo['USER_INFO']['USR_UID']);
|
||||
$this->usrUnitCost = '$';
|
||||
if (isset($user['USR_UNIT_COST'])) {
|
||||
$this->usrUnitCost = $user['USR_UNIT_COST'];
|
||||
}
|
||||
|
||||
$this->usrUnitCost = $this->currencySymbolToShow($user);
|
||||
$this->urlProxy = '/api/1.0/' . SYS_SYS . '/';
|
||||
//change
|
||||
$clientId = 'x-pm-local-client';
|
||||
@@ -67,6 +63,28 @@ class StrategicDashboard extends Controller
|
||||
$this->clientToken["client_secret"] = $client['CLIENT_SECRET'];
|
||||
}
|
||||
|
||||
private function currencySymbolToShow($user)
|
||||
{
|
||||
$result = '$';
|
||||
if (isset($user['USR_UNIT_COST']) && !empty($user['USR_UNIT_COST'])) {
|
||||
$result = $user['USR_UNIT_COST'];
|
||||
}
|
||||
else {
|
||||
$processModel = new Process();
|
||||
$processList = $processModel->getAllConfiguredCurrencies();
|
||||
$defaultProcessCurrency = '';
|
||||
foreach ($processList as $key => $value) {
|
||||
if (!empty($value)) {
|
||||
$defaultProcessCurrency = $value;
|
||||
}
|
||||
}
|
||||
if (!empty($defaultProcessCurrency)) {
|
||||
$result = $defaultProcessCurrency;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function getClientCredentials($clientId)
|
||||
{
|
||||
$oauthQuery = new ProcessMaker\Services\OAuth2\PmPdo($this->getDsn());
|
||||
|
||||
@@ -76,6 +76,9 @@ class XmlExporter extends Exporter
|
||||
$recordData = array_change_key_case($recordData, CASE_LOWER);
|
||||
|
||||
foreach ($recordData as $key => $value) {
|
||||
if(is_object($value)){
|
||||
$value = serialize($value);
|
||||
}
|
||||
$columnNode = $this->dom->createElement($key);
|
||||
$columnNode->appendChild($this->getTextNode($value));
|
||||
$recordNode->appendChild($columnNode);
|
||||
|
||||
Reference in New Issue
Block a user