Merged in release/3.2 (pull request #5423)
Release/3.2 Approved-by: Paula Quispe
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,7 +20,6 @@ workflow/public_html/index.html
|
||||
.DS_Store
|
||||
.idea
|
||||
composer.phar
|
||||
composer.lock
|
||||
vendor/
|
||||
workflow/engine/config/schema-transformed.xml
|
||||
workflow/engine/config/_databases_.php
|
||||
|
||||
95
Jenkinsfile
vendored
Normal file
95
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
#!groovy
|
||||
node {
|
||||
/**
|
||||
* Branch should be in gitflow format. If not, then we'll abort.
|
||||
*/
|
||||
if(!env.BRANCH_NAME.matches(/(feature|hotfix|bugfix|release)\/.+/) && !env.BRANCH_NAME.matches(/^PR-.*$/)) {
|
||||
hipchatSend message: "${env.BRANCH_NAME} Build: Does not match gitflow naming. Aborted", room: 'engineering'
|
||||
error "Job does not follow gitflow naming format."
|
||||
}
|
||||
// Parse out our short name and potential jira ticket. Null if not associated. If null, then for now we won't notify
|
||||
// on jira ticket
|
||||
def jiraTicket = env.BRANCH_NAME.find(/HOR-\d+/)
|
||||
|
||||
def shortname = env.BRANCH_NAME.replace('/', '-').replace('.', '-').toLowerCase()
|
||||
def dbSuffix = shortname.replace('-', '')
|
||||
|
||||
echo "Building for ${env.BRANCH_NAME}"
|
||||
|
||||
// Checkout source
|
||||
checkout scm
|
||||
|
||||
try {
|
||||
stage('Start Notification') {
|
||||
if(jiraTicket) {
|
||||
jiraComment issueKey: jiraTicket, body: "Build ${env.BUILD_NUMBER} Starting.\nTicket will be updated once build is completed.\n\n${env.BUILD_URL}"
|
||||
}
|
||||
hipchatSend message: "${env.BRANCH_NAME} Build: ${env.BUILD_NUMBER} Starting.\n${env.BUILD_URL}", room: 'engineering'
|
||||
}
|
||||
|
||||
stage('Dependencies') {
|
||||
echo "Running Composer"
|
||||
sh 'composer install'
|
||||
echo "Running rake"
|
||||
sh 'rake'
|
||||
}
|
||||
|
||||
stage('Generate QA MySQL Databases') {
|
||||
withCredentials([string(credentialsId: 'qa-rds-hostname', variable: 'rdsHostname'), usernamePassword(credentialsId: 'qa-rds-credentials', passwordVariable: 'rdsPassword', usernameVariable: 'rdsUsername')]) {
|
||||
echo 'Dropping existing database and recreating.'
|
||||
sh "mysql -h ${rdsHostname} -u ${rdsUsername} -p${rdsPassword} -e 'drop database if exists qa205${dbSuffix}; create database qa205${dbSuffix}'"
|
||||
sh "mysql -h ${rdsHostname} -u ${rdsUsername} -p${rdsPassword} -e 'drop database if exists qa300${dbSuffix}; create database qa300${dbSuffix}'"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish to QA-205') {
|
||||
sshagent(['processmaker-deploy']) {
|
||||
echo 'Dropping existing files and recreating'
|
||||
sh "ssh processmaker@build-qa205.processmaker.net 'rm -Rf /home/processmaker/${shortname}'"
|
||||
sh "scp -r ./ processmaker@build-qa205.processmaker.net:~/${shortname}"
|
||||
echo 'Creating necessary directories'
|
||||
sh "ssh processmaker@build-qa205.processmaker.net 'mkdir -p /home/processmaker/${shortname}/workflow/engine/js/labels'"
|
||||
sh "ssh processmaker@build-qa205.processmaker.net 'mkdir -p /home/processmaker/${shortname}/workflow/public_html/translations'"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish to QA-300') {
|
||||
sshagent(['processmaker-deploy']) {
|
||||
echo 'Dropping existing files and recreating'
|
||||
sh "ssh processmaker@build-qa300.processmaker.net 'rm -Rf /home/processmaker/${shortname}'"
|
||||
sh "scp -r ./ processmaker@build-qa300.processmaker.net:~/${shortname}"
|
||||
echo 'Creating necessary directories'
|
||||
sh "ssh processmaker@build-qa300.processmaker.net 'mkdir -p /home/processmaker/${shortname}/workflow/engine/js/labels'"
|
||||
sh "ssh processmaker@build-qa300.processmaker.net 'mkdir -p /home/processmaker/${shortname}/workflow/public_html/translations'"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Success Notification') {
|
||||
withCredentials([string(credentialsId: 'qa-rds-hostname', variable: 'rdsHostname'), usernamePassword(credentialsId: 'qa-rds-credentials', passwordVariable: 'rdsPassword', usernameVariable: 'rdsUsername')]) {
|
||||
if(jiraTicket) {
|
||||
jiraComment issueKey: jiraTicket, body: "" +
|
||||
"Build ${env.BUILD_NUMBER} Completed.\n" +
|
||||
"5.6 Build: https://${shortname}.qa205.processmaker.net\n" +
|
||||
"Database Host: ${rdsHostname}\n" +
|
||||
"Username: ${rdsUsername}\n" +
|
||||
"Password: ${rdsPassword}\n" +
|
||||
"Database: qa205${dbSuffix}\n\n" +
|
||||
"7.0 Build: https://${shortname}.qa300.processmaker.net\n" +
|
||||
"Database Host: ${rdsHostname}\n" +
|
||||
"Username: ${rdsUsername}\n" +
|
||||
"Password: ${rdsPassword}\n" +
|
||||
"Database: qa300${dbSuffix}\n\n" +
|
||||
"${env.BUILD_URL}"
|
||||
}
|
||||
hipchatSend room: 'engineering', message: "" +
|
||||
"${env.BRANCH_NAME} Build: ${env.BUILD_NUMBER} Completed.\n" +
|
||||
"${env.BUILD_URL}"
|
||||
}
|
||||
}
|
||||
} catch(error) {
|
||||
if(jiraTicket) {
|
||||
jiraComment issueKey: jiraTicket, body: "Build ${env.BUILD_NUMBER} Failed: ${error}\n\n${env.BUILD_URL}"
|
||||
}
|
||||
hipchatSend message: "${env.BRANCH_NAME} Build: ${env.BUILD_NUMBER} Failed: ${error}\n${env.BUILD_URL}", room: 'engineering'
|
||||
}
|
||||
}
|
||||
194
composer.lock
generated
194
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -533,6 +533,7 @@ class WebApplication
|
||||
define("PATH_DYNAFORM", PATH_DATA_SITE . "xmlForms/");
|
||||
define("PATH_IMAGES_ENVIRONMENT_FILES", PATH_DATA_SITE . "usersFiles" . PATH_SEP);
|
||||
define("PATH_IMAGES_ENVIRONMENT_USERS", PATH_DATA_SITE . "usersPhotographies" . PATH_SEP);
|
||||
define('DISABLE_PHP_UPLOAD_EXECUTION', $arraySystemConfiguration['disable_php_upload_execution']);
|
||||
|
||||
/**
|
||||
* Global definitions, before it was the defines.php file
|
||||
|
||||
@@ -2964,5 +2964,40 @@ class Bootstrap
|
||||
);
|
||||
return $aContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* get DISABLE_PHP_UPLOAD_EXECUTION value defined in env.ini
|
||||
* @return int
|
||||
*/
|
||||
public static function getDisablePhpUploadExecution()
|
||||
{
|
||||
$disablePhpUploadExecution = 0;
|
||||
if (defined("DISABLE_PHP_UPLOAD_EXECUTION")) {
|
||||
$disablePhpUploadExecution = (int) DISABLE_PHP_UPLOAD_EXECUTION;
|
||||
}
|
||||
return $disablePhpUploadExecution;
|
||||
}
|
||||
|
||||
/**
|
||||
* Record the action of executing a php file or attempting to upload a php
|
||||
* file in server.
|
||||
* @param type $channel
|
||||
* @param type $level
|
||||
* @param type $message
|
||||
* @param type $fileName
|
||||
*/
|
||||
public static function registerMonologPhpUploadExecution($channel, $level, $message, $fileName)
|
||||
{
|
||||
$context = \Bootstrap::getDefaultContextLog();
|
||||
$context['action'] = $channel;
|
||||
$context['filename'] = $fileName;
|
||||
if (defined("SYS_CURRENT_URI") && defined("SYS_CURRENT_PARMS")) {
|
||||
$context['url'] = SYS_CURRENT_URI . '?' . SYS_CURRENT_PARMS;
|
||||
}
|
||||
$context['usrUid'] = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '';
|
||||
$sysSys = defined("SYS_SYS") ? SYS_SYS : "Undefined";
|
||||
\Bootstrap::registerMonolog($channel, $level, $message, $context, $sysSys, 'processmaker.log');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -45,19 +45,16 @@ class G
|
||||
|
||||
/**
|
||||
* is_https
|
||||
* @return void
|
||||
*/
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_https()
|
||||
{
|
||||
if (isset($_SERVER['HTTPS'])) {
|
||||
if ($_SERVER['HTTPS']=='on') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
$is_http = false;
|
||||
if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ||
|
||||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
|
||||
$is_http = true;
|
||||
}
|
||||
return $is_http;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1232,8 +1229,10 @@ class G
|
||||
case 'txt':
|
||||
G::sendHeaders( $filename, 'text/html', $download, $downloadFileName );
|
||||
break;
|
||||
case 'doc':
|
||||
case 'pdf':
|
||||
G::sendHeaders( $filename, 'application/pdf', $download, $downloadFileName );
|
||||
break;
|
||||
case 'doc':
|
||||
case 'pm':
|
||||
case 'po':
|
||||
G::sendHeaders( $filename, 'application/octet-stream', $download, $downloadFileName );
|
||||
@@ -1242,7 +1241,14 @@ class G
|
||||
if ($download) {
|
||||
G::sendHeaders( $filename, 'text/plain', $download, $downloadFileName );
|
||||
} else {
|
||||
require_once ($filename);
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 0) {
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpExecution', 200, 'Php Execution', $filename);
|
||||
require_once ($filename);
|
||||
} else {
|
||||
$message = G::LoadTranslation('THE_PHP_FILES_EXECUTION_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpExecution', 550, $message, $filename);
|
||||
echo $message;
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -1283,12 +1289,14 @@ class G
|
||||
{
|
||||
if ($download) {
|
||||
if ($downloadFileName == '') {
|
||||
$aAux = explode( '/', $filename );
|
||||
$downloadFileName = $aAux[count( $aAux ) - 1];
|
||||
$aAux = explode('/', $filename);
|
||||
$downloadFileName = $aAux[count($aAux) - 1];
|
||||
}
|
||||
header( 'Content-Disposition: attachment; filename="' . $downloadFileName . '"' );
|
||||
header('Content-Disposition: attachment; filename="' . $downloadFileName . '"');
|
||||
} else {
|
||||
header('Content-Disposition: inline; filename="' . $downloadFileName . '"');
|
||||
}
|
||||
header( 'Content-Type: ' . $contentType );
|
||||
header('Content-Type: ' . $contentType);
|
||||
|
||||
//if userAgent (BROWSER) is MSIE we need special headers to avoid MSIE behaivor.
|
||||
$userAgent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
|
||||
@@ -5538,16 +5546,24 @@ class G
|
||||
$res->status = false;
|
||||
$allowedTypes = array_map('G::getRealExtension', explode(',', $InpDocAllowedFiles));
|
||||
|
||||
// Get the file extension
|
||||
$aux = pathinfo($fileName);
|
||||
$fileExtension = isset($aux['extension']) ? strtolower($aux['extension']) : '';
|
||||
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $fileExtension === 'php') {
|
||||
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $fileName);
|
||||
$res->status = false;
|
||||
$res->message = $message;
|
||||
return $res;
|
||||
}
|
||||
|
||||
// If required extension is *.* don't validate
|
||||
if (in_array('*', $allowedTypes)) {
|
||||
$res->status = true;
|
||||
return $res;
|
||||
}
|
||||
|
||||
// Get the file extension
|
||||
$aux = pathinfo($fileName);
|
||||
$fileExtension = isset($aux['extension']) ? strtolower($aux['extension']) : '';
|
||||
|
||||
// If no valid extension finish (unnecesary check file content)
|
||||
$validExtension = in_array($fileExtension, $allowedTypes);
|
||||
if (!$validExtension) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<Directory /example/path/to/processmaker/workflow/public_html>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
|
||||
@@ -4433,6 +4433,11 @@ class Cases
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->getExecuteTriggerProcess($sApplicationUID, 'REASSIGNED');
|
||||
|
||||
//Delete record of the table LIST_UNASSIGNED
|
||||
$unassigned = new ListUnassigned();
|
||||
$unassigned->remove($sApplicationUID, $iDelegation);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5225,7 +5230,7 @@ class Cases
|
||||
$dataLastEmail['configuration'] = $aConfiguration;
|
||||
$dataLastEmail['subject'] = $sSubject;
|
||||
$dataLastEmail['pathEmail'] = $pathEmail;
|
||||
$dataLastEmail['swtplDeafault'] = $swtplDefault;
|
||||
$dataLastEmail['swtplDefault'] = $swtplDefault;
|
||||
$dataLastEmail['body'] = $sBody;
|
||||
$dataLastEmail['from'] = $from;
|
||||
break;
|
||||
@@ -5293,7 +5298,7 @@ class Cases
|
||||
$dataLastEmail['configuration'] = $aConfiguration;
|
||||
$dataLastEmail['subject'] = $sSubject;
|
||||
$dataLastEmail['pathEmail'] = $pathEmail;
|
||||
$dataLastEmail['swtplDeafault'] = $swtplDefault;
|
||||
$dataLastEmail['swtplDefault'] = $swtplDefault;
|
||||
$dataLastEmail['body'] = $sBody;
|
||||
$dataLastEmail['from'] = $from;
|
||||
break;
|
||||
|
||||
@@ -1211,6 +1211,19 @@ class Derivation
|
||||
$this->case->closeAppThread( $currentDelegation['APP_UID'], $iAppThreadIndex );
|
||||
break;
|
||||
default:
|
||||
if ($nextDel['ROU_PREVIOUS_TYPE'] == 'SEC-JOIN') {
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->clearSelectColumns();
|
||||
$criteria->addSelectColumn(AppThreadPeer::APP_THREAD_PARENT);
|
||||
$criteria->add(AppThreadPeer::APP_UID, $appFields['APP_UID']);
|
||||
$criteria->add(AppThreadPeer::APP_THREAD_STATUS, 'OPEN');
|
||||
$criteria->add(AppThreadPeer::APP_THREAD_INDEX, $iAppThreadIndex);
|
||||
$rsCriteria = AppThreadPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
if ($rsCriteria->next()) {
|
||||
$this->case->closeAppThread($currentDelegation['APP_UID'], $iAppThreadIndex);
|
||||
}
|
||||
}
|
||||
if ($currentDelegation['TAS_ASSIGN_TYPE'] == 'STATIC_MI' || $currentDelegation['TAS_ASSIGN_TYPE'] == 'CANCEL_MI') {
|
||||
$this->case->closeAppThread( $currentDelegation['APP_UID'], $iAppThreadIndex );
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class pmDynaform
|
||||
private $context = array();
|
||||
private $dataSources = null;
|
||||
private $databaseProviders = null;
|
||||
private $propertiesToExclude = array();
|
||||
|
||||
public function __construct($fields = array())
|
||||
{
|
||||
@@ -37,6 +38,7 @@ class pmDynaform
|
||||
$this->serverConf = &serverConf::getSingleton();
|
||||
$this->isRTL = ($this->serverConf->isRtl(SYS_LANG)) ? 'true' : 'false';
|
||||
$this->fields = $fields;
|
||||
$this->propertiesToExclude = array('dataVariable');
|
||||
$this->getDynaform();
|
||||
$this->getDynaforms();
|
||||
$this->synchronizeSubDynaform();
|
||||
@@ -196,11 +198,13 @@ class pmDynaform
|
||||
if (is_string($value) && in_array(substr($value, 0, 2), $prefixs)) {
|
||||
$triggerValue = substr($value, 2);
|
||||
if (isset($this->fields["APP_DATA"][$triggerValue])) {
|
||||
if ($key !== "dataVariable") {
|
||||
if (!in_array($key, $this->propertiesToExclude)) {
|
||||
$json->{$key} = $this->fields["APP_DATA"][$triggerValue];
|
||||
}
|
||||
} else {
|
||||
$json->{$key} = "";
|
||||
if (!in_array($key, $this->propertiesToExclude)) {
|
||||
$json->{$key} = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
//set properties from 'formInstance' variable
|
||||
@@ -1909,6 +1913,12 @@ class pmDynaform
|
||||
if ($validatorClass !== null) {
|
||||
$validatorClass->validatePost($post);
|
||||
}
|
||||
//Clears the data in the appData for grids
|
||||
if (array_key_exists($json->id, $this->fields) && $json->type === 'grid' &&
|
||||
!array_key_exists($json->id, $post)
|
||||
) {
|
||||
$post[$json->variable] = array(array());
|
||||
}
|
||||
}
|
||||
};
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
|
||||
@@ -527,13 +527,27 @@ function WSLogin ($user, $pass, $endpoint = "")
|
||||
function WSOpen ($force = false)
|
||||
{
|
||||
if (isset( $_SESSION["WS_SESSION_ID"] ) || $force) {
|
||||
$optionsHeaders = array(
|
||||
"cache_wsdl" => WSDL_CACHE_NONE,
|
||||
"soap_version" => SOAP_1_1,
|
||||
"trace" => 1,
|
||||
"stream_context" => stream_context_create(
|
||||
array(
|
||||
'ssl' => array(
|
||||
'verify_peer' => 0,
|
||||
'verify_peer_name' => 0
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if (! isset( $_SESSION["WS_END_POINT"] )) {
|
||||
$defaultEndpoint = "http://" . $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . "/sys" . SYS_SYS . "/en/classic/services/wsdl2";
|
||||
$defaultEndpoint = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . "/sys" . SYS_SYS . "/en/classic/services/wsdl2";
|
||||
}
|
||||
|
||||
$endpoint = isset( $_SESSION["WS_END_POINT"] ) ? $_SESSION["WS_END_POINT"] : $defaultEndpoint;
|
||||
|
||||
$client = new SoapClient( $endpoint );
|
||||
$client = new SoapClient( $endpoint, $optionsHeaders);
|
||||
|
||||
return $client;
|
||||
} else {
|
||||
|
||||
@@ -78,7 +78,8 @@ class System
|
||||
'leave_case_warning' => 0,
|
||||
'server_hostname_requests_frontend' => '',
|
||||
'load_headers_ie' => 0,
|
||||
'redirect_to_mobile' => 0
|
||||
'redirect_to_mobile' => 0,
|
||||
'disable_php_upload_execution' => 0
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -442,6 +442,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
//Get Task properties
|
||||
$task = TaskPeer::retrieveByPK( $this->getTasUid() );
|
||||
|
||||
$aData = array();
|
||||
$aData['TAS_UID'] = $this->getTasUid();
|
||||
//Added to allow User defined Timing Control at Run time from Derivation screen
|
||||
if (isset( $sNextTasParam['NEXT_TASK']['TAS_TRANSFER_HIDDEN_FLY'] ) && $sNextTasParam['NEXT_TASK']['TAS_TRANSFER_HIDDEN_FLY'] == 'true') {
|
||||
@@ -471,7 +472,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
//Calendar - Use the dates class to calculate dates
|
||||
$calendar = new calendar();
|
||||
|
||||
$arrayCalendarData = array();
|
||||
$arrayCalendarData = $calendar->getCalendarData($aCalendarUID);
|
||||
|
||||
if ($calendar->pmCalendarUid == "") {
|
||||
$calendar->getCalendar(null, $this->getProUid(), $this->getTasUid());
|
||||
@@ -480,11 +481,11 @@ class AppDelegation extends BaseAppDelegation
|
||||
}
|
||||
|
||||
//Due date
|
||||
/*$iDueDate = $calendar->calculateDate( $this->getDelDelegateDate(), $aData['TAS_DURATION'], $aData['TAS_TIMEUNIT'] //hours or days, ( we only accept this two types or maybe weeks
|
||||
);*/
|
||||
$dueDate = $calendar->dashCalculateDate($this->getDelDelegateDate(), $aData["TAS_DURATION"], $aData["TAS_TIMEUNIT"], $arrayCalendarData);
|
||||
$initDate = $this->getDelDelegateDate();
|
||||
$timeZone = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($initDate);
|
||||
$dueDate = $calendar->dashCalculateDate($timeZone, $aData["TAS_DURATION"], $aData["TAS_TIMEUNIT"], $arrayCalendarData);
|
||||
|
||||
//Return
|
||||
$dueDate = \ProcessMaker\Util\DateTime::convertDataToUtc($dueDate);
|
||||
return $dueDate;
|
||||
}
|
||||
|
||||
|
||||
@@ -27419,6 +27419,18 @@ msgstr "External Registration"
|
||||
msgid "Filter By"
|
||||
msgstr "Filter By"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED
|
||||
#: LABEL/THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED
|
||||
msgid "The upload of PHP files was disabled please contact the system administrator."
|
||||
msgstr "The upload of PHP files was disabled please contact the system administrator."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/THE_PHP_FILES_EXECUTION_WAS_DISABLED
|
||||
#: LABEL/THE_PHP_FILES_EXECUTION_WAS_DISABLED
|
||||
msgid "The PHP files execution was disabled please contact the system administrator."
|
||||
msgstr "The PHP files execution was disabled please contact the system administrator."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_cae0206c31eaa305dd0e847330c5e837
|
||||
#: LABEL/ID_MAFE_cae0206c31eaa305dd0e847330c5e837
|
||||
|
||||
@@ -1534,6 +1534,18 @@ function uploadExternalDocument()
|
||||
|
||||
//Read. Instance Document classes
|
||||
if (!empty($quequeUpload)) {
|
||||
foreach ($quequeUpload as $key => $fileObj) {
|
||||
$extension = pathinfo($fileObj['fileName'], PATHINFO_EXTENSION);
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $extension === 'php') {
|
||||
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $fileObj['fileName']);
|
||||
$response['error'] = $message;
|
||||
$response['message'] = $message;
|
||||
$response['success'] = false;
|
||||
print_r(G::json_encode($response));
|
||||
exit();
|
||||
}
|
||||
}
|
||||
$docUid=$_POST['docUid'];
|
||||
$appDocUid=isset($_POST['APP_DOC_UID'])?$_POST['APP_DOC_UID']:"";
|
||||
$docVersion=isset($_POST['docVersion'])?$_POST['docVersion']:"";
|
||||
|
||||
@@ -64,6 +64,30 @@ if ($actionAjax == "userValues") {
|
||||
$users = filterUserListArray($users, $query);
|
||||
//now get users, just for the Search action
|
||||
switch ($action) {
|
||||
case 'to_reassign':
|
||||
$cUsers = $oAppCache->getToReassignListCriteria(null);
|
||||
$cUsers->addSelectColumn(AppCacheViewPeer::USR_UID);
|
||||
|
||||
if (g::MySQLSintaxis()) {
|
||||
$cUsers->addGroupByColumn(AppCacheViewPeer::USR_UID);
|
||||
}
|
||||
|
||||
if (!is_null($query)) {
|
||||
$filters = $cUsers->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%' . $query . '%', Criteria::LIKE)->addOr(
|
||||
$cUsers->getNewCriterion(UsersPeer::USR_LASTNAME, '%' . $query . '%', Criteria::LIKE)->addOr(
|
||||
$cUsers->getNewCriterion(UsersPeer::USR_USERNAME, '%' . $query . '%', Criteria::LIKE)));
|
||||
$cUsers->addAnd($filters);
|
||||
}
|
||||
$cUsers->setLimit(20);
|
||||
$cUsers->addAscendingOrderByColumn(AppCacheViewPeer::APP_CURRENT_USER);
|
||||
$oDataset = AppCacheViewPeer::doSelectRS($cUsers, Propel::getDbConnection('workflow_ro'));
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$users[] = array("USR_UID" => $aRow['USR_UID'], "USR_FULLNAME" => $aRow['APP_CURRENT_USER']);
|
||||
$oDataset->next();
|
||||
}
|
||||
break;
|
||||
case 'search_simple':
|
||||
case 'search':
|
||||
G::LoadClass("configuration");
|
||||
|
||||
@@ -9,9 +9,6 @@ switch ($action) {
|
||||
case 'getAllCounters':
|
||||
getAllCounters();
|
||||
break;
|
||||
case 'getProcess':
|
||||
getProcess();
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'getAllCountersEnterprise':
|
||||
getAllCountersEnterprise();
|
||||
@@ -218,64 +215,6 @@ function getLoadTreeMenuData ()
|
||||
print $xml;*/
|
||||
}
|
||||
|
||||
// get the process summary of specific case list type,
|
||||
function getProcess ()
|
||||
{
|
||||
global $G_TMP_MENU;
|
||||
global $userId;
|
||||
if (! isset( $_GET['item'] )) {
|
||||
die();
|
||||
}
|
||||
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load( 'cases' );
|
||||
$type = $_GET['item'];
|
||||
$oCases = new AppCacheView();
|
||||
|
||||
$aTypesID = array ();
|
||||
$aTypesID['CASES_INBOX'] = 'to_do';
|
||||
$aTypesID['CASES_DRAFT'] = 'draft';
|
||||
$aTypesID['CASES_CANCELLED'] = 'cancelled';
|
||||
$aTypesID['CASES_SENT'] = 'sent';
|
||||
$aTypesID['CASES_PAUSED'] = 'paused';
|
||||
$aTypesID['CASES_COMPLETED'] = 'completed';
|
||||
$aTypesID['CASES_SELFSERVICE'] = 'selfservice';
|
||||
//$aTypesID['CASES_TO_REVISE'] = 'to_revise';
|
||||
//$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign';
|
||||
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign');
|
||||
|
||||
$aCount = $oCases->getAllCounters( Array ($aTypesID[$type]
|
||||
), $userId, true );
|
||||
|
||||
$response = Array ();
|
||||
//disabling the summary...
|
||||
/*
|
||||
$i=0;
|
||||
foreach($aCount[$aTypesID[$type]]['sumary'] as $PRO_UID=>$process){
|
||||
//{"text":"state","id":"src\/state","cls":"folder", loaded:true},
|
||||
$response[$i] = new stdClass();
|
||||
$response[$i]->text = $process['name'] . ' ('.$process['count'].')';
|
||||
$response[$i]->id = $process['name'];
|
||||
$response[$i]->cls = 'folder';
|
||||
$response[$i]->loaded = true;
|
||||
$i++;
|
||||
}
|
||||
*/
|
||||
//ordering
|
||||
/*for($i=0; $i<=count($response)-1; $i++){
|
||||
for($j=$i+1; $j<=count($response); $j++){
|
||||
|
||||
echo $response[$j]->text .'<'. $response[$i]->text;
|
||||
if($response[$j]->text[0] < $response[$i]->text[0]){
|
||||
$x = $response[$i];
|
||||
$response[$i] = $response[$j];
|
||||
$response[$j] = $x;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
echo G::json_encode( $response );
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function getAllCountersEnterprise()
|
||||
{
|
||||
|
||||
@@ -1019,20 +1019,23 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
|
||||
if (is_array( $aApplication )) {
|
||||
$response['exists'] = true;
|
||||
$objCase = new \ProcessMaker\BusinessModel\Cases();
|
||||
$aUserCanAccess = $objCase->userAuthorization(
|
||||
$_SESSION['USER_LOGGED'],
|
||||
$aApplication['PRO_UID'],
|
||||
$aApplication['APP_UID'],
|
||||
array('PM_ALLCASES'),
|
||||
array('SUMMARY_FORM'=>'VIEW')
|
||||
);
|
||||
|
||||
//Check if the user is a supervisor to this Process
|
||||
if(isset($_POST['actionFromList']) && $_POST['actionFromList']==='to_revise'){
|
||||
$oAppCache = new AppCacheView();
|
||||
$aProcesses = $oAppCache->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
if(!in_array($aApplication['PRO_UID'], $aProcesses)){
|
||||
if (isset($_POST['actionFromList']) && $_POST['actionFromList']==='to_revise') {
|
||||
if (!$aUserCanAccess['supervisor']) {
|
||||
$response['exists'] = false;
|
||||
$response['message'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
|
||||
}
|
||||
} else {//Check if the user participated in this case
|
||||
$oParticipated = new ListParticipatedLast();
|
||||
$aParticipated = $oParticipated->loadList($_SESSION['USER_LOGGED'], array(), null, $aApplication['APP_UID']);
|
||||
if(!sizeof($aParticipated)){
|
||||
//Check in the selfservice list
|
||||
if (!$aUserCanAccess['participated'] && !$aUserCanAccess['rolesPermissions']['PM_ALLCASES'] && !$aUserCanAccess['objectPermissions']['SUMMARY_FORM']) {
|
||||
$response['exists'] = false;
|
||||
$response['message'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
|
||||
}
|
||||
|
||||
@@ -49,20 +49,34 @@ $G_ID_SUB_MENU_SELECTED = '_';
|
||||
|
||||
/* Prepare page before to show */
|
||||
$oCase = new Cases();
|
||||
//$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
|
||||
//Check the authorization
|
||||
$objCase = new \ProcessMaker\BusinessModel\Cases();
|
||||
$aUserCanAccess = $objCase->userAuthorization(
|
||||
$_SESSION['USER_LOGGED'],
|
||||
$_SESSION['PROCESS'],
|
||||
$_GET['APP_UID'],
|
||||
array('PM_ALLCASES'),
|
||||
array('SUMMARY_FORM' => 'VIEW')
|
||||
);
|
||||
|
||||
if (isset($_SESSION['ACTION']) && ($_SESSION['ACTION'] == 'jump')) {
|
||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['ACTION']);
|
||||
$process = new Process();
|
||||
$processData = $process->load($Fields['PRO_UID']);
|
||||
if (isset($processData['PRO_DYNAFORMS']['PROCESS']) && $processData['PRO_DYNAFORMS']['PROCESS'] != '' &&
|
||||
$aUserCanAccess['objectPermissions']['SUMMARY_FORM']
|
||||
) {
|
||||
$_REQUEST['APP_UID'] = $Fields['APP_UID'];
|
||||
$_REQUEST['DEL_INDEX'] = $Fields['DEL_INDEX'];
|
||||
$_REQUEST['DYN_UID'] = $processData['PRO_DYNAFORMS']['PROCESS'];
|
||||
require_once(PATH_METHODS . 'cases' . PATH_SEP . 'summary.php');
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX']);
|
||||
}
|
||||
|
||||
//Check the participated
|
||||
$participated = $oCase->userParticipatedInCase( $_GET['APP_UID'], $_SESSION['USER_LOGGED'] );
|
||||
//Check if is Supervisor
|
||||
$processUser = new ProcessUser();
|
||||
$userAccess = $processUser->validateUserAccess($Fields['PRO_UID'], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && !$participated && !$userAccess) {
|
||||
if (!$aUserCanAccess['participated'] && !$aUserCanAccess['supervisor'] && !$aUserCanAccess['rolesPermissions']['PM_ALLCASES'] && !$aUserCanAccess['objectPermissions']['SUMMARY_FORM']) {
|
||||
$aMessage['MESSAGE'] = G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' );
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
@@ -133,36 +147,30 @@ if ($nTasksInParallel > 1) {
|
||||
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
|
||||
|
||||
$objUser = new Users();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
|
||||
if($Fields['APP_STATUS'] != 'COMPLETED'){
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task_Title.xml', '', $Fields, '' );
|
||||
$objDel = new AppDelegation();
|
||||
$parallel = $objDel->LoadParallel ($Fields['APP_UID'],$_GET['DEL_INDEX']);
|
||||
$FieldsPar = $Fields;
|
||||
if(empty($parallel)){
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $Fields, '' );
|
||||
}else{
|
||||
foreach($parallel as $row){
|
||||
$FieldsPar['TAS_UID'] = $row['TAS_UID'];
|
||||
$aTask = $objTask->load( $row['TAS_UID'] );
|
||||
$FieldsPar['TAS_TITLE'] = $aTask['TAS_TITLE'];
|
||||
$FieldsPar['USR_UID'] = $row['USR_UID'];
|
||||
if(isset($row['USR_UID']) && !empty($row['USR_UID'])) {
|
||||
$aUser = $objUser->loadDetails ($row['USR_UID']);
|
||||
$FieldsPar['CURRENT_USER'] = $aUser['USR_FULLNAME'];
|
||||
}
|
||||
$FieldsPar['DEL_DELEGATE_DATE'] = $row['DEL_DELEGATE_DATE'];
|
||||
$FieldsPar['DEL_INIT_DATE'] = $row['DEL_INIT_DATE'];
|
||||
$FieldsPar['DEL_TASK_DUE_DATE'] = $row['DEL_TASK_DUE_DATE'];
|
||||
$FieldsPar['DEL_FINISH_DATE'] = $row['DEL_FINISH_DATE'];
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $FieldsPar, '' );
|
||||
if ($Fields['APP_STATUS'] != 'COMPLETED') {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task_Title.xml', '', $Fields, '' );
|
||||
$objDel = new AppDelegation();
|
||||
$parallel = $objDel->LoadParallel($Fields['APP_UID']);
|
||||
$FieldsPar = $Fields;
|
||||
foreach ($parallel as $row) {
|
||||
$FieldsPar['TAS_UID'] = $row['TAS_UID'];
|
||||
$aTask = $objTask->load( $row['TAS_UID'] );
|
||||
$FieldsPar['TAS_TITLE'] = $aTask['TAS_TITLE'];
|
||||
$FieldsPar['USR_UID'] = $row['USR_UID'];
|
||||
if (isset($row['USR_UID']) && !empty($row['USR_UID'])) {
|
||||
$aUser = $objUser->loadDetails ($row['USR_UID']);
|
||||
$FieldsPar['CURRENT_USER'] = $aUser['USR_FULLNAME'];
|
||||
}
|
||||
$FieldsPar['DEL_DELEGATE_DATE'] = $row['DEL_DELEGATE_DATE'];
|
||||
$FieldsPar['DEL_INIT_DATE'] = $row['DEL_INIT_DATE'];
|
||||
$FieldsPar['DEL_TASK_DUE_DATE'] = $row['DEL_TASK_DUE_DATE'];
|
||||
$FieldsPar['DEL_FINISH_DATE'] = $row['DEL_FINISH_DATE'];
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $FieldsPar);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G::RenderPage('publish', 'blank');
|
||||
|
||||
@@ -1009,7 +1009,7 @@ try {
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TRANSFER_HIDDEN_FLY'] = "<input type=hidden name='" . $hiddenName . "[NEXT_TASK][TAS_TRANSFER_HIDDEN_FLY]' id='" . $hiddenName . "[NEXT_TASK][TAS_TRANSFER_HIDDEN_FLY]' value=" . $aValues['NEXT_TASK']['TAS_TRANSFER_FLY'] . ">";
|
||||
if ($aValues['NEXT_TASK']['TAS_TRANSFER_FLY'] == 'true') {
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_DURATION'] = '<input type="text" size="5" name="' . $hiddenName . '[NEXT_TASK][TAS_DURATION]" id="' . $hiddenName . '[NEXT_TASK][TAS_DURATION]" value="' . $aValues['NEXT_TASK']['TAS_DURATION'] . '">';
|
||||
$hoursSelected = $daysSelected = '';
|
||||
$hoursSelected = $daysSelected = $minSelected = '';
|
||||
if ($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TIMEUNIT'] == 'HOURS') {
|
||||
$hoursSelected = "selected = 'selected'";
|
||||
} else {
|
||||
|
||||
@@ -10,9 +10,6 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET);
|
||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
||||
|
||||
try {
|
||||
$userUid = $_SESSION['USER_LOGGED'];
|
||||
@@ -162,7 +159,7 @@ try {
|
||||
$record["APP_UPDATE_DATE"] = $record["DEL_DELEGATE_DATE"];
|
||||
}
|
||||
|
||||
if (isset($record['DEL_CURRENT_TAS_TITLE'])) {
|
||||
if (isset($record['DEL_CURRENT_TAS_TITLE']) && $record['DEL_CURRENT_TAS_TITLE'] != '') {
|
||||
$record['APP_TAS_TITLE'] = $record['DEL_CURRENT_TAS_TITLE'];
|
||||
}
|
||||
|
||||
@@ -195,8 +192,6 @@ try {
|
||||
$response['filters'] = $filtersData;
|
||||
$response['totalCount'] = $list->countTotal($userUid, $filtersData);
|
||||
|
||||
$response = $filter->xssFilterHard($response);
|
||||
|
||||
$response['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($result);
|
||||
|
||||
echo G::json_encode($response);
|
||||
|
||||
@@ -69,7 +69,6 @@ try {
|
||||
$result = DynaformPeer::doSelectRS($criteria);
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
if ($result->next()) {
|
||||
G::LoadClass('pmDynaform');
|
||||
G::LoadClass('pmDynaform');
|
||||
$FieldsPmDynaform = $applicationFields;
|
||||
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_REQUEST['DYN_UID'];
|
||||
|
||||
@@ -92,16 +92,12 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
||||
/**
|
||||
* Calls PMExtensionClass Builder to include Plugins changes.
|
||||
*/
|
||||
$config = Bootstrap::getSystemConfiguration();
|
||||
|
||||
if (!empty($config['experimental_features'])) {
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->enabledExtensions = $oPluginRegistry->getEnabledPlugins();
|
||||
if (!empty($phpBuilder->enabledExtensions)) {
|
||||
$phpBuilder->extension = true;
|
||||
}
|
||||
$phpBuilder->buildAll();
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->enabledExtensions = $oPluginRegistry->getEnabledPlugins();
|
||||
if (!empty($phpBuilder->enabledExtensions)) {
|
||||
$phpBuilder->extension = true;
|
||||
}
|
||||
$phpBuilder->buildAll();
|
||||
}
|
||||
|
||||
//$oPluginRegistry->showArrays();
|
||||
|
||||
@@ -3252,4 +3252,49 @@ class Cases
|
||||
$result = $case->updateCase($applicationUid, $arrayApplicationData);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Permissions, Participate, Access
|
||||
*
|
||||
* @param string $usrUid
|
||||
* @param string $proUid
|
||||
* @param string $appUid
|
||||
* @param array $rolesPermissions
|
||||
* @param array $objectPermissions
|
||||
* @return array Returns array with all access
|
||||
*/
|
||||
public function userAuthorization($usrUid, $proUid, $appUid, $rolesPermissions = array(), $objectPermissions = array()) {
|
||||
$arrayAccess = array();
|
||||
|
||||
//User has participated
|
||||
$oParticipated = new \ListParticipatedLast();
|
||||
$aParticipated = $oParticipated->loadList($usrUid, array(), null, $appUid);
|
||||
$arrayAccess['participated'] = (count($aParticipated) == 0) ? false : true;
|
||||
|
||||
//User is supervisor
|
||||
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
|
||||
$isSupervisor = $supervisor->isUserProcessSupervisor($proUid, $usrUid);
|
||||
$arrayAccess['supervisor'] = ($isSupervisor) ? true : false;
|
||||
|
||||
//Roles Permissions
|
||||
if (count($rolesPermissions) > 0) {
|
||||
global $RBAC;
|
||||
foreach ($rolesPermissions as $value) {
|
||||
$arrayAccess['rolesPermissions'][$value] = ($RBAC->userCanAccess($value) < 0) ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
//Object Permissions
|
||||
if (count($objectPermissions) > 0) {
|
||||
$oCase = new \Cases();
|
||||
foreach ($objectPermissions as $key => $value) {
|
||||
$resPermission = $oCase->getAllObjectsFrom($proUid, $appUid, '', $usrUid, $value);
|
||||
if (isset($resPermission[$key])) {
|
||||
$arrayAccess['objectPermissions'][$key] = $resPermission[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $arrayAccess;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -971,6 +971,16 @@ class InputDocument
|
||||
$aFields = array("APP_UID" => $appUid, "DEL_INDEX" => $delIndex, "USR_UID" => $userUid, "DOC_UID" => -1, "APP_DOC_TYPE" => "ATTACHED", "APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"), "APP_DOC_COMMENT" => "", "APP_DOC_TITLE" => "", "APP_DOC_FILENAME" => $arrayFileName[$i], "APP_DOC_FIELDNAME" => $fieldName);
|
||||
}
|
||||
|
||||
$sExtension = pathinfo($aFields["APP_DOC_FILENAME"]);
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $sExtension["extension"] === 'php') {
|
||||
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $sFileName);
|
||||
\G::SendMessageText($message, "ERROR");
|
||||
$backUrlObj = explode("sys" . SYS_SYS, $_SERVER['HTTP_REFERER']);
|
||||
\G::header("location: " . "/sys" . SYS_SYS . $backUrlObj[1]);
|
||||
die();
|
||||
}
|
||||
|
||||
$oAppDocument = new \AppDocument();
|
||||
$oAppDocument->create($aFields);
|
||||
|
||||
|
||||
@@ -187,6 +187,11 @@ class FilesManager
|
||||
if ($extention == '.exe') {
|
||||
throw new \Exception(\G::LoadTranslation('ID_FILE_UPLOAD_INCORRECT_EXTENSION'));
|
||||
}
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $extention === '.php') {
|
||||
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $aData['prf_filename']);
|
||||
throw new \Exception($message);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $sProcessUID . PATH_SEP . $sSubDirectory . $aData['prf_filename'];
|
||||
|
||||
@@ -902,6 +902,16 @@ class Light
|
||||
$response = array();
|
||||
if (is_array($request_data)) {
|
||||
foreach ($request_data as $k => $file) {
|
||||
$ext = pathinfo($file['name'], PATHINFO_EXTENSION);
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $ext === 'php') {
|
||||
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $file['name']);
|
||||
$response[$k]['error'] = array(
|
||||
"code" => "400",
|
||||
"message" => $message
|
||||
);
|
||||
continue;
|
||||
}
|
||||
$oCase = new \Cases();
|
||||
$delIndex = $oCase->getCurrentDelegation($app_uid, $userUid);
|
||||
$docUid = !empty($file['docUid']) ? $file['docUid'] : -1;
|
||||
|
||||
@@ -199,11 +199,6 @@ class NotificationDevice
|
||||
$devices = $oNoti->loadUsersArrayId($userIds);
|
||||
} else {
|
||||
$devices = $oNoti->loadByUsersId($userIds);
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$counter = $lists->getCounters($userIds);
|
||||
$light = new \ProcessMaker\Services\Api\Light();
|
||||
$result = $light->parserCountersCases($counter);
|
||||
$data['counters'] = $result;
|
||||
}
|
||||
|
||||
$devicesAndroidIds = array();
|
||||
|
||||
@@ -129,14 +129,14 @@ class ProcessSupervisor
|
||||
$sql = "
|
||||
SELECT DISTINCT " . \GroupUserPeer::GRP_UID . "
|
||||
FROM " . \GroupUserPeer::TABLE_NAME . ", " . \UsersPeer::TABLE_NAME . ",
|
||||
" . \UsersRolesPeer::TABLE_NAME . ", " . \RolesPermissionsPeer::TABLE_NAME . ", " . \PermissionsPeer::TABLE_NAME . "
|
||||
" . DB_RBAC_NAME . '.' . \UsersRolesPeer::TABLE_NAME . ", " . DB_RBAC_NAME . '.' . \RolesPermissionsPeer::TABLE_NAME . ", " . DB_RBAC_NAME . '.' . \PermissionsPeer::TABLE_NAME . "
|
||||
WHERE " . \GroupUserPeer::GRP_UID . " = " . \GroupwfPeer::GRP_UID . " AND
|
||||
" . \GroupUserPeer::USR_UID . " = " . \UsersPeer::USR_UID . " AND " . \UsersPeer::USR_STATUS . " = " . $delimiter . "ACTIVE" . $delimiter . " AND
|
||||
" . \UsersPeer::USR_UID . " = " . \UsersRolesPeer::USR_UID . " AND
|
||||
" . \UsersRolesPeer::ROL_UID . " = " . \RolesPermissionsPeer::ROL_UID . " AND
|
||||
" . \RolesPermissionsPeer::PER_UID . " = " . \PermissionsPeer::PER_UID . " AND
|
||||
" . \PermissionsPeer::PER_CODE . " = " . $delimiter . "PM_SUPERVISOR" . $delimiter . " AND
|
||||
" . \PermissionsPeer::PER_SYSTEM . " = " . $delimiter . $arrayRbacSystemData["SYS_CODE"] . $delimiter . "
|
||||
" . \UsersPeer::USR_UID . " = " . DB_RBAC_NAME . '.' . \UsersRolesPeer::USR_UID . " AND
|
||||
" . DB_RBAC_NAME . '.' . \UsersRolesPeer::ROL_UID . " = " . DB_RBAC_NAME . '.' . \RolesPermissionsPeer::ROL_UID . " AND
|
||||
" . DB_RBAC_NAME . '.' . \RolesPermissionsPeer::PER_UID . " = " . DB_RBAC_NAME . '.' . \PermissionsPeer::PER_UID . " AND
|
||||
" . DB_RBAC_NAME . '.' . \PermissionsPeer::PER_CODE . " = " . $delimiter . "PM_SUPERVISOR" . $delimiter . " AND
|
||||
" . DB_RBAC_NAME . '.' . \PermissionsPeer::PER_SYSTEM . " = " . $delimiter . $arrayRbacSystemData["SYS_CODE"] . $delimiter . "
|
||||
";
|
||||
|
||||
$criteriaGroup->add(
|
||||
@@ -209,13 +209,13 @@ class ProcessSupervisor
|
||||
break;
|
||||
case "AVAILABLE":
|
||||
$sql = "
|
||||
SELECT DISTINCT " . \UsersRolesPeer::USR_UID . "
|
||||
FROM " . \UsersRolesPeer::TABLE_NAME . ", " . \RolesPermissionsPeer::TABLE_NAME . ", " . \PermissionsPeer::TABLE_NAME . "
|
||||
WHERE " . \UsersRolesPeer::USR_UID . " = " . \UsersPeer::USR_UID . " AND
|
||||
" . \UsersRolesPeer::ROL_UID . " = " . \RolesPermissionsPeer::ROL_UID . " AND
|
||||
" . \RolesPermissionsPeer::PER_UID . " = " . \PermissionsPeer::PER_UID . " AND
|
||||
" . \PermissionsPeer::PER_CODE . " = " . $delimiter . "PM_SUPERVISOR" . $delimiter . " AND
|
||||
" . \PermissionsPeer::PER_SYSTEM . " = " . $delimiter . $arrayRbacSystemData["SYS_CODE"] . $delimiter . "
|
||||
SELECT DISTINCT " . DB_RBAC_NAME . '.' . \UsersRolesPeer::USR_UID . "
|
||||
FROM " . DB_RBAC_NAME . '.' . \UsersRolesPeer::TABLE_NAME . ", " . DB_RBAC_NAME . '.' . \RolesPermissionsPeer::TABLE_NAME . ", " . DB_RBAC_NAME . '.' . \PermissionsPeer::TABLE_NAME . "
|
||||
WHERE " . DB_RBAC_NAME . '.' . \UsersRolesPeer::USR_UID . " = " . \UsersPeer::USR_UID . " AND
|
||||
" . DB_RBAC_NAME . '.' . \UsersRolesPeer::ROL_UID . " = " . DB_RBAC_NAME . '.' . \RolesPermissionsPeer::ROL_UID . " AND
|
||||
" . DB_RBAC_NAME . '.' . \RolesPermissionsPeer::PER_UID . " = " . DB_RBAC_NAME . '.' . \PermissionsPeer::PER_UID . " AND
|
||||
" . DB_RBAC_NAME . '.' . \PermissionsPeer::PER_CODE . " = " . $delimiter . "PM_SUPERVISOR" . $delimiter . " AND
|
||||
" . DB_RBAC_NAME . '.' . \PermissionsPeer::PER_SYSTEM . " = " . $delimiter . $arrayRbacSystemData["SYS_CODE"] . $delimiter . "
|
||||
";
|
||||
|
||||
$criteriaUser->add(
|
||||
|
||||
@@ -65,6 +65,9 @@ class RoutingScreen extends \Derivation
|
||||
} else {
|
||||
$aDataMerged[$key]['NEXT_ROUTING'][] = $post[$i];
|
||||
}
|
||||
if (isset($post[$i]['NEXT_TASK'])) {
|
||||
$aDataMerged[$key]['NEXT_TASK'] = $post[$i]['NEXT_TASK'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user