Add namespace Processmaker\Core

This commit is contained in:
Marco A. Nina Mena
2017-08-14 16:13:46 -04:00
parent 06641a39c2
commit ee5a124bba
87 changed files with 623 additions and 477 deletions

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* class.bootstrap.php
*
@@ -41,7 +44,7 @@ class Bootstrap
public static function getSystemConfiguration($globalIniFile = '', $wsIniFile = '', $wsName = '')
{
return PmSystem::getSystemConfiguration($globalIniFile, $wsIniFile, $wsName);
return System::getSystemConfiguration($globalIniFile, $wsIniFile, $wsName);
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
@@ -1030,7 +1033,7 @@ class Bootstrap
*/
public function getCheckSum($files)
{
$key = PmSystem::getVersion();
$key = System::getVersion();
if (!is_array($files)) {
$tmp = $files;
@@ -1923,7 +1926,7 @@ class Bootstrap
/* Fix to prevent use uxs skin outside siplified interface,
because that skin is not compatible with others interfaces */
if ($args['SYS_SKIN'] == 'uxs' && $args['SYS_COLLECTION'] != 'home' && $args['SYS_COLLECTION'] != 'cases') {
$config = PmSystem::getSystemConfiguration();
$config = System::getSystemConfiguration();
$args['SYS_SKIN'] = $config['default_skin'];
}

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
if (!defined("T_ML_COMMENT")) {
define("T_ML_COMMENT", T_COMMENT);
} else {
@@ -29,7 +32,7 @@ class CodeScanner
$workspace = new WorkspaceTools($option);
if ($workspace->workspaceExists()) {
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', $workspace->name);
$arraySystemConfiguration = System::getSystemConfiguration('', '', $workspace->name);
$flag = (int)($arraySystemConfiguration['enable_blacklist']) == 1;
}
break;

View File

@@ -24,6 +24,7 @@
*
*/
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
/**
@@ -865,7 +866,7 @@ class G
/* Fix to prevent use uxs skin outside siplified interface,
because that skin is not compatible with others interfaces*/
if ($args['SYS_SKIN'] == 'uxs' && $args['SYS_COLLECTION'] != 'home' && $args['SYS_COLLECTION'] != 'cases') {
$config = PmSystem::getSystemConfiguration();
$config = System::getSystemConfiguration();
$args['SYS_SKIN'] = $config['default_skin'];
}
@@ -4649,7 +4650,7 @@ class G
*/
public function getCheckSum ($files)
{
$key = PmSystem::getVersion();
$key = System::getVersion();
if (! is_array( $files )) {
$tmp = $files;
@@ -5280,7 +5281,7 @@ class G
public static function browserCacheFilesGetUid()
{
$sysConf = PmSystem::getSystemConfiguration(PATH_CONFIG . "env.ini");
$sysConf = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
return (isset($sysConf["browser_cache_files_uid"]))? $sysConf["browser_cache_files_uid"] : null;
}
@@ -5405,7 +5406,7 @@ class G
*/
public static function log($message, $pathData = PATH_DATA, $file = 'cron.log')
{
$config = PmSystem::getSystemConfiguration();
$config = System::getSystemConfiguration();
$oLogger = Logger::getSingleton($pathData, PATH_SEP, $file);

View File

@@ -30,6 +30,8 @@
* to allow NTLM authentication throw soap connection
*/
use ProcessMaker\Core\System;
/**
*
* @package gulliver.system
@@ -200,7 +202,7 @@ class soapNtlm
curl_setopt( $this->ch, CURLOPT_USERPWD, $this->getuser() . ':' . $this->getpassword() ); // Ankit's code
//Apply proxy settings
if (class_exists( 'System' )) {
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
$sysConf = $filter->xssFilterHard($sysConf);
if ($sysConf['proxy_host'] != '') {
curl_setopt( $this->ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
@@ -243,7 +245,7 @@ class NTLMSoapClient extends SoapClient
//Apply proxy settings
if (class_exists( 'System' )) {
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt( $ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
if ($sysConf['proxy_port'] != '') {