Add changeo

This commit is contained in:
Marco A. Nina Mena
2017-08-14 16:37:50 -04:00
parent ee5a124bba
commit bd9d9a8717
16 changed files with 38 additions and 38 deletions

View File

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

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel; namespace ProcessMaker\BusinessModel;
use Processmaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry; use ProcessMaker\Plugins\PluginRegistry;
use PmDynaform; use PmDynaform;
use SpoolRun; use SpoolRun;
@@ -408,7 +409,7 @@ class ActionsByEmail
$arrayConfigAux = $row; $arrayConfigAux = $row;
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"]; $arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
} }
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \ProcessMaker\Core\System::getEmailConfiguration(); $aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : System::getEmailConfiguration();
$spool = new SpoolRun(); $spool = new SpoolRun();
$spool->setConfig($aSetup); $spool->setConfig($aSetup);

View File

@@ -5,6 +5,7 @@ use G;
use UsersPeer; use UsersPeer;
use CasesPeer; use CasesPeer;
use AppDelegation; use AppDelegation;
use Processmaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry; use ProcessMaker\Plugins\PluginRegistry;
use Exception; use Exception;
use WsBase; use WsBase;
@@ -184,7 +185,7 @@ class Cases
{ {
try { try {
$solrEnabled = false; $solrEnabled = false;
$solrConf = \ProcessMaker\Core\System::solrEnv(); $solrConf = System::solrEnv();
if ($solrConf !== false) { if ($solrConf !== false) {
$ApplicationSolrIndex = new \AppSolr( $ApplicationSolrIndex = new \AppSolr(
@@ -376,7 +377,7 @@ class Cases
{ {
try { try {
$solrEnabled = 0; $solrEnabled = 0;
if (($solrEnv = \ProcessMaker\Core\System::solrEnv()) !== false) { if (($solrEnv = System::solrEnv()) !== false) {
$appSolr = new \AppSolr( $appSolr = new \AppSolr(
$solrEnv["solr_enabled"], $solrEnv["solr_enabled"],
$solrEnv["solr_host"], $solrEnv["solr_host"],

View File

@@ -4,6 +4,7 @@ use G;
use Exception; use Exception;
use Bootstrap; use Bootstrap;
use SpoolRun; use SpoolRun;
use Processmaker\Core\System;
class EmailServer class EmailServer
{ {
@@ -182,7 +183,7 @@ class EmailServer
$sBodyPre->prepare(); $sBodyPre->prepare();
$sBodyPre->assign("server", $_SERVER["SERVER_NAME"]); $sBodyPre->assign("server", $_SERVER["SERVER_NAME"]);
$sBodyPre->assign("date", date("H:i:s")); $sBodyPre->assign("date", date("H:i:s"));
$sBodyPre->assign("ver", \ProcessMaker\Core\System::getVersion()); $sBodyPre->assign("ver", System::getVersion());
$sBodyPre->assign("engine", $engine); $sBodyPre->assign("engine", $engine);
$sBodyPre->assign("msg", $msg); $sBodyPre->assign("msg", $msg);
$sBody = $sBodyPre->getOutputContent(); $sBody = $sBodyPre->getOutputContent();

View File

@@ -7,6 +7,7 @@ use Criteria;
use UsersPeer; use UsersPeer;
use AppDelegationPeer; use AppDelegationPeer;
use AppDelayPeer; use AppDelayPeer;
use Processmaker\Core\System;
use ProcessMaker\Util\DateTime; use ProcessMaker\Util\DateTime;
use PmLicenseManager; use PmLicenseManager;
@@ -1260,7 +1261,7 @@ class Light
$offset = timezone_offset_get( new \DateTimeZone( $tz ), new \DateTime() ); $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['timeZone'] = sprintf( "GMT%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( ($offset % 3600) / 60 ) );
$response['multiTimeZone'] = $multiTimeZone; $response['multiTimeZone'] = $multiTimeZone;
$fields = \ProcessMaker\Core\System::getSysInfo(); $fields = System::getSysInfo();
$response['version'] = $fields['PM_VERSION']; $response['version'] = $fields['PM_VERSION'];
$buildType = 'Community'; $buildType = 'Community';

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel\Light; namespace ProcessMaker\BusinessModel\Light;
use Processmaker\Core\System;
use \ProcessMaker\Services\Api; use \ProcessMaker\Services\Api;
use G; use G;
@@ -11,7 +12,7 @@ class NotificationDevice
public function checkMobileNotifications() public function checkMobileNotifications()
{ {
$conf = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS); $conf = System::getSystemConfiguration('', '', SYS_SYS);
$activeNotifications = true; $activeNotifications = true;
if (isset($conf['mobileNotifications'])) { if (isset($conf['mobileNotifications'])) {
$activeNotifications = $conf['mobileNotifications'] == 1 ? true : false; $activeNotifications = $conf['mobileNotifications'] == 1 ? true : false;

View File

@@ -13,6 +13,8 @@
namespace ProcessMaker\BusinessModel\Light; namespace ProcessMaker\BusinessModel\Light;
use Processmaker\Core\System;
class PushMessageAndroid class PushMessageAndroid
{ {
private $url = 'https://android.googleapis.com/gcm/send'; private $url = 'https://android.googleapis.com/gcm/send';
@@ -54,7 +56,7 @@ class PushMessageAndroid
*/ */
public function setSettingNotification() public function setSettingNotification()
{ {
$conf = \ProcessMaker\Core\System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini'); $conf = System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['android']['url']); $this->setUrl($conf['android']['url']);
$this->setKey($conf['android']['serverApiKey']); $this->setKey($conf['android']['serverApiKey']);
} }

View File

@@ -12,6 +12,8 @@
namespace ProcessMaker\BusinessModel\Light; namespace ProcessMaker\BusinessModel\Light;
use Processmaker\Core\System;
class PushMessageIOS class PushMessageIOS
{ {
private $url = 'ssl://gateway.sandbox.push.apple.com:2195'; private $url = 'ssl://gateway.sandbox.push.apple.com:2195';
@@ -67,7 +69,7 @@ class PushMessageIOS
*/ */
public function setSettingNotification() public function setSettingNotification()
{ {
$conf = \ProcessMaker\Core\System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini'); $conf = System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['apple']['url']); $this->setUrl($conf['apple']['url']);
$this->setKey($conf['apple']['passphrase']); $this->setKey($conf['apple']['passphrase']);
$this->setPemFile($conf['apple']['pemFile']); $this->setPemFile($conf['apple']['pemFile']);

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel\Migrator; namespace ProcessMaker\BusinessModel\Migrator;
use Processmaker\Core\System;
use ProcessMaker\Project; use ProcessMaker\Project;
use ProcessMaker\Util\Common; use ProcessMaker\Util\Common;
@@ -134,7 +135,7 @@ class GranularExporter
$data["version"] = "3.1"; $data["version"] = "3.1";
$data["container"] = "ProcessMaker-Project"; $data["container"] = "ProcessMaker-Project";
$data["metadata"] = array( $data["metadata"] = array(
"vendor_version" => \ProcessMaker\Core\System::getVersion(), "vendor_version" => System::getVersion(),
"vendor_version_code" => "Michelangelo", "vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"), "export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"), "export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -1,12 +1,12 @@
<?php <?php
namespace ProcessMaker\BusinessModel; namespace ProcessMaker\BusinessModel;
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "Task.php");
use \G; use \G;
use \Criteria; use \Criteria;
use \UsersPeer; use \UsersPeer;
use \GroupUserPeer; use \GroupUserPeer;
use \ResultSet; use \ResultSet;
use Processmaker\Core\System;
/** /**
* @copyright Colosa - Bolivia * @copyright Colosa - Bolivia
@@ -30,7 +30,7 @@ class Pmgmail {
//getting the skin //getting the skin
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php"); require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php");
$sysConf = new \ProcessMaker\Core\System(); $sysConf = System();
$responseSysConfig = $sysConf->getSystemConfiguration( PATH_CONFIG . 'env.ini' ); $responseSysConfig = $sysConf->getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$response['enviroment'] = $responseSysConfig['default_skin']; $response['enviroment'] = $responseSysConfig['default_skin'];

View File

@@ -1,6 +1,8 @@
<?php <?php
namespace ProcessMaker\BusinessModel; namespace ProcessMaker\BusinessModel;
use Processmaker\Core\System;
class WebEntry class WebEntry
{ {
private $arrayFieldDefinition = array( private $arrayFieldDefinition = array(
@@ -453,7 +455,7 @@ class WebEntry
$template->assign("dynaform", empty($arrayDynaFormData) ? '' : $arrayDynaFormData["DYN_TITLE"]); $template->assign("dynaform", empty($arrayDynaFormData) ? '' : $arrayDynaFormData["DYN_TITLE"]);
$template->assign("timestamp", date("l jS \of F Y h:i:s A")); $template->assign("timestamp", date("l jS \of F Y h:i:s A"));
$template->assign("ws", $this->sysSys); $template->assign("ws", $this->sysSys);
$template->assign("version", \ProcessMaker\Core\System::getVersion()); $template->assign("version", System::getVersion());
$fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php"; $fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php";

View File

@@ -10,15 +10,6 @@ use InputFilter;
use schema; use schema;
use WorkspaceTools; use WorkspaceTools;
/**
* class Processmaker System for workflow mantanance routines
*
* date May 12th, 2010
*
* @package workflow.engine.classes
*
*/
class System class System
{ {
public $sFilename; public $sFilename;

View File

@@ -1,6 +1,7 @@
<?php <?php
namespace ProcessMaker\Exporter; namespace ProcessMaker\Exporter;
use Processmaker\Core\System;
use ProcessMaker\Project; use ProcessMaker\Project;
use ProcessMaker\Util; use ProcessMaker\Util;
@@ -39,7 +40,7 @@ abstract class Exporter
$this->projectData = $this->bpmnProject->getProject(); $this->projectData = $this->bpmnProject->getProject();
$this->metadata = array( $this->metadata = array(
"vendor_version" => \ProcessMaker\Core\System::getVersion(), "vendor_version" => System::getVersion(),
"vendor_version_code" => "Michelangelo", "vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"), "export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"), "export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -1,6 +1,7 @@
<?php <?php
namespace ProcessMaker\Project; namespace ProcessMaker\Project;
use Processmaker\Core\System;
use ProcessMaker\Util\Logger; use ProcessMaker\Util\Logger;
/** /**
@@ -110,21 +111,21 @@ abstract class Handler
*/ */
public static function logstr($str) public static function logstr($str)
{ {
if (\ProcessMaker\Core\System::isDebugMode()) { if (System::isDebugMode()) {
Logger::getInstance()->setLog($str); Logger::getInstance()->setLog($str);
} }
} }
public static function logInline() public static function logInline()
{ {
if (\ProcessMaker\Core\System::isDebugMode()) { if (System::isDebugMode()) {
call_user_func_array(array(Logger::getInstance(), 'setLogInline'), func_get_args()); call_user_func_array(array(Logger::getInstance(), 'setLogInline'), func_get_args());
} }
} }
public static function log() public static function log()
{ {
if (\ProcessMaker\Core\System::isDebugMode()) { if (System::isDebugMode()) {
$logger = Logger::getInstance(); $logger = Logger::getInstance();
call_user_func_array(array($logger, 'setLogLine'), func_get_args()); call_user_func_array(array($logger, 'setLogLine'), func_get_args());
} }

View File

@@ -3,15 +3,8 @@ namespace ProcessMaker\Services\OAuth2;
use Luracast\Restler\iAuthenticate; use Luracast\Restler\iAuthenticate;
use Luracast\Restler\RestException; use Luracast\Restler\RestException;
use Processmaker\Core\System;
/**
* Class Server
*
* @package OAuth2
* @author Erik Amaru Ortiz <aortiz.erik at gmail dot com>
*
*/
class Server implements iAuthenticate class Server implements iAuthenticate
{ {
/** /**
@@ -371,7 +364,7 @@ class Server implements iAuthenticate
$userTimeZone = $user->getUsrTimeZone(); $userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') { if (trim($userTimeZone) == '') {
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS); $arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$userTimeZone = $arraySystemConfiguration['time_zone']; $userTimeZone = $arraySystemConfiguration['time_zone'];
} }

View File

@@ -6,6 +6,7 @@ use Bootstrap;
use Exception; use Exception;
use Maveriks\Util\ClassLoader; use Maveriks\Util\ClassLoader;
use PMPlugin; use PMPlugin;
use Processmaker\Core\System AS PmSystem;
use ProcessMaker\Plugins\Interfaces\PluginDetail; use ProcessMaker\Plugins\Interfaces\PluginDetail;
use ProcessMaker\Plugins\PluginRegistry; use ProcessMaker\Plugins\PluginRegistry;
use ProcessMaker\Services\OAuth2\PmPdo; use ProcessMaker\Services\OAuth2\PmPdo;
@@ -26,7 +27,7 @@ class System
public static function getTimeZone() public static function getTimeZone()
{ {
try { try {
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS); $arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
//Return //Return
return $arraySystemConfiguration['time_zone']; return $arraySystemConfiguration['time_zone'];