HOR-4816
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
class ActionsByEmailCoreClass extends PMPlugin
|
||||
{
|
||||
@@ -131,21 +131,8 @@ class ActionsByEmailCoreClass extends PMPlugin
|
||||
$_SESSION['CURRENT_DYN_UID'] = $configuration['DYN_UID'];
|
||||
|
||||
$__ABE__ = '';
|
||||
$conf = new Configurations();
|
||||
$envSkin = defined("SYS_SKIN") ? SYS_SKIN : $conf->getConfiguration('SKIN_CRON', '');
|
||||
$envHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : SERVER_NAME;
|
||||
$envProtocol = defined("REQUEST_SCHEME") && REQUEST_SCHEME === "https";
|
||||
if (isset($_SERVER['SERVER_PORT'])) {
|
||||
$envPort = ($_SERVER['SERVER_PORT'] != "80") ? ":" . $_SERVER['SERVER_PORT'] : "";
|
||||
} else if (defined('SERVER_PORT')) {
|
||||
$envPort = (SERVER_PORT . "" != "80") ? ":" . SERVER_PORT : "";
|
||||
} else {
|
||||
$envPort = ""; // Empty by default
|
||||
}
|
||||
if (!empty($envPort) && strpos($envHost, $envPort) === false) {
|
||||
$envHost = $envHost . $envPort;
|
||||
}
|
||||
$link = (G::is_https() || $envProtocol ? 'https://' : 'http://') . $envHost . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . $envSkin . '/services/ActionsByEmail';
|
||||
|
||||
$link = System::getServerMainPath() . '/services/ActionsByEmail';
|
||||
|
||||
switch ($configuration['ABE_TYPE']) {
|
||||
case 'CUSTOM':
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
if (! defined( 'JAVA_BRIDGE_PATH' )) {
|
||||
define( 'JAVA_BRIDGE_PATH', 'JavaBridgePM' );
|
||||
}
|
||||
@@ -10,11 +12,6 @@ if (! defined( 'JAVA_BRIDGE_HOST' )) {
|
||||
define( 'JAVA_BRIDGE_HOST', '127.0.0.1' );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/
|
||||
|
||||
class JavaBridgePM
|
||||
{
|
||||
public $JavaBridgeDir = JAVA_BRIDGE_PATH;
|
||||
@@ -125,7 +122,7 @@ class JavaBridgePM
|
||||
$template->assign( 'heightDetail', count( $xmlFields ) * 15 + 20 );
|
||||
$template->assign( 'PAGE_NUMBER', '{PAGE_NUMBER}' );
|
||||
|
||||
$logoReporte = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/images/processmaker.logo.jpg';
|
||||
$logoReporte = System::getServerProtocolHost() . '/images/processmaker.logo.jpg';
|
||||
$template->assign( 'logoReporte', $logoReporte );
|
||||
|
||||
foreach ($xmlFields as $key => $val) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
class ProcessMap
|
||||
@@ -2708,13 +2709,7 @@ class ProcessMap
|
||||
global $G_FORM;
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if (G::is_https()) {
|
||||
$http = 'https://';
|
||||
} else {
|
||||
$http = 'http://';
|
||||
}
|
||||
|
||||
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sProcessUID . '/';
|
||||
$link = System::getServerMainPath() . '/' . $sProcessUID . '/';
|
||||
|
||||
$row = array();
|
||||
$c = 0;
|
||||
@@ -4725,38 +4720,22 @@ class ProcessMap
|
||||
$task->load($task_uid);
|
||||
$task_name = $task->getTasTitle();
|
||||
|
||||
if (G::is_https()) {
|
||||
$http = 'https://';
|
||||
} else {
|
||||
$http = 'http://';
|
||||
}
|
||||
|
||||
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sProcessUID . '/';
|
||||
$link = System::getServerMainPath() . '/' . $sProcessUID . '/';
|
||||
|
||||
$row = array();
|
||||
$c = 0;
|
||||
|
||||
/*
|
||||
$oTask = new Task ( );
|
||||
$TaskFields = $oTask->kgetassigType ( $sProcessUID , $tas='');
|
||||
*/
|
||||
$TaskFields['TAS_ASSIGN_TYPE'] = '';
|
||||
//$row [] = array ('W_TITLE' => '', 'W_DELETE' => '', 'TAS_ASSIGN_TYPE' => $TaskFields ['TAS_ASSIGN_TYPE'] );
|
||||
|
||||
|
||||
if (is_dir(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $sProcessUID)) {
|
||||
$dir = opendir(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $sProcessUID);
|
||||
$dynTitle = str_replace(' ', '_', str_replace('/', '_', $dynTitle));
|
||||
$arlink = $link . $dynTitle . '.php';
|
||||
//$arlink = "<a href='" . $alink . "' target='blank'><font color='#9999CC'>" . $alink . "</font></a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$row = array('W_LINK' => $arlink, 'DYN_TITLE' => $dynTitle, 'TAS_TITLE' => $task_name, 'USR_UID' => $usr_uid_evn, 'DYN_UID' => $dynUid );
|
||||
// $oJSON = new Services_JSON ( );
|
||||
// $tmpData = $oJSON->encode( $row ) ;
|
||||
// $tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
// $result = $tmpData;
|
||||
|
||||
$result = array();
|
||||
$result['success'] = true;
|
||||
$result['data'] = $row;
|
||||
|
||||
@@ -2487,7 +2487,7 @@ class WsBase
|
||||
$arrayUserData = $user->load($userId);
|
||||
|
||||
if (trim($arrayUserData["USR_EMAIL"]) == "") {
|
||||
$arrayUserData["USR_EMAIL"] = "info@" . $_SERVER["HTTP_HOST"];
|
||||
$arrayUserData["USR_EMAIL"] = "info@" . System::getDefaultMailDomain();
|
||||
}
|
||||
|
||||
$sFromName = "\"" . $arrayUserData["USR_FIRSTNAME"] . " " . $arrayUserData["USR_LASTNAME"] . "\" <" . $arrayUserData["USR_EMAIL"] . ">";
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'OUTPUT_DOCUMENT' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
class OutputDocument extends BaseOutputDocument
|
||||
{
|
||||
public function __construct()
|
||||
@@ -1160,7 +1151,7 @@ class OutputDocument extends BaseOutputDocument
|
||||
|
||||
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
try {
|
||||
$status = $pipeline->process((G::is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
|
||||
$status = $pipeline->process(System::getServerProtocolHost() . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
|
||||
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
|
||||
Reference in New Issue
Block a user