Merged in gproly/processmaker/HOR-1583 (pull request #4745)

HOR-1583
This commit is contained in:
Julio Cesar Laura Avendaño
2016-08-13 14:00:47 -04:00
3 changed files with 19 additions and 1 deletions

View File

@@ -201,6 +201,7 @@ try {
define('SERVER_NAME', $SERVER_INFO['SERVER_NAME']);
define('SERVER_PORT', $SERVER_INFO['SERVER_PORT']);
define('REQUEST_SCHEME', $SERVER_INFO['REQUEST_SCHEME']);
} else {
eprintln('WARNING! No server info found!', 'red');
}

View File

@@ -147,7 +147,15 @@ class actionsByEmailCoreClass extends PMPlugin
$scriptCode = '';
$__ABE__ = '';
$link = (G::is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/ActionsByEmail';
$conf = new Configurations();
$envSkin = $conf->getConfiguration('SKIN_CRON', '');
$envHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : SERVER_NAME;
$envProtocol = defined("REQUEST_SCHEME") && REQUEST_SCHEME === "https";
$envPort = (SERVER_PORT . "" != "80") ? ":" . SERVER_PORT : "";
if (!empty($envPort) && strpos($envHost, $envPort) === false) {
$envHost = $envHost . $envPort;
}
$link = (G::is_https() || $envProtocol ? 'https://' : 'http://') . $envHost . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . $envSkin . '/services/ActionsByEmail';
switch ($configuration['ABE_TYPE']) {
case 'CUSTOM':

View File

@@ -740,6 +740,7 @@ class workspaceTools
$this->checkRbacPermissions();//check or add new permissions
$this->checkSequenceNumber();
$this->migrateIteeToDummytask($this->name);
$this->upgradeConfiguration();
//There records in table "EMAIL_SERVER"
$criteria = new Criteria("workflow");
@@ -3243,4 +3244,12 @@ class workspaceTools
CLI::logging($message);
}
public function upgradeConfiguration()
{
G::LoadClass("configuration");
$conf = new Configurations();
$conf->aConfig = 'neoclassic';
$conf->saveConfig('SKIN_CRON', '');
}
}