Merged in release/3.3 (pull request #6641)

HOR-4897

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2018-10-09 15:01:06 +00:00
committed by Julio Cesar Laura Avendaño
11 changed files with 211 additions and 6 deletions

View File

@@ -411,6 +411,8 @@ class SpoolRun
}
break;
}
$systemConfiguration = System::getSystemConfiguration();
$oPHPMailer->Timeout = is_numeric($systemConfiguration['smtp_timeout']) ? $systemConfiguration['smtp_timeout'] : 20;
$oPHPMailer->CharSet = "UTF-8";
$oPHPMailer->Encoding = "8bit";
$oPHPMailer->Host = $this->config['MESS_SERVER'];

View File

@@ -8591,6 +8591,30 @@ msgstr "@function() It evaluates the value, then executes a PHP function"
msgid "G Suite Configuration Saved"
msgstr "G Suite Configuration Saved"
# TRANSLATION
# LABEL/ID_G_SUITE_CONNECT
#: LABEL/ID_G_SUITE_CONNECT
msgid "Request G Suite connection"
msgstr "Request G Suite connection"
# TRANSLATION
# LABEL/ID_G_SUITE_DISCONNECT
#: LABEL/ID_G_SUITE_DISCONNECT
msgid "Disconnect G Suite"
msgstr "Disconnect G Suite"
# TRANSLATION
# LABEL/ID_G_SUITE_LOAD_GROUPS
#: LABEL/ID_G_SUITE_LOAD_GROUPS
msgid "Update G Suite groups"
msgstr "Update G Suite groups"
# TRANSLATION
# LABEL/ID_G_SUITE_SYNC_USERS
#: LABEL/ID_G_SUITE_SYNC_USERS
msgid "Syncing Users"
msgstr "Syncing Users"
# TRANSLATION
# LABEL/ID_GENERAL
#: LABEL/ID_GENERAL

View File

@@ -58256,7 +58256,11 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_FULL_NAME','en','Full Name','2014-01-15') ,
( 'LABEL','ID_FULL_TEXT_SEARCH','en','Full Text Search','2014-01-15') ,
( 'LABEL','ID_FUNCTION','en','@function() It evaluates the value, then executes a PHP function','2014-01-15') ,
( 'LABEL','ID_G_SUITE_CONFIGURATION_SAVED','en','G Suite Configuration Saved','2018-09-14') ,
( 'LABEL','ID_G_SUITE_CONFIGURATION_SAVED','en','G Suite Configuration Saved','2018-09-21') ,
( 'LABEL','ID_G_SUITE_CONNECT','en','Request G Suite connection','2018-09-21') ,
( 'LABEL','ID_G_SUITE_DISCONNECT','en','Disconnect G Suite','2018-09-21') ,
( 'LABEL','ID_G_SUITE_LOAD_GROUPS','en','Update G Suite groups','2018-09-21') ,
( 'LABEL','ID_G_SUITE_SYNC_USERS','en','Syncing Users','2018-09-21') ,
( 'LABEL','ID_GENERAL','en','General','2014-01-15') ,
( 'LABEL','ID_GENERAL_PROCESS_NUMBERS','en','General Process Numbers','2014-01-15') ,
( 'LABEL','ID_GENERATE','en','Generate','2014-01-15') ,

View File

@@ -167,7 +167,12 @@ class AuditLog
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK"),
"ImportProcess" => G::LoadTranslation("ID_IMPORT_PROCESS"),
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS")
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS"),
"GSuiteConfigurationSaved" => G::LoadTranslation("ID_G_SUITE_CONFIGURATION_SAVED"),
"GSuiteConnect" => G::LoadTranslation("ID_G_SUITE_CONNECT"),
"GSuiteDisconnect" => G::LoadTranslation("ID_G_SUITE_DISCONNECT"),
"GSuiteLoadGroups" => G::LoadTranslation("ID_G_SUITE_LOAD_GROUPS"),
"GSuiteSyncUsers" => G::LoadTranslation("ID_G_SUITE_SYNC_USERS")
];
}

View File

@@ -9,6 +9,16 @@ class AppEvent
*/
const XMLFORM_RENDER = 0;
/**
* Identify login action
*/
const LOGIN = 1;
/**
* Identify scripts with no login
*/
const SCRIPTS_WITH_NO_LOGIN = 2;
/**
* Represents the AppEvent object.
*
@@ -50,7 +60,7 @@ class AppEvent
* @param object $object
* @return $this
*/
public function dispatch($type, $object)
public function dispatch($type, &$object)
{
foreach ($this->callbacks as $callback) {
$callback($type, $object, $this);

View File

@@ -63,7 +63,8 @@ class System
'disable_download_documents_session_validation' => 0,
'logs_max_files' => 60,
'logs_location' => '',
'logging_level' => 'INFO'
'logging_level' => 'INFO',
'smtp_timeout' => 20
);
/**

View File

@@ -1,6 +1,7 @@
<?php
use Illuminate\Foundation\Http\Kernel;
use ProcessMaker\Core\AppEvent;
/*----------------------------------********---------------------------------*/
use ProcessMaker\ChangeLog\ChangeLog;
/*----------------------------------********---------------------------------*/
@@ -976,6 +977,11 @@ if (!defined('EXECUTE_BY_CRON')) {
$noLoginFolders[] = 'services';
$noLoginFolders[] = 'tracker';
$noLoginFolders[] = 'InstallerModule';
$data = new stdClass();
$data->noLoginFiles = &$noLoginFiles;
$data->noLoginFolders = &$noLoginFolders;
AppEvent::getAppEvent()->dispatch(AppEvent::SCRIPTS_WITH_NO_LOGIN, $data);
// This sentence is used when you lost the Session
if (!in_array(SYS_TARGET, $noLoginFiles) && !in_array(SYS_COLLECTION,
@@ -1024,7 +1030,9 @@ if (!defined('EXECUTE_BY_CRON')) {
}
if (empty($_POST)) {
header('location: ' . SYS_URI . $loginUrl . '?u=' . urlencode($_SERVER['REQUEST_URI']));
$headerString = 'location: ' . SYS_URI . $loginUrl . '?u=' . urlencode($_SERVER['REQUEST_URI']);
AppEvent::getAppEvent()->dispatch(AppEvent::LOGIN, $headerString);
header($headerString);
} else {
if ($isControllerCall) {
header("HTTP/1.0 302 session lost in controller");