Merged in victorsl/processmaker/HOR-433-3018-B (pull request #3852)
HOR-433
This commit is contained in:
@@ -225,7 +225,7 @@ class pmDynaform
|
||||
$json->optionsSql[] = $option;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -605,7 +605,7 @@ class pmDynaform
|
||||
$data[$json->variable === "" ? $json->id : $json->variable] = $row[0];
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -649,6 +649,7 @@ class pmDynaform
|
||||
$javascript = "
|
||||
<script type=\"text/javascript\">
|
||||
var jsondata = " . G::json_encode($json) . ";
|
||||
var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";
|
||||
var pm_run_outside_main_app = \"\";
|
||||
var dyn_uid = \"" . $this->fields["CURRENT_DYNAFORM"] . "\";
|
||||
var __DynaformName__ = \"" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "\";
|
||||
@@ -704,6 +705,7 @@ class pmDynaform
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var __DynaformName__ = '" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "';\n" .
|
||||
@@ -776,6 +778,7 @@ class pmDynaform
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";\n" .
|
||||
"var pm_run_outside_main_app = '" . $this->fields["PM_RUN_OUTSIDE_MAIN_APP"] . "';\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var __DynaformName__ = '" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "';\n" .
|
||||
@@ -828,6 +831,7 @@ class pmDynaform
|
||||
$javascrip = "
|
||||
<script type=\"text/javascript\">
|
||||
var jsondata = " . G::json_encode($json) . ";
|
||||
var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";
|
||||
var pm_run_outside_main_app = null;
|
||||
var dyn_uid = \"" . $this->fields["CURRENT_DYNAFORM"] . "\";
|
||||
var __DynaformName__ = \"" . $this->fields["PRO_UID"] . "_" . $this->fields["CURRENT_DYNAFORM"] . "\";
|
||||
@@ -867,6 +871,7 @@ class pmDynaform
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var __DynaformName__ = null;\n" .
|
||||
@@ -904,6 +909,7 @@ class pmDynaform
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var __DynaformName__ = null;\n" .
|
||||
@@ -937,7 +943,8 @@ class pmDynaform
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>" .
|
||||
"var sysLang = '" . SYS_LANG . "';\n" .
|
||||
"var jsonData = " . G::json_encode($json) . ";" .
|
||||
"var jsonData = " . G::json_encode($json) . ";\n" .
|
||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";\n" .
|
||||
$js .
|
||||
"</script>";
|
||||
|
||||
@@ -958,6 +965,7 @@ class pmDynaform
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd(false) . "\";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $currentDynaform . "';\n" .
|
||||
"var __DynaformName__ = null;\n" .
|
||||
@@ -1217,7 +1225,7 @@ class pmDynaform
|
||||
|
||||
/**
|
||||
* You obtain an array of elements according to search criteria.
|
||||
*
|
||||
*
|
||||
* @param object $json
|
||||
* @param string $id
|
||||
* @param string $for
|
||||
@@ -1549,7 +1557,7 @@ class pmDynaform
|
||||
|
||||
/**
|
||||
* Returns the value converted to string if it is not null.
|
||||
*
|
||||
*
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -71,7 +71,8 @@ class System
|
||||
'safari_cookie_lifetime' => 1,
|
||||
'error_reporting' => "",
|
||||
'display_errors' => 'On',
|
||||
'system_utc_time_zone' => 0
|
||||
'system_utc_time_zone' => 0,
|
||||
'server_hostname_requests_frontend' => ''
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1252,6 +1253,28 @@ class System
|
||||
|
||||
return self::$debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the complete name of the server host configured for requests Front-End (e.g. https://127.0.0.1:81)
|
||||
*
|
||||
* @param bool $flagHttp Add https/http string
|
||||
*
|
||||
* @return string Returns an string with the complete name of the server host configured for requests Front-End
|
||||
*/
|
||||
public static function getHttpServerHostnameRequestsFrontEnd($flagHttp = true)
|
||||
{
|
||||
try {
|
||||
$arraySystemConfiguration = self::getSystemConfiguration();
|
||||
|
||||
$serverHostname = $arraySystemConfiguration['server_hostname_requests_frontend'];
|
||||
$serverHostname = ($serverHostname != '')? $serverHostname : $_SERVER['HTTP_HOST'];
|
||||
|
||||
//Return
|
||||
return (($flagHttp)? ((G::is_https())? 'https://' : 'http://') : '') . $serverHostname;
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
// end System class
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ class Designer extends Controller
|
||||
$this->setVar("SYS_SYS", SYS_SYS);
|
||||
$this->setVar("SYS_LANG", SYS_LANG);
|
||||
$this->setVar("SYS_SKIN", SYS_SKIN);
|
||||
$this->setVar('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());
|
||||
|
||||
if ($debug) {
|
||||
if (! file_exists(PATH_HTML . "lib-dev/pmUI/build.cache")) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class StrategicDashboard extends Controller
|
||||
$user = new Users();
|
||||
$user = $user->load($RBAC->aUserInfo['USER_INFO']['USR_UID']);
|
||||
$this->usrUnitCost = $this->currencySymbolToShow($user);
|
||||
$this->urlProxy = '/api/1.0/' . SYS_SYS . '/';
|
||||
$this->urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/';
|
||||
//change
|
||||
$clientId = 'x-pm-local-client';
|
||||
$client = $this->getClientCredentials($clientId);
|
||||
@@ -144,7 +144,7 @@ class StrategicDashboard extends Controller
|
||||
public function formDashboard ($data)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
$this->includeExtJS( 'strategicDashboard/formDashboard', true, true );
|
||||
$this->setView( 'strategicDashboard/formDashboard' );
|
||||
|
||||
@@ -164,7 +164,7 @@ class StrategicDashboard extends Controller
|
||||
public function formEditDashboard ($data)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
$this->includeExtJS( 'strategicDashboard/formDashboard', true, true );
|
||||
$this->setView( 'strategicDashboard/formDashboard' );
|
||||
|
||||
@@ -196,7 +196,7 @@ class StrategicDashboard extends Controller
|
||||
$this->setVar('usrId', $this->usrId);
|
||||
$this->setVar('credentials', $this->clientToken);
|
||||
$this->setVar('unitCost', $this->usrUnitCost);
|
||||
|
||||
|
||||
$translation = $this->getTranslations();
|
||||
$this->setVar('translation', $translation);
|
||||
$this->render();
|
||||
|
||||
@@ -44,7 +44,7 @@ $(window).load(function () {
|
||||
action = "cases_SaveData?UID=" + dyn_uid + "&APP_UID=" + app_uid;
|
||||
}
|
||||
url = location.protocol + '//' + location.host;
|
||||
|
||||
|
||||
url += '/sys' + workspace + '/en/neoclassic/cases/' + action;
|
||||
method = 'POST';
|
||||
}
|
||||
@@ -71,7 +71,7 @@ $(window).load(function () {
|
||||
},
|
||||
formAjax: loadAjaxParams(),
|
||||
keys: {
|
||||
server: location.host,
|
||||
server: httpServerHostname,
|
||||
projectId: prj_uid,
|
||||
workspace: workspace
|
||||
},
|
||||
|
||||
@@ -133,7 +133,7 @@ while ($rsSql->next()) {
|
||||
}
|
||||
|
||||
if (count($arrayTabItem) > 0) {
|
||||
$urlProxy = '/api/1.0/' . SYS_SYS . '/consolidated/';
|
||||
$urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/consolidated/';
|
||||
$clientId = 'x-pm-local-client';
|
||||
$client = getClientCredentials($clientId);
|
||||
$authCode = getAuthorizationCode($client);
|
||||
@@ -178,7 +178,7 @@ if (count($arrayTabItem) > 0) {
|
||||
$headPublisher->assign("FORMATS", $conf->getFormats());
|
||||
$headPublisher->assign("urlProxy", $urlProxy);
|
||||
$headPublisher->assign('credentials', $clientToken );
|
||||
|
||||
|
||||
$ieVersion = null;
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ieVersion = intval($arrayMatch[1]);
|
||||
|
||||
@@ -83,7 +83,7 @@ if ($oServerConf->isRtl( SYS_LANG )) {
|
||||
|
||||
$urlProxy = 'casesMenuLoader?action=getAllCounters&r=';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$urlProxy = '/api/1.0/' . SYS_SYS . '/system/counters-lists?r=';
|
||||
$urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/system/counters-lists?r=';
|
||||
$clientId = 'x-pm-local-client';
|
||||
$client = getClientCredentials($clientId);
|
||||
$authCode = getAuthorizationCode($client);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
var SYS_SYS = "{$SYS_SYS}";
|
||||
var SYS_LANG = "{$SYS_LANG}";
|
||||
var SYS_SKIN = "{$SYS_SKIN}";
|
||||
var HTTP_SERVER_HOSTNAME = "{$HTTP_SERVER_HOSTNAME}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/lib-dev/js/wz_jsgraphics.js"></script>
|
||||
<script type="text/javascript" src="/lib-dev/js/jquery-1.10.2.min.js"></script>
|
||||
@@ -81,6 +82,7 @@
|
||||
var SYS_SYS = "{$SYS_SYS}";
|
||||
var SYS_LANG = "{$SYS_LANG}";
|
||||
var SYS_SKIN = "{$SYS_SKIN}";
|
||||
var HTTP_SERVER_HOSTNAME = "{$HTTP_SERVER_HOSTNAME}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/lib/js/mafe-{$buildhash}.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user