Fix PMSystem -> PmSystem since Processmaker is one word.
This commit is contained in:
davidcallizaya
2017-08-04 11:49:43 -04:00
parent bce594fe24
commit 44d60e96d9
86 changed files with 1332 additions and 1359 deletions

View File

@@ -1,346 +1,346 @@
<?php
/**
* Admin controller
*
* @access public
*/
class Admin extends Controller
{
/**
* UX - User experience
*/
public $debug = true;
public function system ()
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'main.php';
$skinsList = PMSystem::getSkingList();
foreach ($skinsList['skins'] as $key => $value) {
if ($value['SKIN_WORKSPACE'] != 'Global') {
unset( $skinsList['skins'][$key] );
}
}
$skins = array ();
$mainController = new Main();
$languagesList = $mainController->getLanguagesList();
$languagesList[] = array ("", G::LoadTranslation("ID_USE_LANGUAGE_URL"));
$sysConf = PMSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
foreach ($skinsList['skins'] as $skin) {
$skins[] = array ($skin['SKIN_FOLDER_ID'],$skin['SKIN_NAME']);
}
$this->includeExtJS( 'admin/system' );
// $c = new Configurations();
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
if (isset($sysConf["session.gc_maxlifetime"])) {
$sysConf["session_gc_maxlifetime"] = $sysConf["session.gc_maxlifetime"];
} else {
$sysConf["session_gc_maxlifetime"] = ini_get('session.gc_maxlifetime');
}
$this->setJSVar( 'skinsList', $skins );
$this->setJSVar( 'languagesList', $languagesList );
$this->setJSVar('timeZonesList', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$this->setJSVar( 'sysConf', $sysConf );
G::RenderPage( 'publish', 'extJs' );
}
public function uxList ()
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'adminProxy.php';
$this->includeExtJS( 'admin/uxUsersList' );
$c = new Configurations();
$configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->setJSVar( 'CONFIG', $Config );
$this->setJSVar( 'FORMATS', $c->getFormats() );
$this->setJSVar( 'uxTypes', AdminProxy::getUxTypesList( 'list' ) );
G::RenderPage( 'publish', 'extJs' );
}
/**
* CALENDAR
* getting default list
*
* @param string $httpData->PRO_UID (opional)
*/
public function calendarEdit ($httpData)
{
global $RBAC;
//$RBAC->requirePermissions('PM_SETUP_ADVANCE');
$CalendarUid = str_replace( '"', '', isset( $_GET['id'] ) ? $_GET['id'] : G::GenerateUniqueID() );
$calendarObj = new Calendar();
if ((isset( $_GET['id'] )) && ($_GET['id'] != "")) {
$fields = $calendarObj->getCalendarInfoE( $CalendarUid );
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
// For a new Calendar
if (! isset( $fields['CALENDAR_UID'] )) {
$fields['CALENDAR_UID'] = $CalendarUid;
$fields['OLD_NAME'] = '';
//Default Business Hour
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_DAY'] = 7;
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00";
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00";
}
// Copy Calendar
if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
$c = new Configurations();
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->includeExtJS( 'admin/calendarEdit' );
$this->setView( 'admin/calendarEdit' );
$businessDayArray = array ();
for ($i = 0; $i < sizeof( $fields['BUSINESS_DAY'] ); $i ++) {
$businessDayArray[$i] = $fields['BUSINESS_DAY'][$i + 1];
}
$fields['BUSINESS_DAY'] = $businessDayArray;
//validating if the calendar is new, it means that we don't have the $_GET array
$fields['HOLIDAY'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $fields['HOLIDAY'] : array ();
$holidayArray = array ();
for ($i = 0; $i < sizeof( $fields['HOLIDAY'] ); $i ++) {
$holidayArray[$i] = $fields['HOLIDAY'][$i + 1];
}
$_GET['id'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $_GET['id'] : '';
$fields['HOLIDAY'] = $holidayArray;
$fields['NEWCALENDAR'] = 'NO';
if (isset( $_GET['id'] ) && $_GET['id'] == '') {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['NEWCALENDAR'] = 'YES';
}
$this->setJSVar( 'CALENDAR_UID', $fields['CALENDAR_UID'] );
$this->setJSVar( 'fields', $fields );
G::RenderPage( 'publish', 'extJs' );
}
/**
* getting email configuration
* @autor Alvaro <alvaro@colosa.com>
*/
public function emails ()
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
$this->includeExtJS( 'admin/emails' );
//render content
G::RenderPage( 'publish', 'extJs' );
}
/**
* getting default list
*
* @param string $httpData->PRO_UID (opional)
*/
public function pmLogo ($httpData)
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE', 'PM_SETUP_LOGO');
$c = new Configurations();
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->includeExtJS( 'admin/pmLogo' );
$this->setView( 'admin/pmLogo' );
//assigning js variables
$this->setJSVar( 'FORMATS', $c->getFormats() );
$this->setJSVar( 'CONFIG', $Config );
$this->setJSVar( 'PRO_UID', isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : false );
if (isset( $_SESSION['_cache_pmtables'] )) {
unset( $_SESSION['_cache_pmtables'] );
}
if (isset( $_SESSION['ADD_TAB_UID'] )) {
unset( $_SESSION['ADD_TAB_UID'] );
}
//render content
G::RenderPage( 'publish', 'extJs' );
}
public function maintenance()
{
$this->setView('admin/maintenance');
$this->render('extJs');
}
function getSystemInfo ()
{
$this->setResponseType( 'json' );
$infoList = $this->_getSystemInfo();
$data = array ();
foreach ($infoList as $row) {
$data[] = array ('label' => $row[0],'value' => $row[1],'section' => $row[2]
);
}
return $data;
}
private function _getSystemInfo ()
{
if (getenv( 'HTTP_CLIENT_IP' )) {
$ip = getenv( 'HTTP_CLIENT_IP' );
} else {
if (getenv( 'HTTP_X_FORWARDED_FOR' )) {
$ip = getenv( 'HTTP_X_FORWARDED_FOR' );
} else {
$ip = getenv( 'REMOTE_ADDR' );
}
}
$redhat = '';
if (file_exists( '/etc/redhat-release' )) {
$fnewsize = filesize( '/etc/redhat-release' );
$fp = fopen( '/etc/redhat-release', 'r' );
$redhat = trim( fread( $fp, $fnewsize ) );
fclose( $fp );
}
$redhat .= " (" . PHP_OS . ")";
if (defined( "DB_HOST" )) {
$dbNetView = new NET( DB_HOST );
$dbNetView->loginDbServer( DB_USER, DB_PASS );
$dbConns = new dbConnections( '' );
$availdb = '';
foreach ($dbConns->getDbServicesAvailables() as $key => $val) {
if ($availdb != '') {
$availdb .= ', ';
}
$availdb .= $val['name'];
}
try {
$sMySQLVersion = $dbNetView->getDbServerVersion( DB_ADAPTER );
} catch (Exception $oException) {
$sMySQLVersion = '?????';
}
}
if (file_exists(PATH_HTML . "lib/versions")) {
$versions = json_decode(file_get_contents(PATH_HTML . "lib/versions"), true);
$pmuiVer = $versions["pmui_ver"];
$mafeVer = $versions["mafe_ver"];
$pmdynaformVer = $versions["pmdynaform_ver"];
} else {
$pmuiVer = $mafeVer = $pmdynaformVer = "(unknown)";
}
$sysSection = G::loadTranslation('ID_SYSTEM_INFO' );
$pmSection = G::LoadTranslation('ID_PROCESS_INFORMATION');
$properties = array ();
$ee = class_exists( 'pmLicenseManager' ) ? " - Enterprise Edition" : '';
$systemName = 'ProcessMaker';
if (defined('SYSTEM_NAME')) {
$systemName = SYSTEM_NAME;
}
$properties[] = array ($systemName. ' Ver.', PMSystem::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);
if (file_exists(PATH_DATA. 'log/upgrades.log')) {
$properties[] = array (G::LoadTranslation('ID_UPGRADES_PATCHES'), '<a href="#" onclick="showUpgradedLogs(); return false;">' . G::LoadTranslation( 'ID_UPGRADE_VIEW_LOG') . '</a>' ,$pmSection);
} else {
$properties[] = array (G::LoadTranslation('ID_UPGRADES_PATCHES'), G::LoadTranslation( 'ID_UPGRADE_NEVER_UPGRADE') ,$pmSection);
}
$properties[] = array (G::LoadTranslation('ID_OPERATING_SYSTEM') ,$redhat,$sysSection
);
$properties[] = array (G::LoadTranslation('ID_TIME_ZONE') ,(defined( 'TIME_ZONE' )) ? TIME_ZONE : "Unknown",$sysSection
);
$properties[] = array (G::LoadTranslation('ID_WEB_SERVER') ,getenv( 'SERVER_SOFTWARE' ),$sysSection
);
$properties[] = array (G::LoadTranslation('ID_SERVER_NAME') ,getenv( 'SERVER_NAME' ),$pmSection
);
$properties[] = array (G::LoadTranslation('ID_SERVER_IP') ,$this->lookup( $ip ),$sysSection
);
$properties[] = array (G::LoadTranslation('ID_PHP_VERSION') ,phpversion(),$sysSection
);
if (defined( "DB_HOST" )) {
$properties[] = array (G::LoadTranslation('ID_DATABASE') ,$dbNetView->dbName( DB_ADAPTER ) . ' (Version ' . $sMySQLVersion . ')',$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_SERVER') ,DB_HOST,$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_NAME') ,DB_NAME,$pmSection
);
$properties[] = array (G::LoadTranslation('ID_AVAILABLE_DB') ,$availdb,$sysSection
);
} else {
$properties[] = array (G::LoadTranslation('ID_DATABASE') ,"Not defined",$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_SERVER') ,"Not defined",$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_NAME') ,"Not defined",$pmSection
);
$properties[] = array (G::LoadTranslation('ID_AVAILABLE_DB') ,"Not defined",$sysSection
);
}
$properties[] = array ( G::LoadTranslation('ID_WORKSPACE') ,defined( "SYS_SYS" ) ? SYS_SYS : "Not defined",$pmSection
);
$properties[] = array ( G::LoadTranslation('ID_SERVER_PROTOCOL') ,getenv( 'SERVER_PROTOCOL' ),$sysSection
);
$properties[] = array ( G::LoadTranslation('ID_SERVER_PORT') ,getenv( 'SERVER_PORT' ),$sysSection
);
//$sysSection[] = array('Remote Host', getenv ('REMOTE_HOST'), $sysSection);
$properties[] = array ( G::LoadTranslation('ID_SERVER_NAME') , getenv( 'SERVER_ADDR' ),$sysSection
);
$properties[] = array ( G::LoadTranslation('ID_USER_BROWSER') , getenv( 'HTTP_USER_AGENT' ),$sysSection
);
return $properties;
}
private function lookup ($target)
{
global $ntarget;
$msg = $target . ' => ';
//if (eregi ('[a-zA-Z]', $target))
if (preg_match( '[a-zA-Z]', $target )) {
//Made compatible to PHP 5.3
$ntarget = gethostbyname( $target );
} else {
$ntarget = gethostbyaddr( $target );
}
$msg .= $ntarget;
return ($msg);
}
}
<?php
/**
* Admin controller
*
* @access public
*/
class Admin extends Controller
{
/**
* UX - User experience
*/
public $debug = true;
public function system ()
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'main.php';
$skinsList = PmSystem::getSkingList();
foreach ($skinsList['skins'] as $key => $value) {
if ($value['SKIN_WORKSPACE'] != 'Global') {
unset( $skinsList['skins'][$key] );
}
}
$skins = array ();
$mainController = new Main();
$languagesList = $mainController->getLanguagesList();
$languagesList[] = array ("", G::LoadTranslation("ID_USE_LANGUAGE_URL"));
$sysConf = PmSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
foreach ($skinsList['skins'] as $skin) {
$skins[] = array ($skin['SKIN_FOLDER_ID'],$skin['SKIN_NAME']);
}
$this->includeExtJS( 'admin/system' );
// $c = new Configurations();
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
if (isset($sysConf["session.gc_maxlifetime"])) {
$sysConf["session_gc_maxlifetime"] = $sysConf["session.gc_maxlifetime"];
} else {
$sysConf["session_gc_maxlifetime"] = ini_get('session.gc_maxlifetime');
}
$this->setJSVar( 'skinsList', $skins );
$this->setJSVar( 'languagesList', $languagesList );
$this->setJSVar('timeZonesList', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$this->setJSVar( 'sysConf', $sysConf );
G::RenderPage( 'publish', 'extJs' );
}
public function uxList ()
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'adminProxy.php';
$this->includeExtJS( 'admin/uxUsersList' );
$c = new Configurations();
$configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->setJSVar( 'CONFIG', $Config );
$this->setJSVar( 'FORMATS', $c->getFormats() );
$this->setJSVar( 'uxTypes', AdminProxy::getUxTypesList( 'list' ) );
G::RenderPage( 'publish', 'extJs' );
}
/**
* CALENDAR
* getting default list
*
* @param string $httpData->PRO_UID (opional)
*/
public function calendarEdit ($httpData)
{
global $RBAC;
//$RBAC->requirePermissions('PM_SETUP_ADVANCE');
$CalendarUid = str_replace( '"', '', isset( $_GET['id'] ) ? $_GET['id'] : G::GenerateUniqueID() );
$calendarObj = new Calendar();
if ((isset( $_GET['id'] )) && ($_GET['id'] != "")) {
$fields = $calendarObj->getCalendarInfoE( $CalendarUid );
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
// For a new Calendar
if (! isset( $fields['CALENDAR_UID'] )) {
$fields['CALENDAR_UID'] = $CalendarUid;
$fields['OLD_NAME'] = '';
//Default Business Hour
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_DAY'] = 7;
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00";
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00";
}
// Copy Calendar
if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
$c = new Configurations();
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->includeExtJS( 'admin/calendarEdit' );
$this->setView( 'admin/calendarEdit' );
$businessDayArray = array ();
for ($i = 0; $i < sizeof( $fields['BUSINESS_DAY'] ); $i ++) {
$businessDayArray[$i] = $fields['BUSINESS_DAY'][$i + 1];
}
$fields['BUSINESS_DAY'] = $businessDayArray;
//validating if the calendar is new, it means that we don't have the $_GET array
$fields['HOLIDAY'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $fields['HOLIDAY'] : array ();
$holidayArray = array ();
for ($i = 0; $i < sizeof( $fields['HOLIDAY'] ); $i ++) {
$holidayArray[$i] = $fields['HOLIDAY'][$i + 1];
}
$_GET['id'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $_GET['id'] : '';
$fields['HOLIDAY'] = $holidayArray;
$fields['NEWCALENDAR'] = 'NO';
if (isset( $_GET['id'] ) && $_GET['id'] == '') {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['NEWCALENDAR'] = 'YES';
}
$this->setJSVar( 'CALENDAR_UID', $fields['CALENDAR_UID'] );
$this->setJSVar( 'fields', $fields );
G::RenderPage( 'publish', 'extJs' );
}
/**
* getting email configuration
* @autor Alvaro <alvaro@colosa.com>
*/
public function emails ()
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
$this->includeExtJS( 'admin/emails' );
//render content
G::RenderPage( 'publish', 'extJs' );
}
/**
* getting default list
*
* @param string $httpData->PRO_UID (opional)
*/
public function pmLogo ($httpData)
{
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE', 'PM_SETUP_LOGO');
$c = new Configurations();
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->includeExtJS( 'admin/pmLogo' );
$this->setView( 'admin/pmLogo' );
//assigning js variables
$this->setJSVar( 'FORMATS', $c->getFormats() );
$this->setJSVar( 'CONFIG', $Config );
$this->setJSVar( 'PRO_UID', isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : false );
if (isset( $_SESSION['_cache_pmtables'] )) {
unset( $_SESSION['_cache_pmtables'] );
}
if (isset( $_SESSION['ADD_TAB_UID'] )) {
unset( $_SESSION['ADD_TAB_UID'] );
}
//render content
G::RenderPage( 'publish', 'extJs' );
}
public function maintenance()
{
$this->setView('admin/maintenance');
$this->render('extJs');
}
function getSystemInfo ()
{
$this->setResponseType( 'json' );
$infoList = $this->_getSystemInfo();
$data = array ();
foreach ($infoList as $row) {
$data[] = array ('label' => $row[0],'value' => $row[1],'section' => $row[2]
);
}
return $data;
}
private function _getSystemInfo ()
{
if (getenv( 'HTTP_CLIENT_IP' )) {
$ip = getenv( 'HTTP_CLIENT_IP' );
} else {
if (getenv( 'HTTP_X_FORWARDED_FOR' )) {
$ip = getenv( 'HTTP_X_FORWARDED_FOR' );
} else {
$ip = getenv( 'REMOTE_ADDR' );
}
}
$redhat = '';
if (file_exists( '/etc/redhat-release' )) {
$fnewsize = filesize( '/etc/redhat-release' );
$fp = fopen( '/etc/redhat-release', 'r' );
$redhat = trim( fread( $fp, $fnewsize ) );
fclose( $fp );
}
$redhat .= " (" . PHP_OS . ")";
if (defined( "DB_HOST" )) {
$dbNetView = new NET( DB_HOST );
$dbNetView->loginDbServer( DB_USER, DB_PASS );
$dbConns = new dbConnections( '' );
$availdb = '';
foreach ($dbConns->getDbServicesAvailables() as $key => $val) {
if ($availdb != '') {
$availdb .= ', ';
}
$availdb .= $val['name'];
}
try {
$sMySQLVersion = $dbNetView->getDbServerVersion( DB_ADAPTER );
} catch (Exception $oException) {
$sMySQLVersion = '?????';
}
}
if (file_exists(PATH_HTML . "lib/versions")) {
$versions = json_decode(file_get_contents(PATH_HTML . "lib/versions"), true);
$pmuiVer = $versions["pmui_ver"];
$mafeVer = $versions["mafe_ver"];
$pmdynaformVer = $versions["pmdynaform_ver"];
} else {
$pmuiVer = $mafeVer = $pmdynaformVer = "(unknown)";
}
$sysSection = G::loadTranslation('ID_SYSTEM_INFO' );
$pmSection = G::LoadTranslation('ID_PROCESS_INFORMATION');
$properties = array ();
$ee = class_exists( 'pmLicenseManager' ) ? " - Enterprise Edition" : '';
$systemName = 'ProcessMaker';
if (defined('SYSTEM_NAME')) {
$systemName = SYSTEM_NAME;
}
$properties[] = array ($systemName. ' Ver.', PmSystem::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);
if (file_exists(PATH_DATA. 'log/upgrades.log')) {
$properties[] = array (G::LoadTranslation('ID_UPGRADES_PATCHES'), '<a href="#" onclick="showUpgradedLogs(); return false;">' . G::LoadTranslation( 'ID_UPGRADE_VIEW_LOG') . '</a>' ,$pmSection);
} else {
$properties[] = array (G::LoadTranslation('ID_UPGRADES_PATCHES'), G::LoadTranslation( 'ID_UPGRADE_NEVER_UPGRADE') ,$pmSection);
}
$properties[] = array (G::LoadTranslation('ID_OPERATING_SYSTEM') ,$redhat,$sysSection
);
$properties[] = array (G::LoadTranslation('ID_TIME_ZONE') ,(defined( 'TIME_ZONE' )) ? TIME_ZONE : "Unknown",$sysSection
);
$properties[] = array (G::LoadTranslation('ID_WEB_SERVER') ,getenv( 'SERVER_SOFTWARE' ),$sysSection
);
$properties[] = array (G::LoadTranslation('ID_SERVER_NAME') ,getenv( 'SERVER_NAME' ),$pmSection
);
$properties[] = array (G::LoadTranslation('ID_SERVER_IP') ,$this->lookup( $ip ),$sysSection
);
$properties[] = array (G::LoadTranslation('ID_PHP_VERSION') ,phpversion(),$sysSection
);
if (defined( "DB_HOST" )) {
$properties[] = array (G::LoadTranslation('ID_DATABASE') ,$dbNetView->dbName( DB_ADAPTER ) . ' (Version ' . $sMySQLVersion . ')',$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_SERVER') ,DB_HOST,$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_NAME') ,DB_NAME,$pmSection
);
$properties[] = array (G::LoadTranslation('ID_AVAILABLE_DB') ,$availdb,$sysSection
);
} else {
$properties[] = array (G::LoadTranslation('ID_DATABASE') ,"Not defined",$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_SERVER') ,"Not defined",$pmSection
);
$properties[] = array (G::LoadTranslation('ID_DATABASE_NAME') ,"Not defined",$pmSection
);
$properties[] = array (G::LoadTranslation('ID_AVAILABLE_DB') ,"Not defined",$sysSection
);
}
$properties[] = array ( G::LoadTranslation('ID_WORKSPACE') ,defined( "SYS_SYS" ) ? SYS_SYS : "Not defined",$pmSection
);
$properties[] = array ( G::LoadTranslation('ID_SERVER_PROTOCOL') ,getenv( 'SERVER_PROTOCOL' ),$sysSection
);
$properties[] = array ( G::LoadTranslation('ID_SERVER_PORT') ,getenv( 'SERVER_PORT' ),$sysSection
);
//$sysSection[] = array('Remote Host', getenv ('REMOTE_HOST'), $sysSection);
$properties[] = array ( G::LoadTranslation('ID_SERVER_NAME') , getenv( 'SERVER_ADDR' ),$sysSection
);
$properties[] = array ( G::LoadTranslation('ID_USER_BROWSER') , getenv( 'HTTP_USER_AGENT' ),$sysSection
);
return $properties;
}
private function lookup ($target)
{
global $ntarget;
$msg = $target . ' => ';
//if (eregi ('[a-zA-Z]', $target))
if (preg_match( '[a-zA-Z]', $target )) {
//Made compatible to PHP 5.3
$ntarget = gethostbyname( $target );
} else {
$ntarget = gethostbyaddr( $target );
}
$msg .= $ntarget;
return ($msg);
}
}

View File

@@ -38,7 +38,7 @@ class adminProxy extends HttpProxyController
$updateRedirector = false;
$restart = false;
self::validateDataSystemConf($httpData, $envFile);
$sysConf = PMSystem::getSystemConfiguration($envFile);
$sysConf = PmSystem::getSystemConfiguration($envFile);
$updatedConf = array();
if ($sysConf['default_lang'] != $httpData->default_lang) {
@@ -96,7 +96,7 @@ class adminProxy extends HttpProxyController
}
}
PMSystem::updateIndexFile(array(
PmSystem::updateIndexFile(array(
'lang' => $sysConf['default_lang'],
'skin' => $sysConf['default_skin']
));
@@ -611,7 +611,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', PmSystem::getVersion());
$sBodyPre->assign('engine', $engine);
$sBodyPre->assign('msg', $msg);
$sBody = $sBodyPre->getOutputContent();
@@ -1415,7 +1415,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'] = PmSystem::getVersion();
if (file_exists(PATH_DATA. 'log/upgrades.log')) {
$params['pmu'] = serialize(file_get_contents(PATH_DATA. 'log/upgrades.log', 'r'));
} else {
@@ -1505,7 +1505,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(PmSystem::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

@@ -98,7 +98,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', PmSystem::getHttpServerHostnameRequestsFrontEnd());
if ($debug) {
if (! file_exists(PATH_HTML . "lib-dev/pmUI/build.cache")) {

View File

@@ -102,7 +102,7 @@ class Home extends Controller
$userProperty = new UsersProperties();
$process = new Process();
$case = new Cases();
$sysConf = PMSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$sysConf = PmSystem::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
//Get ProcessStatistics Info
$start = 0;
@@ -186,7 +186,7 @@ class Home extends Controller
$solrEnabled = false;
if (($solrConf = PMSystem::solrEnv()) !== false) {
if (($solrConf = PmSystem::solrEnv()) !== false) {
$ApplicationSolrIndex = new AppSolr(
$solrConf["solr_enabled"],
@@ -411,7 +411,7 @@ class Home extends Controller
$type == "todo" || $type == "draft" || $type == "paused" || $type == "sent" ||
$type == "selfservice" || $type == "unassigned" || $type == "search"
) &&
(($solrConf = PMSystem::solrEnv()) !== false)
(($solrConf = PmSystem::solrEnv()) !== false)
) {
$ApplicationSolrIndex = new AppSolr(

View File

@@ -931,7 +931,7 @@ class Installer extends Controller
$envFile = PATH_CONFIG . 'env.ini';
// getting configuration from env.ini
$sysConf = PMSystem::getSystemConfiguration( $envFile );
$sysConf = PmSystem::getSystemConfiguration( $envFile );
$langUri = 'en';
if (isset($sysConf['default_lang'])) {
@@ -987,7 +987,7 @@ class Installer extends Controller
try {
// update the main index file
$indexFileUpdated = PMSystem::updateIndexFile(array('lang' => 'en','skin' => $updatedConf['default_skin']));
$indexFileUpdated = PmSystem::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

@@ -262,7 +262,7 @@ class Main extends Controller
}
$this->setVar( 'logo_company', $this->getCompanyLogo() );
$this->setVar( 'pmos_version', PMSystem::getVersion() );
$this->setVar( 'pmos_version', PmSystem::getVersion() );
$footerText = 'Copyright &copy; 2003-' . date( 'Y' ) . ' Colosa, Inc. All rights reserved.';
$adviseText = 'Supplied free of charge with no support, certification, warranty,
@@ -312,7 +312,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', PmSystem::getVersion() );
$footerText = G::LoadTranslation('ID_COPYRIGHT_FROM') . date( 'Y' ) . G::LoadTranslation('ID_COPYRIGHT_COL');
$adviseText = G::LoadTranslation('ID_COLOSA_AND_CERTIFIED_PARTNERS');
@@ -382,7 +382,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', PmSystem::getVersion() );
$template->assign( 'visit', G::loadTranslation( 'ID_VISIT' ) );
$template->assign( 'footer', '' );
@@ -731,7 +731,7 @@ class Main extends Controller
if (defined('SYSTEM_NAME')) {
$systemName = SYSTEM_NAME;
}
$properties[] = array ($systemName. ' Ver.', PMSystem::getVersion() . $ee, $pmSection);
$properties[] = array ($systemName. ' Ver.', PmSystem::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

@@ -940,7 +940,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: " . 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";
$EXPORT_TRACEBACK = Array ();
$c = 0;

View File

@@ -31,7 +31,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 = PmSystem::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/';
//change
$clientId = 'x-pm-local-client';
$client = $this->getClientCredentials($clientId);

View File

@@ -183,7 +183,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', PmSystem::getVersion() );
$fileName = $pathProcess . $dynTitle . 'Post.php';
file_put_contents( $fileName, $template->getOutputContent() );