Merged in release/3.2 (pull request #5472)
Release/3.2 Approved-by: Paula Quispe
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
<?php
|
||||
sleep( 1 );
|
||||
global $RBAC;
|
||||
if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
if (isset( $_SESSION['processes_upload'] )) {
|
||||
$form = $_SESSION['processes_upload'];
|
||||
G::LoadClass('processes');
|
||||
$app = new Processes();
|
||||
if (!$app->processExists($form['PRO_UID'])) {
|
||||
$result = 0;
|
||||
$msg = G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED');
|
||||
echo "{'result': $result, 'msg':'$msg'}";
|
||||
die;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
global $RBAC;
|
||||
if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
if (isset($_SESSION['processes_upload'])) {
|
||||
$form = $_SESSION['processes_upload'];
|
||||
G::LoadClass('processes');
|
||||
$app = new Processes();
|
||||
if (!$app->processExists($form['PRO_UID'])) {
|
||||
$result = 0;
|
||||
$msg = G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED');
|
||||
echo "{'result': $result, 'msg':'$msg'}";
|
||||
die;
|
||||
}
|
||||
switch ($form['MAIN_DIRECTORY']) {
|
||||
case 'mailTemplates':
|
||||
case 'mailTemplates':
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $form['PRO_UID'] . PATH_SEP . ($form['CURRENT_DIRECTORY'] != '' ? $form['CURRENT_DIRECTORY'] . PATH_SEP : '');
|
||||
break;
|
||||
case 'public':
|
||||
@@ -22,18 +23,29 @@ if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
default:
|
||||
die();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($_FILES['form']['error'] == "0") {
|
||||
G::uploadFile( $_FILES['form']['tmp_name'], $sDirectory, $_FILES['form']['name'] );
|
||||
$msg = "Uploaded (" . (round( (filesize( $sDirectory . $_FILES['form']['name'] ) / 1024) * 10 ) / 10) . " kb)";
|
||||
$fileName = $_FILES['form']['name'];
|
||||
$canUploadPhpFile = true;
|
||||
$extension = pathinfo($fileName, PATHINFO_EXTENSION);
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $extension === 'php') {
|
||||
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $fileName);
|
||||
$canUploadPhpFile = false;
|
||||
}
|
||||
|
||||
if ($_FILES['form']['error'] == "0" && $canUploadPhpFile) {
|
||||
G::uploadFile($_FILES['form']['tmp_name'], $sDirectory, $fileName);
|
||||
$msg = "Uploaded (" . (round((filesize($sDirectory . $fileName) / 1024) * 10) / 10) . " kb)";
|
||||
$result = 1;
|
||||
//echo $sDirectory.$_FILES['form']['name'];
|
||||
} else {
|
||||
$msg = "Failed";
|
||||
if ($canUploadPhpFile === false) {
|
||||
$msg = $message;
|
||||
}
|
||||
$result = 0;
|
||||
}
|
||||
|
||||
echo "{'result': $result, 'msg':'$msg'}";
|
||||
|
||||
echo "{'result': $result, 'msg':'$msg'}";
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
ini_set( "soap.wsdl_cache_enabled", "0" ); //disabling WSDL cache
|
||||
ini_set("soap.wsdl_cache_enabled", 0); //disabling WSDL cache
|
||||
|
||||
|
||||
define( 'WEB_SERVICE_VERSION', '2.0' );
|
||||
@@ -1240,7 +1240,10 @@ function claimCase($params)
|
||||
return $res;
|
||||
}
|
||||
|
||||
$server = new SoapServer($wsdl);
|
||||
$options = array(
|
||||
'cache_wsdl' => WSDL_CACHE_NONE
|
||||
);
|
||||
$server = new SoapServer($wsdl, $options);
|
||||
|
||||
$server->addFunction("Login");
|
||||
$server->addFunction("ProcessList");
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
$filewsdl = PATH_METHODS . 'services' . PATH_SEP . 'pmos2.wsdl';
|
||||
$content = file_get_contents( $filewsdl );
|
||||
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
||||
$content = file_get_contents($filewsdl);
|
||||
|
||||
$http = (isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
|
||||
$endpoint = $http . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . $lang . '/classic/services/soap2';
|
||||
$http = G::is_https() ? 'https' : 'http';
|
||||
$port = $_SERVER['SERVER_PORT'] === '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
|
||||
$lang = defined('SYS_LANG') ? SYS_LANG : 'en';
|
||||
$endpoint = $http . '://' . $_SERVER['SERVER_NAME'] . $port . '/sys' . SYS_SYS . '/' . $lang . '/neoclassic/services/soap2';
|
||||
|
||||
$content = str_replace( "___SOAP_ADDRESS___", $endpoint, $content );
|
||||
|
||||
header( "Content-Type: application/xml;" );
|
||||
$content = str_replace("___SOAP_ADDRESS___", $endpoint, $content);
|
||||
|
||||
header("Content-Type: application/xml;");
|
||||
print $content;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user