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

@@ -288,7 +288,7 @@ class WebApplication
Services\Api::setWorkspace(SYS_SYS);
$cacheDir = defined("PATH_WORKSPACE") ? PATH_WORKSPACE : (defined("PATH_C")? PATH_C: sys_get_temp_dir());
$sysConfig = \PmSystem::getSystemConfiguration();
$sysConfig = \ProcessMaker\Core\System::getSystemConfiguration();
\Luracast\Restler\Defaults::$cacheDirectory = $cacheDir;
$productionMode = (bool) !(isset($sysConfig["service_api_debug"]) && $sysConfig["service_api_debug"]);
@@ -450,7 +450,7 @@ class WebApplication
define("PATH_SERVICES_REST", PATH_CORE . "services" . PATH_SEP . "rest" . PATH_SEP);
G::defineConstants();
$arraySystemConfiguration = \PmSystem::getSystemConfiguration();
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration();
ini_set('date.timezone', $arraySystemConfiguration['time_zone']); //Set Time Zone
@@ -502,7 +502,7 @@ class WebApplication
exit(0);
}
$arraySystemConfiguration = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
//Do not change any of these settings directly, use env.ini instead
ini_set('display_errors', $arraySystemConfiguration['display_errors']);

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'] != '') {

View File

@@ -1,5 +1,7 @@
<?php
//test
use ProcessMaker\Core\System;
class PmBootstrap extends Bootstrap
{
public $pmConfig = array();
@@ -25,7 +27,7 @@ class PmBootstrap extends Bootstrap
{
parent::configure();
$this->pmConfig = PmSystem::getSystemConfiguration();
$this->pmConfig = System::getSystemConfiguration();
$e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all;

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
require_once(__DIR__ . '/../../../bootstrap/autoload.php');
try {
//Set variables
@@ -77,7 +80,7 @@ try {
$classLoader->addModelClassPath(PATH_TRUNK . 'workflow' . PATH_SEP . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'model' . PATH_SEP);
//Load classes
$arraySystemConfiguration = PmSystem::getSystemConfiguration();
$arraySystemConfiguration = System::getSystemConfiguration();
$e_all = (defined('E_DEPRECATED'))? E_ALL & ~E_DEPRECATED : E_ALL;
$e_all = (defined('E_STRICT'))? $e_all & ~E_STRICT : $e_all;

View File

@@ -1,6 +1,7 @@
<?php
require_once(__DIR__ . '/../../../bootstrap/autoload.php');
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
register_shutdown_function(
@@ -68,7 +69,7 @@ try {
$classLoader->addModelClassPath(PATH_TRUNK . 'workflow' . PATH_SEP . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'model' . PATH_SEP);
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', $workspace);
$arraySystemConfiguration = System::getSystemConfiguration('', '', $workspace);
$e_all = (defined('E_DEPRECATED'))? E_ALL & ~E_DEPRECATED : E_ALL;
$e_all = (defined('E_STRICT'))? $e_all & ~E_STRICT : $e_all;

View File

@@ -26,6 +26,8 @@
// php reindex_solr.php workspacename [reindexall|reindexmissing|optimizeindex] [-skip 1005] [-reindextrunksize 1000]
// var_dump($argv);
//(count ($argv) == 4) || ((count ($argv) == 5) && ($argv [3] != '-skip'))
use ProcessMaker\Core\System;
$commandLineSyntaxMsg = "Invalid command line arguments: \n " .
"syntax: ".
"php reindex_solr.php [workspace_name] [reindexall|reindexmissing|optimizeindex|reindexone|deleteindexone] [-skip {record_number}] [-reindextrunksize {trunk_size}] [-appuid {APP_UID}]\n" .
@@ -143,7 +145,7 @@ if (! defined ('SYS_SYS')) {
// ****************************************
// read initialize file
require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
$config = PmSystem::getSystemConfiguration ('', '', SYS_SYS);
$config = System::getSystemConfiguration ('', '', SYS_SYS);
define ('MEMCACHED_ENABLED', $config ['memcached']);
define ('MEMCACHED_SERVER', $config ['memcached_server']);
define ('TIME_ZONE', $config ['time_zone']);
@@ -259,7 +261,7 @@ function processWorkspace()
try {
if (($solrConf = PmSystem::solrEnv (SYS_SYS)) !== false) {
if (($solrConf = System::solrEnv (SYS_SYS)) !== false) {
print "Solr Configuration file: " . PATH_DATA_SITE . "env.ini\n";
print "solr_enabled: " . $solrConf ['solr_enabled'] . "\n";
print "solr_host: " . $solrConf ['solr_host'] . "\n";

View File

@@ -26,6 +26,9 @@
*/
/* Get the size of the terminal (only works on Linux, on Windows it's always 80) */
use ProcessMaker\Core\System;
preg_match_all("/rows.([0-9]+);.columns.([0-9]+);/", strtolower(exec('stty -a |grep columns')), $output);
if(sizeof($output) == 3 && isset($output[2]) && isset($output[2][0])) {
define("COLUMNS", $output[2][0]);
@@ -47,7 +50,7 @@ function get_workspaces_from_args($args, $includeAll = true) {
$workspaces[] = new WorkspaceTools($arg);
}
if (empty($workspaces) && $includeAll) {
$workspaces = PmSystem::listWorkspaces();
$workspaces = System::listWorkspaces();
}
return $workspaces;
}

View File

@@ -25,6 +25,8 @@
* @package workflow-engine-bin-tasks
*/
use ProcessMaker\Core\System;
CLI::taskName('upgrade');
CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after upgrading ProcessMaker to a new version so that all workspaces are also upgraded to the\n new version.");
@@ -87,7 +89,7 @@ function run_upgrade($command, $args)
}
$flag = G::isPMUnderUpdating(1, $oneWorkspace);
//start to upgrade
$checksum = PmSystem::verifyChecksum();
$checksum = System::verifyChecksum();
if ($checksum === false) {
CLI::logging(CLI::error("checksum.txt not found, integrity check is not possible") . "\n");
if (!CLI::question("Integrity check failed, do you want to continue the upgrade?")) {
@@ -177,7 +179,7 @@ function run_upgrade($command, $args)
}
}
} else {
CLI::logging('ProcessMaker ' . PmSystem::getVersion(). ' installed', PATH_DATA . 'log/upgrades.log');
CLI::logging('ProcessMaker ' . System::getVersion(). ' installed', PATH_DATA . 'log/upgrades.log');
}
//Safe upgrade for JavaScript files

View File

@@ -26,6 +26,8 @@
// php reindex_solr.php workspacename [reindexall|reindexmissing|optimizeindex] [-skip 1005] [-reindextrunksize 1000]
// var_dump($argv);
//(count ($argv) == 4) || ((count ($argv) == 5) && ($argv [3] != '-skip'))
use ProcessMaker\Core\System;
$commandLineSyntaxMsg = "Invalid command line arguments: \n " .
"Verify the list of cases comparing db vs solr lists by user if usr_uid is specify only verify one user otherwhise all users ".
"syntax: ".
@@ -117,7 +119,7 @@ if (! defined ('SYS_SYS')) {
// ****************************************
// read initialize file
require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
$config = PmSystem::getSystemConfiguration ('', '', SYS_SYS);
$config = System::getSystemConfiguration ('', '', SYS_SYS);
define ('MEMCACHED_ENABLED', $config ['memcached']);
define ('MEMCACHED_SERVER', $config ['memcached_server']);
define ('TIME_ZONE', $config ['time_zone']);
@@ -335,7 +337,7 @@ function displayMissingCases($aAppUidsDB, $aAppUidsSolr)
function getListUids($usrUid, $action)
{
if (($solrConf = PmSystem::solrEnv (SYS_SYS)) !== false) {
if (($solrConf = System::solrEnv (SYS_SYS)) !== false) {
print "Solr Configuration file: " . PATH_DATA_SITE . "env.ini\n";
print "solr_enabled: " . $solrConf ['solr_enabled'] . "\n";

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* Interface to the Solr Search server
*/
@@ -61,7 +63,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handlerTotal, CURLOPT_RETURNTRANSFER, true);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handlerTotal, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -142,7 +144,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -190,7 +192,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_BINARYTRANSFER, true); // --data-binary
curl_setopt($handler, CURLOPT_POSTFIELDS, $solrUpdateDocument->document); // data
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -235,7 +237,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_BINARYTRANSFER, true); // --data-binary
curl_setopt($handler, CURLOPT_POSTFIELDS, "<commit/>"); // data
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -280,7 +282,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_BINARYTRANSFER, true); // --data-binary
curl_setopt($handler, CURLOPT_POSTFIELDS, "<rollback/>"); // data
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -325,7 +327,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_BINARYTRANSFER, true); // --data-binary
curl_setopt($handler, CURLOPT_POSTFIELDS, "<optimize/>"); // data
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -366,7 +368,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -446,7 +448,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_BINARYTRANSFER, true); // --data-binary
curl_setopt($handler, CURLOPT_POSTFIELDS, "<delete><query>*:*</query></delete>"); // data
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -492,7 +494,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_BINARYTRANSFER, true); // --data-binary
curl_setopt($handler, CURLOPT_POSTFIELDS, "<delete><query>" . $idQuery . "</query></delete>"); // data
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {
@@ -573,7 +575,7 @@ class BpmnEngineSearchIndexAccessSolr
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($handler, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {

View File

@@ -1,6 +1,7 @@
<?php
use \ProcessMaker\BusinessModel\WebEntryEvent;
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
/**
@@ -18,7 +19,7 @@ class Cases
public function __construct()
{
//get Solr initialization variables
if (($solrConf = PmSystem::solrEnv()) !== false) {
if (($solrConf = System::solrEnv()) !== false) {
$this->appSolr = new AppSolr($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
}
}

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
class DashletRssReader implements DashletInterface
{
@@ -52,7 +54,7 @@ class DashletRssReader implements DashletInterface
curl_setopt( $pCurl, CURLOPT_VERBOSE, false );
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt( $pCurl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
if ($sysConf['proxy_port'] != '') {

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
class EnterpriseUtils
{
public static function getInternetConnection()
@@ -39,7 +41,7 @@ class EnterpriseUtils
curl_setopt($ch, CURLOPT_VERBOSE, true);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if (isset($sysConf['proxy_host'])) {
if ($sysConf['proxy_host'] != '') {
curl_setopt($ch, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
class P11835 extends Patch
{
/*
@@ -16,7 +18,7 @@ class P11835 extends Patch
$rs->next();
while($row = $rs->getRow()) {
if ($row ['Field'] == "TAS_GROUP_VARIABLE") {
$version = PmSystem::getVersion ();
$version = System::getVersion ();
$version = explode('-',$version);
if ($version[0] == '2.5.1') {
echo "Version " . $version[0] . " Patch\n";
@@ -84,7 +86,7 @@ class P11835 extends Patch
$arrayHotfix = $conf->getConfiguration("HOTFIX", "");
$arrayHotfix = (is_array($arrayHotfix))? $arrayHotfix : array($arrayHotfix);
$pmVersion = self::pmVersion(PmSystem::getVersion()) . "";
$pmVersion = self::pmVersion(System::getVersion()) . "";
if (($pmVersion == "2.5.2.4" || $pmVersion == "2.8") && !in_array("15394", $arrayHotfix)) {
$cnn = Propel::getConnection("workflow");

View File

@@ -1,4 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
class PMPluginRegistry
@@ -501,7 +503,7 @@ class PMPluginRegistry
public function uninstallPluginWorkspaces ($arrayPlugin)
{
$workspace = PmSystem::listWorkspaces();
$workspace = System::listWorkspaces();
foreach ($workspace as $indexWS => $ws) {
$wsPathDataSite = PATH_DATA . "sites" . PATH_SEP . $ws->name . PATH_SEP;
@@ -1542,7 +1544,7 @@ class PMPluginRegistry
if (isset($pluginDetails->aWorkspaces) && is_array($pluginDetails->aWorkspaces) && count($pluginDetails->aWorkspaces) > 0) {
$arrayWorkspace = array();
foreach (PmSystem::listWorkspaces() as $value) {
foreach (System::listWorkspaces() as $value) {
$workspaceTools = $value;
$arrayWorkspace[] = $workspaceTools->name;

View File

@@ -27,6 +27,8 @@
* see CHANGELOG
*/
use ProcessMaker\Core\System;
/**
* Project: Distrubution License Class
* File: class.license.lib.php
@@ -264,7 +266,7 @@ class Padl
}
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
if (!is_array($params['http'])) {
$params['http'] = array();

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* Implementing pmDynaform library in the running case.
*
@@ -1056,7 +1058,7 @@
$javascript = "
<script type=\"text/javascript\">
var jsondata = " . G::json_encode($json) . ";
var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";
var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";
var pm_run_outside_main_app = \"\";
var dyn_uid = \"" . $this->fields["CURRENT_DYNAFORM"] . "\";
var __DynaformName__ = \"" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "\";
@@ -1117,7 +1119,7 @@
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var pm_run_outside_main_app = null;\n" .
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
"var __DynaformName__ = '" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "';\n" .
@@ -1196,7 +1198,7 @@
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . $this->json_encode($json) . ";\n" .
"var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var pm_run_outside_main_app = '" . $this->fields["PM_RUN_OUTSIDE_MAIN_APP"] . "';\n" .
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
"var __DynaformName__ = '" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "';\n" .
@@ -1253,7 +1255,7 @@
$javascrip = "
<script type=\"text/javascript\">
var jsondata = " . G::json_encode($json) . ";
var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";
var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";
var pm_run_outside_main_app = null;
var dyn_uid = \"" . $this->fields["CURRENT_DYNAFORM"] . "\";
var __DynaformName__ = \"" . $this->fields["PRO_UID"] . "_" . $this->fields["CURRENT_DYNAFORM"] . "\";
@@ -1297,7 +1299,7 @@
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var pm_run_outside_main_app = null;\n" .
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
"var __DynaformName__ = null;\n" .
@@ -1339,7 +1341,7 @@
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var pm_run_outside_main_app = null;\n" .
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
"var __DynaformName__ = null;\n" .
@@ -1381,7 +1383,7 @@
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
"var jsonData = " . $this->json_encode($json) . ";\n" .
"var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
$js .
"</script>";
@@ -1403,7 +1405,7 @@
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var httpServerHostname = \"" . PmSystem::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
"var pm_run_outside_main_app = null;\n" .
"var dyn_uid = '" . $currentDynaform . "';\n" .
"var __DynaformName__ = null;\n" .

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
class Processes
{
@@ -5771,7 +5773,7 @@ class Processes
$endpoint = PML_WSDL_URL;
$sessionId = '';
$proxy = array();
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$proxy['proxy_host'] = $sysConf['proxy_host'];
if ($sysConf['proxy_port'] != '') {
@@ -5813,7 +5815,7 @@ class Processes
ini_set("soap.wsdl_cache_enabled", "0"); // enabling WSDL cache
try {
$proxy = array();
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$proxy['proxy_host'] = $sysConf['proxy_host'];
if ($sysConf['proxy_port'] != '') {
@@ -5845,7 +5847,7 @@ class Processes
$endpoint = PML_WSDL_URL;
$proxy = array();
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$proxy['proxy_host'] = $sysConf['proxy_host'];
@@ -5922,7 +5924,7 @@ class Processes
$endpoint = PML_WSDL_URL;
$proxy = array();
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$proxy['proxy_host'] = $sysConf['proxy_host'];
if ($sysConf['proxy_port'] != '') {

View File

@@ -8,6 +8,8 @@
* @link http://www.openmail.cc
*/
use ProcessMaker\Core\System;
/**
* @package workflow.engine.ProcessMaker
*/
@@ -548,7 +550,7 @@ class SpoolRun
*/
public function resendEmails($dateResend = null, $cron = 0)
{
$aConfiguration = PmSystem::getEmailConfiguration();
$aConfiguration = System::getEmailConfiguration();
if (!isset($aConfiguration["MESS_ENABLED"])) {
$aConfiguration["MESS_ENABLED"] = '0';

View File

@@ -1,6 +1,8 @@
<?php
use ProcessMaker\Core\System;
class Upgrade
{
private $addon = null;
@@ -90,7 +92,7 @@ class Upgrade
G::rm_dir(PATH_C);
mkdir(PATH_C, 0777, true);
}
$workspaces = PmSystem::listWorkspaces();
$workspaces = System::listWorkspaces();
$count = count($workspaces);
$first = true;
$num = 0;

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Util\FixReferencePath;
use ProcessMaker\Plugins\Adapters\PluginAdapter;
@@ -498,7 +499,7 @@ class WorkspaceTools
$language = new Language();
foreach (PmSystem::listPoFiles() as $poFile) {
foreach (System::listPoFiles() as $poFile) {
$poName = basename($poFile);
$names = explode(".", basename($poFile));
$extension = array_pop($names);
@@ -849,8 +850,8 @@ class WorkspaceTools
*/
public function upgradePluginsDatabase()
{
foreach (PmSystem::getPlugins() as $pluginName) {
$pluginSchema = PmSystem::getPluginSchema($pluginName);
foreach (System::getPlugins() as $pluginName) {
$pluginSchema = System::getPluginSchema($pluginName);
if ($pluginSchema !== false) {
CLI::logging("Updating plugin " . CLI::info($pluginName) . "\n");
$this->upgradeSchema($pluginSchema);
@@ -869,8 +870,8 @@ class WorkspaceTools
$this->initPropel(true);
P11835::$dbAdapter = $this->dbAdapter;
P11835::isApplicable();
$systemSchema = PmSystem::getSystemSchema($this->dbAdapter);
$systemSchemaRbac = PmSystem::getSystemSchemaRbac($this->dbAdapter);// get the Rbac Schema
$systemSchema = System::getSystemSchema($this->dbAdapter);
$systemSchemaRbac = System::getSystemSchemaRbac($this->dbAdapter);// get the Rbac Schema
$this->registerSystemTables(array_merge($systemSchema, $systemSchemaRbac));
$this->upgradeSchema($systemSchema);
$this->upgradeSchema($systemSchemaRbac, false, true, $onedb); // perform Upgrade to Rbac
@@ -898,7 +899,7 @@ class WorkspaceTools
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
$emailConfiguration = PmSystem::getEmailConfiguration();
$emailConfiguration = System::getEmailConfiguration();
if (!empty($emailConfiguration)) {
$arrayData["MESS_ENGINE"] = $emailConfiguration["MESS_ENGINE"];
@@ -993,7 +994,7 @@ class WorkspaceTools
if (!$onedb) {
if ($rbac) {
$rename = PmSystem::verifyRbacSchema($workspaceSchema);
$rename = System::verifyRbacSchema($workspaceSchema);
if (count($rename) > 0) {
foreach ($rename as $tableName) {
$oDataBase->executeQuery($oDataBase->generateRenameTableSQL($tableName));
@@ -1002,7 +1003,7 @@ class WorkspaceTools
}
}
$workspaceSchema = $this->getSchema($rbac);
$changes = PmSystem::compareSchema($workspaceSchema, $schema);
$changes = System::compareSchema($workspaceSchema, $schema);
$changed = (count($changes['tablesToAdd']) > 0 || count($changes['tablesToAlter']) > 0 || count($changes['tablesWithNewIndex']) > 0 || count($changes['tablesToAlterIndex']) > 0);
@@ -1141,7 +1142,7 @@ class WorkspaceTools
*/
public function getMetadata()
{
$Fields = array_merge(PmSystem::getSysInfo(), $this->getDBInfo());
$Fields = array_merge(System::getSysInfo(), $this->getDBInfo());
$Fields['WORKSPACE_NAME'] = $this->name;
if (isset($this->dbHost)) {
@@ -1176,7 +1177,7 @@ class WorkspaceTools
*/
public static function printSysInfo()
{
$fields = PmSystem::getSysInfo();
$fields = System::getSysInfo();
$info = array(
'ProcessMaker Version' => $fields['PM_VERSION'],
@@ -1655,7 +1656,7 @@ class WorkspaceTools
throw new Exception("Workspace $srcWorkspace not found in backup");
}
$version = PmSystem::getVersion();
$version = System::getVersion();
$pmVersion = (preg_match("/^([\d\.]+).*$/", $version, $arrayMatch)) ? $arrayMatch[1] : ""; //Otherwise: Branch master
CLI::logging(CLI::warning("
@@ -1919,7 +1920,7 @@ class WorkspaceTools
public function backupLogFiles()
{
$config = PmSystem::getSystemConfiguration();
$config = System::getSystemConfiguration();
clearstatcache();
$path = PATH_DATA . "log" . PATH_SEP;
@@ -1952,7 +1953,7 @@ class WorkspaceTools
$envFile = PATH_CONFIG . 'env.ini';
$skin ='neoclassic';
if (file_exists($envFile)) {
$sysConf = PmSystem::getSystemConfiguration($envFile);
$sysConf = System::getSystemConfiguration($envFile);
$lang = $sysConf['default_lang'];
$skin = $sysConf['default_skin'];
}
@@ -3525,7 +3526,7 @@ class WorkspaceTools
public function migrateIteeToDummytask($workspaceName)
{
$this->initPropel(true);
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', $workspaceName);
$arraySystemConfiguration = System::getSystemConfiguration('', '', $workspaceName);
$conf = new Configurations();
\G::$sysSys = $workspaceName;
\G::$pathDataSite = PATH_DATA . "sites" . PATH_SEP . \G::$sysSys . PATH_SEP;

View File

@@ -1,6 +1,7 @@
<?php
//It works with the table CONFIGURATION in a WF dataBase
use ProcessMaker\Core\System;
/**
* Copyright (C) 2009 COLOSA
@@ -269,7 +270,7 @@ class WsBase
try {
$solrEnabled = 0;
if (($solrEnv = PmSystem::solrEnv()) !== false) {
if (($solrEnv = System::solrEnv()) !== false) {
$appSolr = new AppSolr(
$solrEnv["solr_enabled"],
@@ -872,7 +873,7 @@ class WsBase
}
}
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : PmSystem::getEmailConfiguration();
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : System::getEmailConfiguration();
if (!isset($aSetup['MESS_ENABLED'])) {
$aSetup['MESS_ENABLED'] = 1;
@@ -881,7 +882,7 @@ class WsBase
}
} else {
/*----------------------------------********---------------------------------*/
$aSetup = PmSystem::getEmailConfiguration();
$aSetup = System::getEmailConfiguration();
/*----------------------------------********---------------------------------*/
}
/*----------------------------------********---------------------------------*/
@@ -2825,7 +2826,7 @@ class WsBase
$result->status_code = 0;
$result->message = G::loadTranslation( 'ID_SUCESSFUL' );
$result->timestamp = date( 'Y-m-d H:i:s' );
$result->version = PmSystem::getVersion();
$result->version = System::getVersion();
$result->operatingSystem = $redhat;
$result->webServer = getenv( 'SERVER_SOFTWARE' );
$result->serverName = getenv( 'SERVER_NAME' );

View File

@@ -28,6 +28,7 @@
//
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
use ProcessMaker\Util\ElementTranslation;
@@ -242,7 +243,7 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
$aContext = \Bootstrap::getDefaultContextLog();
$con = Propel::getConnection( $DBConnectionUID );
$con->begin();
$blackList = PmSystem::getQueryBlackList();
$blackList = System::getQueryBlackList();
$aListQueries = explode('|', $blackList['queries']);
$aListAllTables = explode(
'|',
@@ -903,7 +904,7 @@ function WSProcessList ()
//private function to get current email configuration
function getEmailConfiguration ()
{
return PmSystem::getEmailConfiguration();
return System::getEmailConfiguration();
}
/**

View File

@@ -5,6 +5,9 @@
*
* @package workflow.engine.classes
*/
use ProcessMaker\Core\System;
require_once "HTTP/WebDAV/Server.php";
require_once "System.php";
@@ -742,7 +745,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
if (is_dir($path)) {
$query = "DELETE FROM properties WHERE path LIKE '" . $this->_slashify($options["path"]) . "%'";
mysql_query($query);
PmSystem::rm("-rf $path");
System::rm("-rf $path");
} else {
unlink($path);
}
@@ -845,7 +848,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
mysql_query($query);
} else {
if (is_dir($source)) {
$files = PmSystem::find($source);
$files = System::find($source);
$files = array_reverse($files);
} else {
$files = array($source

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
require_once 'classes/model/om/BaseAddonsManager.php';
@@ -157,7 +158,7 @@ class AddonsManager extends BaseAddonsManager
public function getInstalledVersion()
{
if ($this->isCore()) {
return (EnterpriseUtils::pmVersion(PmSystem::getVersion()));
return (EnterpriseUtils::pmVersion(System::getVersion()));
} else {
if ($this->isPlugin()) {
if (!$this->isInstalled()) {
@@ -243,7 +244,7 @@ class AddonsManager extends BaseAddonsManager
);
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {
$option['http'] = array();

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
require_once 'classes/model/om/BaseAddonsStore.php';
@@ -489,7 +490,7 @@ class AddonsStore extends BaseAddonsStore
"header" => "Content-type: application/x-www-form-urlencoded\r\n",
"content" => http_build_query(
array(
"pmVersion" => PmSystem::getVersion(),
"pmVersion" => System::getVersion(),
"version" => STORE_VERSION
)
)
@@ -497,7 +498,7 @@ class AddonsStore extends BaseAddonsStore
);
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if (isset($sysConf['proxy_host'])) {
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {

View File

@@ -1,6 +1,7 @@
<?php
//require_once 'classes/model/om/BaseAppNotes.php';
use ProcessMaker\Core\System;
/**
* Skeleton subclass for representing a row from the 'APP_NOTES' table.
@@ -148,7 +149,7 @@ class AppNotes extends BaseAppNotes
{
try {
$aConfiguration = PmSystem::getEmailConfiguration();
$aConfiguration = System::getEmailConfiguration();
$msgError = "";
if (! isset( $aConfiguration['MESS_ENABLED'] ) || $aConfiguration['MESS_ENABLED'] != '1') {

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
class Language extends BaseLanguage
{
private static $arrayRecord = array();
@@ -355,7 +358,7 @@ class Language extends BaseLanguage
$sLanguage = $langRecord['LAN_NAME'];
//setting headers
$poFile->addHeader( 'Project-Id-Version', 'ProcessMaker ' . PmSystem::getVersion() );
$poFile->addHeader( 'Project-Id-Version', 'ProcessMaker ' . System::getVersion() );
$poFile->addHeader( 'POT-Creation-Date', '' );
$poFile->addHeader( 'PO-Revision-Date', date( 'Y-m-d H:i:s' ) );
$poFile->addHeader( 'Last-Translator', '' );

View File

@@ -11,6 +11,8 @@
* @GPL 2007, Plymouth State University, ITS
*/
use ProcessMaker\Core\System;
/**
* zimbra.class.php
*
@@ -206,7 +208,7 @@ class Zimbra
curl_setopt($this->_curl, CURLOPT_SSL_VERIFYHOST, false);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt($this->_curl, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : ''));
if ($sysConf['proxy_port'] != '') {

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* class.pmSugar.pmFunctions.php
*
@@ -22,7 +24,7 @@ function getSoapClientOptions ()
$options = array ('trace' => 1);
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$options['proxy_host'] = $sysConf['proxy_host'];
if ($sysConf['proxy_port'] != '') {

View File

@@ -15,6 +15,7 @@
//
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
use ProcessMaker\Core\System;
/**
@@ -47,7 +48,7 @@ function executeTalendWebservice ($wsdl, $message, $params = array())
) );
//Apply proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
curl_setopt( $client, CURLOPT_PROXY, $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '') );
if ($sysConf['proxy_port'] != '') {

View File

@@ -14,6 +14,7 @@
//
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
use ProcessMaker\Core\System;
/**
@@ -401,7 +402,7 @@ function uploadZimbraFile($ServerUrl, $username, $preAuthKey, $folderName, $file
curl_setopt ($ch, CURLOPT_HTTPHEADER,$header_array);
//Apply proxy settings
$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'] != '') {

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* Admin controller
*
@@ -19,7 +21,7 @@ class Admin extends Controller
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'main.php';
$skinsList = PmSystem::getSkingList();
$skinsList = System::getSkingList();
foreach ($skinsList['skins'] as $key => $value) {
if ($value['SKIN_WORKSPACE'] != 'Global') {
unset( $skinsList['skins'][$key] );
@@ -29,7 +31,7 @@ class Admin extends Controller
$mainController = new Main();
$languagesList = $mainController->getLanguagesList();
$languagesList[] = array ("", G::LoadTranslation("ID_USE_LANGUAGE_URL"));
$sysConf = PmSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$sysConf = System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
foreach ($skinsList['skins'] as $skin) {
$skins[] = array ($skin['SKIN_FOLDER_ID'],$skin['SKIN_NAME']);
@@ -268,7 +270,7 @@ class Admin extends Controller
if (defined('SYSTEM_NAME')) {
$systemName = SYSTEM_NAME;
}
$properties[] = array ($systemName. ' Ver.', PmSystem::getVersion() . $ee, $pmSection);
$properties[] = array ($systemName. ' Ver.', System::getVersion() . $ee, $pmSection);
$properties[] = array("PMUI JS Lib. Ver.", $pmuiVer, $pmSection);
$properties[] = array("MAFE JS Lib. Ver.", $mafeVer, $pmSection);
$properties[] = array("PM Dynaform JS Lib. Ver.", $pmdynaformVer, $pmSection);

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
/**
@@ -41,7 +42,7 @@ class adminProxy extends HttpProxyController
$updateRedirector = false;
$restart = false;
self::validateDataSystemConf($httpData, $envFile);
$sysConf = PmSystem::getSystemConfiguration($envFile);
$sysConf = System::getSystemConfiguration($envFile);
$updatedConf = array();
if ($sysConf['default_lang'] != $httpData->default_lang) {
@@ -99,7 +100,7 @@ class adminProxy extends HttpProxyController
}
}
PmSystem::updateIndexFile(array(
System::updateIndexFile(array(
'lang' => $sysConf['default_lang'],
'skin' => $sysConf['default_skin']
));
@@ -614,7 +615,7 @@ class adminProxy extends HttpProxyController
$sBodyPre->prepare();
$sBodyPre->assign('server', $_SERVER['SERVER_NAME']);
$sBodyPre->assign('date', date('H:i:s'));
$sBodyPre->assign('ver', PmSystem::getVersion());
$sBodyPre->assign('ver', System::getVersion());
$sBodyPre->assign('engine', $engine);
$sBodyPre->assign('msg', $msg);
$sBody = $sBodyPre->getOutputContent();
@@ -1418,7 +1419,7 @@ class adminProxy extends HttpProxyController
$params['lt'] = isset($licInfo[SYS_SYS]) ? isset($licInfo[SYS_SYS]['TYPE'])? $licInfo[SYS_SYS]['TYPE'] : '' : '';
//ProcessMaker Version
$params['v'] = PmSystem::getVersion();
$params['v'] = System::getVersion();
if (file_exists(PATH_DATA. 'log/upgrades.log')) {
$params['pmu'] = serialize(file_get_contents(PATH_DATA. 'log/upgrades.log', 'r'));
} else {
@@ -1508,7 +1509,7 @@ class adminProxy extends HttpProxyController
//Country/city (Timezone)
$params['t'] = (defined('TIME_ZONE') && TIME_ZONE != "Unknown") ? TIME_ZONE : date_default_timezone_get();
$params['w'] = count(PmSystem::listWorkspaces());
$params['w'] = count(System::listWorkspaces());
$support = PATH_DATA_SITE . G::sanitizeString($licenseManager->info['FIRST_NAME'] . '-' . $licenseManager->info['LAST_NAME'] . '-' . SYS_SYS . '-' . date('YmdHis'), false, false) . '.spm';
file_put_contents($support, serialize($params));

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
/**
@@ -64,7 +65,7 @@ class Designer extends Controller
$this->setVar("SYS_SYS", SYS_SYS);
$this->setVar("SYS_LANG", SYS_LANG);
$this->setVar("SYS_SKIN", SYS_SKIN);
$this->setVar('HTTP_SERVER_HOSTNAME', PmSystem::getHttpServerHostnameRequestsFrontEnd());
$this->setVar('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());
if ($debug) {
if (!file_exists(PATH_HTML . "lib-dev/pmUI/build.cache")) {

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* Home controller
*
@@ -102,7 +104,7 @@ class Home extends Controller
$userProperty = new UsersProperties();
$process = new Process();
$case = new Cases();
$sysConf = PmSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$sysConf = System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
//Get ProcessStatistics Info
$start = 0;
@@ -184,7 +186,7 @@ class Home extends Controller
$solrEnabled = false;
if (($solrConf = PmSystem::solrEnv()) !== false) {
if (($solrConf = System::solrEnv()) !== false) {
$ApplicationSolrIndex = new AppSolr(
$solrConf["solr_enabled"],
@@ -408,7 +410,7 @@ class Home extends Controller
$type == "todo" || $type == "draft" || $type == "paused" || $type == "sent" ||
$type == "selfservice" || $type == "unassigned" || $type == "search"
) &&
(($solrConf = PmSystem::solrEnv()) !== false)
(($solrConf = System::solrEnv()) !== false)
) {
$ApplicationSolrIndex = new AppSolr(

View File

@@ -5,7 +5,11 @@
*
* @author Erik A. O. <erik@colosa.com>
*/
global $translation;
global
use ProcessMaker\Core\System;
$translation;
include PATH_LANGUAGECONT."translation.".SYS_LANG;
class Installer extends Controller
@@ -966,7 +970,7 @@ class Installer extends Controller
$envFile = PATH_CONFIG . 'env.ini';
// getting configuration from env.ini
$sysConf = PmSystem::getSystemConfiguration( $envFile );
$sysConf = System::getSystemConfiguration( $envFile );
$langUri = 'en';
if (isset($sysConf['default_lang'])) {
@@ -1022,7 +1026,7 @@ class Installer extends Controller
try {
// update the main index file
$indexFileUpdated = PmSystem::updateIndexFile(array('lang' => 'en','skin' => $updatedConf['default_skin']));
$indexFileUpdated = System::updateIndexFile(array('lang' => 'en','skin' => $updatedConf['default_skin']));
} catch (Exception $e) {
$info->result = false;
$info->message = G::LoadTranslation('ID_PROCESSMAKER_WRITE_CONFIG_INDEX', SYS_LANG, Array(PATH_HTML . "index.html."));

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
/**
@@ -264,7 +265,7 @@ class Main extends Controller
}
$this->setVar( 'logo_company', $this->getCompanyLogo() );
$this->setVar( 'pmos_version', PmSystem::getVersion() );
$this->setVar( 'pmos_version', System::getVersion() );
$footerText = 'Copyright &copy; 2003-' . date( 'Y' ) . ' Colosa, Inc. All rights reserved.';
$adviseText = 'Supplied free of charge with no support, certification, warranty,
@@ -314,7 +315,7 @@ class Main extends Controller
$this->includeExtJS( 'main/sysLogin' );
$this->setVar( 'logo_company', $this->getCompanyLogo() );
$this->setVar( 'pmos_version', PmSystem::getVersion() );
$this->setVar( 'pmos_version', System::getVersion() );
$footerText = G::LoadTranslation('ID_COPYRIGHT_FROM') . date( 'Y' ) . G::LoadTranslation('ID_COPYRIGHT_COL');
$adviseText = G::LoadTranslation('ID_COLOSA_AND_CERTIFIED_PARTNERS');
@@ -384,7 +385,7 @@ class Main extends Controller
$template->assign( 'passwd', $newPass );
$template->assign( 'poweredBy', G::loadTranslation( 'ID_PROCESSMAKER_SLOGAN1' ) );
$template->assign( 'versionLabel', G::loadTranslation( 'ID_VERSION' ) );
$template->assign( 'version', PmSystem::getVersion() );
$template->assign( 'version', System::getVersion() );
$template->assign( 'visit', G::loadTranslation( 'ID_VISIT' ) );
$template->assign( 'footer', '' );
@@ -733,7 +734,7 @@ class Main extends Controller
if (defined('SYSTEM_NAME')) {
$systemName = SYSTEM_NAME;
}
$properties[] = array ($systemName. ' Ver.', PmSystem::getVersion() . $ee, $pmSection);
$properties[] = array ($systemName. ' Ver.', System::getVersion() . $ee, $pmSection);
$properties[] = array("PMUI JS Lib. Ver.", $pmuiVer, $pmSection);
$properties[] = array("MAFE JS Lib. Ver.", $mafeVer, $pmSection);
$properties[] = array("PM Dynaform JS Lib. Ver.", $pmdynaformVer, $pmSection);

View File

@@ -6,6 +6,9 @@
* @inherits HttpProxyController
* @access public
*/
use ProcessMaker\Core\System;
header("Content-type: text/html;charset=utf-8");
require_once 'classes/model/AdditionalTables.php';
@@ -920,7 +923,7 @@ class pmTablesProxy extends HttpProxyController
$result = new stdClass();
$net = new Net( G::getIpAddress() );
$META = " \n-----== ProcessMaker Open Source Private Tables ==-----\n" . " @Ver: 1.0 Oct-2009\n" . " @Processmaker version: " . PmSystem::getVersion() . "\n" . " -------------------------------------------------------\n" . " @Export Date: " . date( "l jS \of F Y h:i:s A" ) . "\n" . " @Server address: " . getenv( 'SERVER_NAME' ) . " (" . getenv( 'SERVER_ADDR' ) . ")\n" . " @Client address: " . $net->hostname . "\n" . " @Workspace: " . SYS_SYS . "\n" . " @Export trace back:\n\n";
$META = " \n-----== ProcessMaker Open Source Private Tables ==-----\n" . " @Ver: 1.0 Oct-2009\n" . " @Processmaker version: " . System::getVersion() . "\n" . " -------------------------------------------------------\n" . " @Export Date: " . date( "l jS \of F Y h:i:s A" ) . "\n" . " @Server address: " . getenv( 'SERVER_NAME' ) . " (" . getenv( 'SERVER_ADDR' ) . ")\n" . " @Client address: " . $net->hostname . "\n" . " @Workspace: " . SYS_SYS . "\n" . " @Export trace back:\n\n";
$EXPORT_TRACEBACK = Array ();
$c = 0;

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* StrategicDashboard controller
* @inherits Controller
@@ -31,7 +33,7 @@ class StrategicDashboard extends Controller
$user = new Users();
$user = $user->load($RBAC->aUserInfo['USER_INFO']['USR_UID']);
$this->usrUnitCost = $this->currencySymbolToShow($user);
$this->urlProxy = PmSystem::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/';
$this->urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/';
//change
$clientId = 'x-pm-local-client';
$client = $this->getClientCredentials($clientId);

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
class webEntryProxy extends HttpProxyController
{
//Delete Web Entry
@@ -183,7 +185,7 @@ class webEntryProxy extends HttpProxyController
$template->assign( 'dynaform', $dynTitle );
$template->assign( 'timestamp', date( 'l jS \of F Y h:i:s A' ) );
$template->assign( 'ws', SYS_SYS );
$template->assign( 'version', PmSystem::getVersion() );
$template->assign( 'version', System::getVersion() );
$fileName = $pathProcess . $dynTitle . 'Post.php';
file_put_contents( $fileName, $template->getOutputContent() );

View File

@@ -22,6 +22,8 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
use ProcessMaker\Core\System;
$filter = new InputFilter();
$_POST = $filter->xssFilterHard($_POST);
$_REQUEST = $filter->xssFilterHard($_REQUEST);
@@ -192,7 +194,7 @@ if ($actionAjax == 'sendMailMessage_JXP') {
$oCase = new Cases();
$data = $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] );
$aSetup = PmSystem::getEmailConfiguration();
$aSetup = System::getEmailConfiguration();
$oSpool = new SpoolRun();

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
$action = (isset($_REQUEST["action"])) ? $_REQUEST["action"] : "consolidated";
$arrayTabItem = array();
@@ -69,7 +71,7 @@ while ($rsSql->next()) {
}
if (count($arrayTabItem) > 0) {
$urlProxy = PmSystem::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/consolidated/';
$urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/consolidated/';
$clientId = 'x-pm-local-client';
$client = getClientCredentials($clientId);
$authCode = getAuthorizationCode($client);

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
unset($_SESSION['APPLICATION']);
@@ -121,7 +122,7 @@ $oAppCache->confCasesList = $confCasesList;
$solrEnabled = 0;
if ($action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" ||
$action == "unassigned" || $action == "search") {
$solrConfigured = ($solrConf = PmSystem::solrEnv()) !== false ? 1 : 0;
$solrConfigured = ($solrConf = System::solrEnv()) !== false ? 1 : 0;
if ($solrConfigured == 1) {
$applicationSolrIndex = new AppSolr(
$solrConf['solr_enabled'],

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
$filter = new InputFilter();
$_GET = $filter->xssFilterHard($_GET);
$_POST = $filter->xssFilterHard($_POST);
@@ -785,7 +787,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
$data = $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] );
//print_r($data);
$aSetup = PmSystem::getEmailConfiguration();
$aSetup = System::getEmailConfiguration();
$passwd = $aSetup['MESS_PASSWORD'];
$passwdDec = G::decrypt( $passwd, 'EMAILENCRYPT' );

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
AddonsStore::checkLicenseStore();
$licenseManager = &PmLicenseManager::getSingleton();
@@ -60,7 +62,7 @@ $oHeadPublisher->assign("SUPPORT_FLAG", ((isset($licenseManager->supportStartDat
$oHeadPublisher->assign("supportStartDate", (isset($licenseManager->supportStartDate))? $licenseManager->supportStartDate : '');
$oHeadPublisher->assign("supportEndDate", (isset($licenseManager->supportEndDate))? $licenseManager->supportEndDate : '');
$oHeadPublisher->assign("PROCESSMAKER_VERSION", PmSystem::getVersion());
$oHeadPublisher->assign("PROCESSMAKER_VERSION", System::getVersion());
$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN );
$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN);
$oHeadPublisher->assign("URL_PART_LOGIN", ((substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs")? "main/login" : "login/login"));

View File

@@ -1,4 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
function runBgProcessmaker($task, $log)
@@ -249,7 +251,7 @@ try {
);
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {
$option['http'] = array();

View File

@@ -1,5 +1,6 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
if (!defined("PATH_PM_ENTERPRISE")) {
@@ -18,7 +19,7 @@ class enterprisePlugin extends PMPlugin
{
$pathPluginTrunk = PATH_CORE . "enterprise";
$VERSION = PmSystem::getVersion();
$VERSION = System::getVersion();
$res = parent::PMPlugin($sNamespace, $sFilename);
$this->sFriendlyName = "ProcessMaker Enterprise Core Edition";

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
ini_set("max_execution_time", 0);
if (!defined("PM_VERSION")) {
@@ -40,7 +43,7 @@ function install($file)
);
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if (isset($sysConf['proxy_host'])) {
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {
@@ -147,7 +150,7 @@ switch ($option) {
);
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if (isset($sysConf['proxy_host'])) {
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {
@@ -316,7 +319,7 @@ switch ($option) {
);
// Proxy settings
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if (isset($sysConf['proxy_host'])) {
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {

View File

@@ -23,6 +23,7 @@
*
*/
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
try {
@@ -247,7 +248,7 @@ try {
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$userTimeZone = $arraySystemConfiguration['time_zone'];
}
@@ -421,7 +422,7 @@ try {
die;
}
$configS = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$configS = System::getSystemConfiguration('', '', SYS_SYS);
$activeSession = isset($configS['session_block']) ? !(int)$configS['session_block']:true;
if ($activeSession){
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');

View File

@@ -1,6 +1,8 @@
<?php
global $G_PUBLISH;
use ProcessMaker\Core\System;
try {
if ($RBAC->singleSignOn) {
$_SESSION['__USER_LOGGED_SSO__'] = $RBAC->userObj->fields['USR_UID'];
@@ -38,7 +40,7 @@ try {
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
//Set User Time Zone
$user = UsersPeer::retrieveByPK($userUid);

View File

@@ -23,6 +23,7 @@
*
*/
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
/*----------------------------------********---------------------------------*/
@@ -360,7 +361,7 @@ $flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])
setcookie('PM-Warning', trim(G::LoadTranslation('ID_BLOCKER_MSG'), '*'), time() + (24 * 60 * 60), SYS_URI);
$configS = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$configS = System::getSystemConfiguration('', '', SYS_SYS);
$activeSession = isset($configS['session_block']) ? !(int)$configS['session_block'] : true;
if ($activeSession) {
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
$data = $_POST['form'];
global $RBAC;
@@ -8,7 +11,7 @@ $data['USR_USERNAME'] = strip_tags($data['USR_USERNAME']);
$userData = $rbacUser->getByUsername($data['USR_USERNAME']);
if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'] && ($userData['USR_AUTH_TYPE'] === '' || $userData['USR_AUTH_TYPE'] == 'MYSQL') ) {
$aSetup = PmSystem::getEmailConfiguration();
$aSetup = System::getEmailConfiguration();
if (count($aSetup) == 0 || !isset($aSetup['MESS_ENGINE'])) {
G::SendTemporalMessage ('ID_EMAIL_ENGINE_IS_NOT_ENABLED', "warning");
G::header('location: forgotPassword');
@@ -53,7 +56,7 @@ if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'
<tbody><tr><td><img id='logo' src='http://".$_SERVER['SERVER_NAME']."/images/processmaker.logo.jpg' /></td></tr>
<tr><td style='font-size: 14px;'>$msg</td></tr>
<tr><td style='vertical-align:middel;'>
<br /><hr><b>This Business Process is powered by ProcessMaker ver. ".PmSystem::getVersion().".<b><br />
<br /><hr><b>This Business Process is powered by ProcessMaker ver. ".System::getVersion().".<b><br />
<a href='http://www.processmaker.com' style='color:#c40000;'>www.processmaker.com</a><br /></td>
</tr></tbody></table>";

View File

@@ -21,6 +21,8 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
//$oHeadPublisher = & headPublisher::getSingleton();
@@ -29,7 +31,7 @@ $RBAC->requirePermissions( 'PM_FACTORY' );
$conf = new Configurations();
$pmVersion = (preg_match("/^([\d\.]+).*$/", PmSystem::getVersion(), $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master
/*----------------------------------********---------------------------------*/
if (true) {
@@ -93,7 +95,7 @@ $designer = new Designer();
$oHeadPublisher->assign('SYS_SYS', SYS_SYS);
$oHeadPublisher->assign('SYS_LANG', SYS_LANG);
$oHeadPublisher->assign('SYS_SKIN', SYS_SKIN);
$oHeadPublisher->assign('HTTP_SERVER_HOSTNAME', PmSystem::getHttpServerHostnameRequestsFrontEnd());
$oHeadPublisher->assign('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());
$oHeadPublisher->assign('credentials', base64_encode(G::json_encode($designer->getCredentials())));
$deleteCasesFlag = false;

View File

@@ -1,5 +1,8 @@
<?php
global $G_FORM;
use ProcessMaker\Core\System;
$sPRO_UID = $oData->PRO_UID;
$sTASKS = $oData->TASKS;
$sDYNAFORM = $oData->DYNAFORM;
@@ -86,7 +89,7 @@ try {
$template->assign( 'dynaform', $dynTitle );
$template->assign( 'timestamp', date( 'l jS \of F Y h:i:s A' ) );
$template->assign( 'ws', SYS_SYS );
$template->assign( 'version', PmSystem::getVersion() );
$template->assign( 'version', System::getVersion() );
$fileName = $pathProcess . $dynTitle . 'Post.php';
file_put_contents( $fileName, $template->getOutputContent() );

View File

@@ -2,6 +2,8 @@
global $RBAC;
use ProcessMaker\Core\System;
if ($RBAC->userCanAccess("PM_SETUP") != 1) {
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
exit(0);
@@ -62,7 +64,7 @@ $cronInfo["fileLogSize"] = $fileLogSize;
$cronInfo["fileLogPath"] = $fileLog;
//Workspaces
$workspaces = PmSystem::listWorkspaces();
$workspaces = System::listWorkspaces();
$arrayAux = array ();
foreach ($workspaces as $index => $workspace) {

View File

@@ -21,7 +21,9 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
use ProcessMaker\Core\System;
$filter = new InputFilter();
$_POST = $filter->xssFilterHard($_POST);
@@ -252,7 +254,7 @@ function sendTestMail ()
<tbody><tr><td><img id='logo' src='http://" . $_SERVER['SERVER_NAME'] . "/images/processmaker.logo.jpg' /></td></tr>
<tr><td style='font-size: 14px;'>$msg [" . date( 'H:i:s' ) . "] - $engine</td></tr>
<tr><td style='vertical-align:middel;'>
<br /><hr><b>This Business Process is powered by ProcessMaker ver. " . PmSystem::getVersion() . ".<b><br />
<br /><hr><b>This Business Process is powered by ProcessMaker ver. " . System::getVersion() . ".<b><br />
<a href='http://www.processmaker.com' style='color:#c40000;'>www.processmaker.com</a><br /></td>
</tr></tbody></table>";

View File

@@ -23,6 +23,8 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
global $RBAC;
@@ -279,8 +281,8 @@ try {
$oClass->iPMVersion = 0;
}
if ($oClass->iPMVersion > 0) {
if (PmSystem::getVersion() > 0) {
if ($oClass->iPMVersion > PmSystem::getVersion()) {
if (System::getVersion() > 0) {
if ($oClass->iPMVersion > System::getVersion()) {
//throw new Exception('This plugin needs version ' . $oClass->iPMVersion . ' or higher of ProcessMaker');
}
}

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Core\System;
if (! isset( $_REQUEST['action'] )) {
$res['success'] = false;
$res['error'] = $res['message'] = G::LoadTranslation('ID_REQUEST_ACTION');
@@ -46,7 +49,7 @@ function skinList ()
$textFilter = '';
}
$skinList = PmSystem::getSkingList();
$skinList = System::getSkingList();
$wildcard = '';
if (isset( $_REQUEST['activeskin'] )) {
$wildcard = '@';

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Core\System;
/**
* skinsExport.php
*
@@ -150,7 +152,7 @@ G::mk_dir( $pathPublic . 'images' );
$fields['className'] = $id;
$fields['version'] = $oConf->version;
$fields['description'] = $oConf->description;
$fields['PMversion'] = PmSystem::getVersion();
$fields['PMversion'] = System::getVersion();
savePluginFile( 'skinPluginMainClass', $pathHome . $id . '.php', $fields );
savePluginFile( 'skinPluginClass', $pathBase . 'class.' . $id . '.php', $fields );

View File

@@ -21,7 +21,11 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
global
use ProcessMaker\Core\System;
$RBAC;
$access = $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' );
if ($access != 1) {
switch ($access) {
@@ -61,7 +65,7 @@ $G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
$Fields['PM_VERSION'] = PmSystem::getVersion();
$Fields['PM_VERSION'] = System::getVersion();
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_PUBLISH = new Publisher();

View File

@@ -22,6 +22,8 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
use ProcessMaker\Core\System;
/**
* New System Upgrade controller
*
@@ -49,7 +51,7 @@ $G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
require_once "classes/class.system.php";
$oSystem = new PmSystem();
$oSystem = new System();
try {
if (! $oSystem->verifyFileForUpgrade()) {

View File

@@ -21,6 +21,9 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
use ProcessMaker\Core\System;
ini_set( "soap.wsdl_cache_enabled", "0" ); // enabling WSDL cache
$filter = new InputFilter();
@@ -149,7 +152,7 @@ try {
//Apply proxy settings
$proxy = array ();
$sysConf = PmSystem::getSystemConfiguration();
$sysConf = System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$proxy['proxy_host'] = $sysConf['proxy_host'];
if ($sysConf['proxy_port'] != '') {

View File

@@ -1,5 +1,7 @@
<?php
//calculating the max upload file size;
use ProcessMaker\Core\System;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
@@ -17,7 +19,7 @@ if ($postMaxSize < $uploadMaxSize) {
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
$sysConf = PmSystem::getSystemConfiguration($envFile);
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = abs($sysConf['expiration_year']);
}
@@ -31,7 +33,7 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js

View File

@@ -1,6 +1,8 @@
<?php
global $RBAC;
use ProcessMaker\Core\System;
require_once 'classes/model/Users.php';
unset( $_SESSION['CURRENT_USER'] );
$oUser = new Users();
@@ -32,7 +34,7 @@ if ($postMaxSize < $uploadMaxSize) {
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
$sysConf = PmSystem::getSystemConfiguration($envFile);
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = abs($sysConf['expiration_year']);
}
@@ -46,7 +48,7 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js

View File

@@ -1,5 +1,8 @@
<?php
global $RBAC;
use ProcessMaker\Core\System;
$RBAC->requirePermissions( 'PM_USERS' );
//calculating the max upload file size;
@@ -20,7 +23,7 @@ if ($postMaxSize < $uploadMaxSize) {
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
$sysConf = PmSystem::getSystemConfiguration($envFile);
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = abs($sysConf['expiration_year']);
}
@@ -35,7 +38,7 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js

View File

@@ -7,6 +7,7 @@
* @author Hugo Loza
*/
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
define('SE_LAYOUT_NOT_FOUND', 6);
@@ -44,7 +45,7 @@ class SkinEngine
$this->content = $content;
$this->skinVariants = array('blank','extjs','raw','tracker','submenu');
$this->skinsBasePath = G::ExpandPath("skinEngine");
$sysConf = PmSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$sysConf = System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$this->skinDefault = (isset($sysConf['default_skin']) && $sysConf['default_skin'] != '') ? $sysConf['default_skin'] : 'classic';
$this->_init();
}

View File

@@ -408,7 +408,7 @@ class ActionsByEmail
$arrayConfigAux = $row;
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
}
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \PmSystem::getEmailConfiguration();
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \ProcessMaker\Core\System::getEmailConfiguration();
$spool = new SpoolRun();
$spool->setConfig($aSetup);

View File

@@ -184,7 +184,7 @@ class Cases
{
try {
$solrEnabled = false;
$solrConf = \PmSystem::solrEnv();
$solrConf = \ProcessMaker\Core\System::solrEnv();
if ($solrConf !== false) {
$ApplicationSolrIndex = new \AppSolr(
@@ -376,7 +376,7 @@ class Cases
{
try {
$solrEnabled = 0;
if (($solrEnv = \PmSystem::solrEnv()) !== false) {
if (($solrEnv = \ProcessMaker\Core\System::solrEnv()) !== false) {
$appSolr = new \AppSolr(
$solrEnv["solr_enabled"],
$solrEnv["solr_host"],

View File

@@ -182,7 +182,7 @@ class EmailServer
$sBodyPre->prepare();
$sBodyPre->assign("server", $_SERVER["SERVER_NAME"]);
$sBodyPre->assign("date", date("H:i:s"));
$sBodyPre->assign("ver", \PmSystem::getVersion());
$sBodyPre->assign("ver", \ProcessMaker\Core\System::getVersion());
$sBodyPre->assign("engine", $engine);
$sBodyPre->assign("msg", $msg);
$sBody = $sBodyPre->getOutputContent();

View File

@@ -1260,7 +1260,7 @@ class Light
$offset = timezone_offset_get( new \DateTimeZone( $tz ), new \DateTime() );
$response['timeZone'] = sprintf( "GMT%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( ($offset % 3600) / 60 ) );
$response['multiTimeZone'] = $multiTimeZone;
$fields = \PmSystem::getSysInfo();
$fields = \ProcessMaker\Core\System::getSysInfo();
$response['version'] = $fields['PM_VERSION'];
$buildType = 'Community';

View File

@@ -11,7 +11,7 @@ class NotificationDevice
public function checkMobileNotifications()
{
$conf = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$conf = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
$activeNotifications = true;
if (isset($conf['mobileNotifications'])) {
$activeNotifications = $conf['mobileNotifications'] == 1 ? true : false;

View File

@@ -54,7 +54,7 @@ class PushMessageAndroid
*/
public function setSettingNotification()
{
$conf = \PmSystem::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$conf = \ProcessMaker\Core\System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['android']['url']);
$this->setKey($conf['android']['serverApiKey']);
}

View File

@@ -67,7 +67,7 @@ class PushMessageIOS
*/
public function setSettingNotification()
{
$conf = \PmSystem::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$conf = \ProcessMaker\Core\System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['apple']['url']);
$this->setKey($conf['apple']['passphrase']);
$this->setPemFile($conf['apple']['pemFile']);

View File

@@ -134,7 +134,7 @@ class GranularExporter
$data["version"] = "3.1";
$data["container"] = "ProcessMaker-Project";
$data["metadata"] = array(
"vendor_version" => \PmSystem::getVersion(),
"vendor_version" => \ProcessMaker\Core\System::getVersion(),
"vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -30,7 +30,7 @@ class Pmgmail {
//getting the skin
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php");
$sysConf = new \PmSystem();
$sysConf = new \ProcessMaker\Core\System();
$responseSysConfig = $sysConf->getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$response['enviroment'] = $responseSysConfig['default_skin'];

View File

@@ -1,7 +1,7 @@
<?php
namespace ProcessMaker\BusinessModel;
use PmSystem;
use ProcessMaker\Core\System;
use Exception;
use G;
@@ -18,7 +18,7 @@ class Skins
*/
public function getSkins()
{
$list = PmSystem::getSkingList();
$list = System::getSkingList();
return $list['skins'];
}

View File

@@ -453,7 +453,7 @@ class WebEntry
$template->assign("dynaform", empty($arrayDynaFormData) ? '' : $arrayDynaFormData["DYN_TITLE"]);
$template->assign("timestamp", date("l jS \of F Y h:i:s A"));
$template->assign("ws", $this->sysSys);
$template->assign("version", \PmSystem::getVersion());
$template->assign("version", \ProcessMaker\Core\System::getVersion());
$fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php";

View File

@@ -39,7 +39,7 @@ abstract class Exporter
$this->projectData = $this->bpmnProject->getProject();
$this->metadata = array(
"vendor_version" => \PmSystem::getVersion(),
"vendor_version" => \ProcessMaker\Core\System::getVersion(),
"vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -10,7 +10,7 @@ use InputFilter;
use Language;
use PEAR;
use PluginsRegistry;
use PmSystem;
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\Adapters\PluginAdapter;
use ProcessMaker\Plugins\Interfaces\CaseSchedulerPlugin;
use ProcessMaker\Plugins\Interfaces\CronFile;
@@ -33,7 +33,6 @@ use ProcessMaker\Plugins\Traits\Attributes;
use ProcessMaker\Plugins\Traits\PluginStructure;
use Publisher;
use stdClass;
use System;
/**
* Class PluginRegistry
@@ -428,7 +427,7 @@ class PluginRegistry
*/
public function uninstallPluginWorkspaces($arrayPlugin)
{
$workspace = PmSystem::listWorkspaces();
$workspace = System::listWorkspaces();
foreach ($workspace as $indexWS => $ws) {
$pluginRegistry = PluginRegistry::loadSingleton();
@@ -1392,7 +1391,7 @@ class PluginRegistry
) {
$arrayWorkspace = array();
foreach (PmSystem::listWorkspaces() as $value) {
foreach (System::listWorkspaces() as $value) {
$workspaceTools = $value;
$arrayWorkspace[] = $workspaceTools->name;

View File

@@ -110,21 +110,21 @@ abstract class Handler
*/
public static function logstr($str)
{
if (\PmSystem::isDebugMode()) {
if (\ProcessMaker\Core\System::isDebugMode()) {
Logger::getInstance()->setLog($str);
}
}
public static function logInline()
{
if (\PmSystem::isDebugMode()) {
if (\ProcessMaker\Core\System::isDebugMode()) {
call_user_func_array(array(Logger::getInstance(), 'setLogInline'), func_get_args());
}
}
public static function log()
{
if (\PmSystem::isDebugMode()) {
if (\ProcessMaker\Core\System::isDebugMode()) {
$logger = Logger::getInstance();
call_user_func_array(array($logger, 'setLogLine'), func_get_args());
}

View File

@@ -371,7 +371,7 @@ class Server implements iAuthenticate
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
$userTimeZone = $arraySystemConfiguration['time_zone'];
}

View File

@@ -26,7 +26,7 @@ class System
public static function getTimeZone()
{
try {
$arraySystemConfiguration = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
//Return
return $arraySystemConfiguration['time_zone'];