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;
use Maveriks\Util;
use Processmaker\Core\System;
use ProcessMaker\Plugins\PluginRegistry;
use ProcessMaker\Services;
use ProcessMaker\Services\Api;
@@ -288,7 +289,7 @@ class WebApplication
Services\Api::setWorkspace(SYS_SYS);
$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;
$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);
G::defineConstants();
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration();
$arraySystemConfiguration = System::getSystemConfiguration();
ini_set('date.timezone', $arraySystemConfiguration['time_zone']); //Set Time Zone
@@ -502,7 +503,7 @@ class WebApplication
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
ini_set('display_errors', $arraySystemConfiguration['display_errors']);

View File

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

View File

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

View File

@@ -4,6 +4,7 @@ use G;
use Exception;
use Bootstrap;
use SpoolRun;
use Processmaker\Core\System;
class EmailServer
{
@@ -182,7 +183,7 @@ class EmailServer
$sBodyPre->prepare();
$sBodyPre->assign("server", $_SERVER["SERVER_NAME"]);
$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("msg", $msg);
$sBody = $sBodyPre->getOutputContent();

View File

@@ -7,6 +7,7 @@ use Criteria;
use UsersPeer;
use AppDelegationPeer;
use AppDelayPeer;
use Processmaker\Core\System;
use ProcessMaker\Util\DateTime;
use PmLicenseManager;
@@ -1260,7 +1261,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 = \ProcessMaker\Core\System::getSysInfo();
$fields = System::getSysInfo();
$response['version'] = $fields['PM_VERSION'];
$buildType = 'Community';

View File

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

View File

@@ -13,6 +13,8 @@
namespace ProcessMaker\BusinessModel\Light;
use Processmaker\Core\System;
class PushMessageAndroid
{
private $url = 'https://android.googleapis.com/gcm/send';
@@ -54,7 +56,7 @@ class PushMessageAndroid
*/
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->setKey($conf['android']['serverApiKey']);
}

View File

@@ -12,6 +12,8 @@
namespace ProcessMaker\BusinessModel\Light;
use Processmaker\Core\System;
class PushMessageIOS
{
private $url = 'ssl://gateway.sandbox.push.apple.com:2195';
@@ -67,7 +69,7 @@ class PushMessageIOS
*/
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->setKey($conf['apple']['passphrase']);
$this->setPemFile($conf['apple']['pemFile']);

View File

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

View File

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

View File

@@ -1,6 +1,8 @@
<?php
namespace ProcessMaker\BusinessModel;
use Processmaker\Core\System;
class WebEntry
{
private $arrayFieldDefinition = array(
@@ -453,7 +455,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", \ProcessMaker\Core\System::getVersion());
$template->assign("version", System::getVersion());
$fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php";

View File

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

View File

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

View File

@@ -1,6 +1,7 @@
<?php
namespace ProcessMaker\Project;
use Processmaker\Core\System;
use ProcessMaker\Util\Logger;
/**
@@ -110,21 +111,21 @@ abstract class Handler
*/
public static function logstr($str)
{
if (\ProcessMaker\Core\System::isDebugMode()) {
if (System::isDebugMode()) {
Logger::getInstance()->setLog($str);
}
}
public static function logInline()
{
if (\ProcessMaker\Core\System::isDebugMode()) {
if (System::isDebugMode()) {
call_user_func_array(array(Logger::getInstance(), 'setLogInline'), func_get_args());
}
}
public static function log()
{
if (\ProcessMaker\Core\System::isDebugMode()) {
if (System::isDebugMode()) {
$logger = Logger::getInstance();
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\RestException;
use Processmaker\Core\System;
/**
* Class Server
*
* @package OAuth2
* @author Erik Amaru Ortiz <aortiz.erik at gmail dot com>
*
*/
class Server implements iAuthenticate
{
/**
@@ -371,7 +364,7 @@ class Server implements iAuthenticate
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$userTimeZone = $arraySystemConfiguration['time_zone'];
}

View File

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