HOR-1767
This commit is contained in:
@@ -48,7 +48,7 @@ class PMmemcached
|
||||
|
||||
public function __construct ($workspace)
|
||||
{
|
||||
$this->enabled = MEMCACHED_ENABLED;
|
||||
$this->enabled = defined("MEMCACHED_ENABLED") ? MEMCACHED_ENABLED : \G::$memcachedEnabled;
|
||||
$this->connected = false;
|
||||
$this->workspace = $workspace;
|
||||
if (class_exists( 'Memcached' )) {
|
||||
@@ -81,7 +81,7 @@ class PMmemcached
|
||||
}
|
||||
}
|
||||
|
||||
if (! MEMCACHED_ENABLED) {
|
||||
if (!$this->enabled) {
|
||||
$this->connected = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3252,18 +3252,24 @@ class workspaceTools
|
||||
|
||||
public function migrateIteeToDummytask($workspaceName){
|
||||
$this->initPropel(true);
|
||||
if (!defined("SYS_SYS")) {
|
||||
define("SYS_SYS", $workspaceName);
|
||||
}
|
||||
if (!defined("PATH_DATA_SITE")) {
|
||||
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP);
|
||||
}
|
||||
if (!defined("PATH_DOCUMENT")) {
|
||||
define("PATH_DOCUMENT", PATH_DATA . 'sites' . DIRECTORY_SEPARATOR . $workspaceName . DIRECTORY_SEPARATOR . 'files');
|
||||
}
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', $workspaceName);
|
||||
if (!defined('MEMCACHED_ENABLED')) {
|
||||
define('MEMCACHED_ENABLED', $arraySystemConfiguration['memcached']);
|
||||
\G::LoadClass("configuration");
|
||||
$conf = new Configurations();
|
||||
\G::$sysSys = $workspaceName;
|
||||
\G::$pathDataSite = PATH_DATA . "sites" . PATH_SEP . \G::$sysSys . PATH_SEP;
|
||||
\G::$pathDocument = PATH_DATA . 'sites' . DIRECTORY_SEPARATOR . $workspaceName . DIRECTORY_SEPARATOR . 'files';
|
||||
\G::$memcachedEnabled = $arraySystemConfiguration['memcached'];
|
||||
\G::$pathDataPublic = \G::$pathDataSite . "public" . PATH_SEP;
|
||||
\G::$sysSkin = $conf->getConfiguration('SKIN_CRON', '');
|
||||
if (is_file(\G::$pathDataSite . PATH_SEP . ".server_info")) {
|
||||
$serverInfo = file_get_contents(\G::$pathDataSite . PATH_SEP . ".server_info");
|
||||
$serverInfo = unserialize($serverInfo);
|
||||
$envHost = $serverInfo["SERVER_NAME"];
|
||||
$envPort = ($serverInfo["SERVER_PORT"] . "" != "80") ? ":" . $serverInfo["SERVER_PORT"] : "";
|
||||
if (!empty($envPort) && strpos($envHost, $envPort) === false) {
|
||||
$envHost = $envHost . $envPort;
|
||||
}
|
||||
\G::$httpHost = $envHost;
|
||||
}
|
||||
|
||||
//Search All process
|
||||
|
||||
@@ -26,6 +26,11 @@ class WebEntry
|
||||
"userUid" => "USR_UID"
|
||||
);
|
||||
|
||||
private $httpHost;
|
||||
private $sysSkin;
|
||||
private $sysSys;
|
||||
private $pathDataPublic;
|
||||
|
||||
/**
|
||||
* Constructor of the class
|
||||
*
|
||||
@@ -33,6 +38,10 @@ class WebEntry
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->pathDataPublic = defined("PATH_DATA_PUBLIC") ? PATH_DATA_PUBLIC : \G::$pathDataPublic;
|
||||
$this->httpHost = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : \G::$httpHost;
|
||||
$this->sysSys = defined("SYS_SYS") ? SYS_SYS : \G::$sysSys;
|
||||
$this->sysSkin = defined("SYS_SKIN") ? SYS_SKIN : \G::$sysSkin;
|
||||
try {
|
||||
foreach ($this->arrayFieldDefinition as $key => $value) {
|
||||
$this->arrayFieldNameForException[$value["fieldNameAux"]] = $key;
|
||||
@@ -346,7 +355,7 @@ class WebEntry
|
||||
|
||||
$wsRoundRobin = 0; //0, 1 //0 - Cyclical Assignment
|
||||
|
||||
$pathDataPublicProcess = PATH_DATA_PUBLIC . $processUid;
|
||||
$pathDataPublicProcess = $this->pathDataPublic . $processUid;
|
||||
|
||||
//Delete previous files
|
||||
if (trim($arrayWebEntryData["WE_DATA"]) != "") {
|
||||
@@ -415,8 +424,8 @@ class WebEntry
|
||||
$template = new \TemplatePower($pluginTpl);
|
||||
$template->prepare();
|
||||
|
||||
$template->assign("wsdlUrl", $http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/services/wsdl2");
|
||||
$template->assign("wsUploadUrl", $http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/services/upload");
|
||||
$template->assign("wsdlUrl", $http . $this->httpHost . "/sys" . $this->sysSys . "/" . SYS_LANG . "/" . $this->sysSkin . "/services/wsdl2");
|
||||
$template->assign("wsUploadUrl", $http . $this->httpHost . "/sys" . $this->sysSys . "/" . SYS_LANG . "/" . $this->sysSkin . "/services/upload");
|
||||
$template->assign("processUid", $processUid);
|
||||
$template->assign("dynaformUid", $dynaFormUid);
|
||||
$template->assign("taskUid", $taskUid);
|
||||
@@ -434,7 +443,7 @@ class WebEntry
|
||||
|
||||
$template->assign("dynaform", $arrayDynaFormData["DYN_TITLE"]);
|
||||
$template->assign("timestamp", date("l jS \of F Y h:i:s A"));
|
||||
$template->assign("ws", SYS_SYS);
|
||||
$template->assign("ws", $this->sysSys);
|
||||
$template->assign("version", \System::getVersion());
|
||||
|
||||
$fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php";
|
||||
@@ -494,12 +503,12 @@ class WebEntry
|
||||
}
|
||||
|
||||
$G_FORM = new \Form($processUid . "/" . $dynaFormUid, PATH_DYNAFORM, SYS_LANG, false);
|
||||
$G_FORM->action = $http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/services/cases_StartExternal.php";
|
||||
$G_FORM->action = $http . $this->httpHost . "/sys" . $this->sysSys . "/" . SYS_LANG . "/" . $this->sysSkin . "/services/cases_StartExternal.php";
|
||||
|
||||
$scriptCode = "";
|
||||
$scriptCode = $G_FORM->render(PATH_TPL . "xmlform" . ".html", $scriptCode);
|
||||
$scriptCode = str_replace("/controls/", $http . $_SERVER["HTTP_HOST"] . "/controls/", $scriptCode);
|
||||
$scriptCode = str_replace("/js/maborak/core/images/", $http . $_SERVER["HTTP_HOST"] . "/js/maborak/core/images/", $scriptCode);
|
||||
$scriptCode = str_replace("/controls/", $http . $this->httpHost . "/controls/", $scriptCode);
|
||||
$scriptCode = str_replace("/js/maborak/core/images/", $http . $this->httpHost . "/js/maborak/core/images/", $scriptCode);
|
||||
|
||||
//Render the template
|
||||
$pluginTpl = PATH_TPL . "processes" . PATH_SEP . "webentry.tpl";
|
||||
@@ -512,10 +521,10 @@ class WebEntry
|
||||
|
||||
$template->assign("URL_MABORAK_JS", \G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
|
||||
$template->assign("URL_TRANSLATION_ENV_JS", \G::browserCacheFilesUrl("/jscore/labels/" . SYS_LANG . ".js"));
|
||||
$template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
|
||||
$template->assign("sysSys", SYS_SYS);
|
||||
$template->assign("siteUrl", $http . $this->httpHost);
|
||||
$template->assign("sysSys", $this->sysSys);
|
||||
$template->assign("sysLang", SYS_LANG);
|
||||
$template->assign("sysSkin", SYS_SKIN);
|
||||
$template->assign("sysSkin", $this->sysSkin);
|
||||
$template->assign("processUid", $processUid);
|
||||
$template->assign("dynaformUid", $dynaFormUid);
|
||||
$template->assign("taskUid", $taskUid);
|
||||
@@ -526,7 +535,7 @@ class WebEntry
|
||||
if (sizeof($sUidGrids) > 0) {
|
||||
foreach ($sUidGrids as $k => $v) {
|
||||
$template->newBlock("grid_uids");
|
||||
$template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
|
||||
$template->assign("siteUrl", $http . $this->httpHost);
|
||||
$template->assign("gridFileName", $processUid . "/" . $v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1315,9 +1315,10 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
$diagram["participants"] = $bwp->getParticipants($configList);
|
||||
$project["diagrams"][] = $diagram;
|
||||
}
|
||||
if (file_exists(PATH_DOCUMENT . $project["prj_uid"])) {
|
||||
$project["prj_bpmn_file_upload"] = file_get_contents(PATH_DOCUMENT . $project["prj_uid"]);
|
||||
unlink(PATH_DOCUMENT . $project["prj_uid"]);
|
||||
$pathDocument = defined("PATH_DOCUMENT") ? PATH_DOCUMENT : \G::$pathDocument;
|
||||
if (file_exists($pathDocument . $project["prj_uid"])) {
|
||||
$project["prj_bpmn_file_upload"] = file_get_contents($pathDocument . $project["prj_uid"]);
|
||||
unlink($pathDocument . $project["prj_uid"]);
|
||||
}
|
||||
|
||||
return $project;
|
||||
|
||||
Reference in New Issue
Block a user