Merge remote-tracking branch 'origin/bugfix/HOR-3670' into release/3.2.2

This commit is contained in:
David Callizaya
2017-08-15 10:07:12 -04:00
326 changed files with 11383 additions and 24998 deletions

View File

@@ -1,7 +1,8 @@
<?php
class actionsByEmailCoreClass extends PMPlugin
class ActionsByEmailCoreClass extends PMPlugin
{
public function __construct()
{
@@ -170,7 +171,7 @@ class actionsByEmailCoreClass extends PMPlugin
$field->label = '';
$actionField = str_replace(array('@@', '@#', '@=', '@%', '@?', '@$'), '', $configuration['ABE_ACTION_FIELD']);
$obj = new pmDynaform($configuration['DYN_UID']);
$obj = new PmDynaform($configuration['DYN_UID']);
$configuration['CURRENT_DYNAFORM'] = $configuration['DYN_UID'];
$file = $obj->printPmDynaformAbe($configuration);
$__ABE__ .= $file;
@@ -221,7 +222,7 @@ class actionsByEmailCoreClass extends PMPlugin
}
}
$obj = new pmDynaform($configuration['DYN_UID']);
$obj = new PmDynaform($configuration['DYN_UID']);
$configuration['CURRENT_DYNAFORM'] = $configuration['DYN_UID'];
$file = $obj->printPmDynaformAbe($configuration);
$__ABE__ .= $file;
@@ -290,7 +291,7 @@ class actionsByEmailCoreClass extends PMPlugin
}
}
$wsBaseInstance = new wsBase();
$wsBaseInstance = new WsBase();
$result = $wsBaseInstance->sendMessage(
$data->APP_UID,
$emailFrom,
@@ -333,4 +334,3 @@ class actionsByEmailCoreClass extends PMPlugin
}
}
}

View File

@@ -1,13 +1,17 @@
<?php
/**
* Class InputDocumentDrive
*/
/**
* Class InputDocumentDrive
*/
class AppDocumentDrive
{
/**
* @var PMDrive $drive
* @var PmDrive $drive
*/
private $drive;
/**
@@ -28,7 +32,7 @@ class AppDocumentDrive
*/
public function __construct()
{
$this->drive = new PMDrive();
$this->drive = new PmDrive();
$status = $this->drive->getServiceDriveStatus();
$status = !empty($status) ? ($status == 1 ? true : false): false;
$this->usersEmail = '';

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
<?php
/**
* Invalid search text for Solr exception
*/
/**
* Application APP_DATA could not be unserialized exception
*/
class ApplicationAppDataUnserializeException extends Exception
{
// Redefine the exception so message isn't optional
public function __construct($message, $code = 0)
{
// some code
// make sure everything is assigned properly
parent::__construct ($message, $code);
}
// custom string representation of object
public function __toString()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* Invalid search text for Solr exception
*
* @author Herbert Saal Gutierrez
*
*/
/**
* Dynaform file corrupt
*/
class ApplicationWithCorruptDynaformException extends Exception
{
// Redefine the exception so message isn't optional
public function __construct($message, $code = 0)
{
// some code
// make sure everything is assigned properly
parent::__construct ($message, $code);
}
// custom string representation of object
public function __toString()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* Application without Delegations exception
*/
class ApplicationWithoutDelegationRecordsException extends Exception
{
// Redefine the exception so message isn't optional
public function __construct($message, $code = 0)
{
// some code
// make sure everything is assigned properly
parent::__construct($message, $code);
}
// custom string representation of object
public function __toString()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
}

View File

@@ -2,6 +2,7 @@
use ProcessMaker\Plugins\PluginRegistry;
class Applications
{
/**
@@ -1213,4 +1214,3 @@ class Applications
return $steps;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,59 @@
<?php
/**
* This class is derived from the class archive, is employed to use files .bzip
*/
class BzipFile extends TarFile
{
/**
* This function is the constructor of the class bzip_file
*
* @param string $name
* @return void
*/
public function BzipFile($name)
{
$this->tar_file($name);
$this->options['type'] = "bzip";
}
/**
* This function is employed to create files .
* bzip
*
* @return boolean
*/
public function create_bzip()
{
if ($this->options['inmemory'] == 0) {
$pwd = getcwd();
chdir($this->options['basedir']);
if ($fp = bzopen($this->options['name'], "wb")) {
fseek($this->archive, 0);
while ($temp = fread($this->archive, 1048576)) {
bzwrite($fp, $temp);
}
bzclose($fp);
chdir($pwd);
} else {
$this->error[] = "Could not open {$this->options['name']} for writing.";
chdir($pwd);
return 0;
}
} else {
$this->archive = bzcompress($this->archive, $this->options['level']);
}
return 1;
}
/**
* This function open a archive of the class bzip_file
*
* @return void
*/
public function open_archive()
{
return @bzopen($this->options['name'], "rb");
}
}

View File

@@ -31,7 +31,11 @@
*
* @package workflow.engine.classes
*/
class CLI
/**
*
* @package workflow.engine.classes
*/class CLI
{
public static $tasks = array ();
public static $currentTask = null;
@@ -384,4 +388,3 @@ EOT;
}
}
}

View File

@@ -1,57 +1,14 @@
<?php
/**
* class.configuration.php
*
* @package workflow.engine.ProcessMaker
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//
// It works with the table CONFIGURATION in a WF dataBase
// Copyright (C) 2007 COLOSA
// License: LGPL, see LICENSE
////////////////////////////////////////////////////
/**
* ProcessConfiguration - ProcessConfiguration class
*
* @author David S. Callizaya S.
* @copyright 2007 COLOSA
*/
require_once 'classes/model/Configuration.php';
/**
* ProcessConfiguration - ProcessConfiguration
* Extends Configuration
*
*
* @copyright 2007 COLOSA
* @version Release: @package_version@
* @package workflow.engine.ProcessMaker
*/
class Configurations // extends Configuration
{
public $aConfig = array();
private $Configuration = null;
private $UserConfig = null;
@@ -81,16 +38,16 @@ class Configurations // extends Configuration
$this->arrayClone($object[$k], $cloneObject[$k]);
}
} else {
if (is_object( $object )) {
if (is_object($object)) {
} else {
$cloneObject = null;
}
}
}
public function exists($cfgID,$objID='')
public function exists($cfgID, $objID='')
{
return $this->Configuration->exists($cfgID,$objID,'','','');
return $this->Configuration->exists($cfgID, $objID, '', '', '');
}
/**
@@ -169,7 +126,6 @@ class Configurations // extends Configuration
try {
$this->Fields = $this->Configuration->load($cfg, $obj, $pro, $usr, $app);
} catch (Exception $e) {
} // the configuration does not exist
@@ -178,7 +134,7 @@ class Configurations // extends Configuration
}
if (!is_array($this->aConfig)) {
$this->aConfig = Array();
$this->aConfig = array();
}
return $this->aConfig;
@@ -325,8 +281,8 @@ class Configurations // extends Configuration
$theFormat = $this->UserConfig['format'];
$fname = $oUser->getUsrFirstname();
$lname = $oUser->getUsrLastname();
if (strpos($theFormat, ',') !== false && ( trim($fname) == '' || trim($lname) == '')) {
$theFormat = str_replace(',', '', $theFormat);
if (strpos($theFormat, ',') !== false && (trim($fname) == '' || trim($lname) == '')) {
$theFormat = str_replace(',', '', $theFormat);
}
$aux = str_replace('@userName', trim($username), $theFormat);
@@ -537,15 +493,15 @@ class Configurations // extends Configuration
public function getUserNameFormats()
{
$formats[] = Array('id' => '@firstName @lastName', //the id , don't translate
$formats[] = array('id' => '@firstName @lastName', //the id , don't translate
'name' => G::loadTranslation('ID_USERNAME_FORMAT_1') //label displayed, can be translated
);
$formats[] = Array('id' => '@firstName @lastName (@userName)', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_2'));
$formats[] = Array('id' => '@userName', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_3'));
$formats[] = Array('id' => '@userName (@firstName @lastName)', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_4'));
$formats[] = Array('id' => '@lastName @firstName', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_5'));
$formats[] = Array('id' => '@lastName, @firstName', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_6'));
$formats[] = Array('id' => '@lastName, @firstName (@userName)', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_7'));
$formats[] = array('id' => '@firstName @lastName (@userName)', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_2'));
$formats[] = array('id' => '@userName', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_3'));
$formats[] = array('id' => '@userName (@firstName @lastName)', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_4'));
$formats[] = array('id' => '@lastName @firstName', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_5'));
$formats[] = array('id' => '@lastName, @firstName', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_6'));
$formats[] = array('id' => '@lastName, @firstName (@userName)', 'name' => G::loadTranslation('ID_USERNAME_FORMAT_7'));
return $formats;
}
@@ -560,9 +516,9 @@ class Configurations // extends Configuration
$creationDateMask = ($creationDateMask == '') ? $dateFormat : $creationDateMask;
if ($creationDateMask != '') {
if (strpos($dateTime, ' ') !== false) {
list ($date, $time) = explode(' ', $dateTime);
list ($y, $m, $d) = explode('-', $date);
list ($h, $i, $s) = explode(':', $time);
list($date, $time) = explode(' ', $dateTime);
list($y, $m, $d) = explode('-', $date);
list($h, $i, $s) = explode(':', $time);
$newCreation = '';
$maskTime = array('d' => '%d', 'D' => '%A', 'j' => '%d', 'l' => '%A', 'G' => '%I', 'g' => '%i', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%B', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%p', 'A' => '%p', 'g' => '%I', 'G' => '%H', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S');
$creationDateMask = trim($creationDateMask);
@@ -589,9 +545,9 @@ class Configurations // extends Configuration
if (G::toLower(PHP_OS) == 'linux' || G::toLower(PHP_OS) == 'darwin') {
if (SYS_LANG == 'es') {
$langLocate = 'es_ES';
} else if (strlen(SYS_LANG) > 2) {
} elseif (strlen(SYS_LANG) > 2) {
$langLocate = str_replace('-', '_', SYS_LANG);
} else if ($location != '') {
} elseif ($location != '') {
$langLocate = SYS_LANG.'_'.$location;
} else {
$langLocate = 'en_US';
@@ -1006,4 +962,3 @@ class Configurations // extends Configuration
return $ver;
}
}

View File

@@ -1,5 +1,6 @@
<?php
class ConsolidatedCases
{
private $existTable;
@@ -51,7 +52,7 @@ class ConsolidatedCases
$oReportTables = new ReportTables();
$oReportTables->deleteAllReportVars($_POST['form']['REP_TAB_UID']);
$pmDyna = new pmDynaform(array());
$pmDyna = new PmDynaform(array());
$pmDyna->fields["CURRENT_DYNAFORM"] = $DynUid;
$dataDyna = $pmDyna->getDynaform();
$json = G::json_decode($dataDyna["DYN_CONTENT"]);

View File

@@ -1,16 +1,11 @@
<?php
class Dashboards
{
public function getListDashboards ($start=0, $limit=20, $sort='', $dir='DESC', $search='')
{
require_once 'classes/model/Dashboard.php';
require_once 'classes/model/DashboardIndicator.php';
require_once 'classes/model/Users.php';
require_once 'classes/model/Groupwf.php';
require_once 'classes/model/DashboardDasInd.php';
$limit_size = isset($limit) ? $limit: 20;
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;

View File

@@ -1,8 +1,7 @@
<?php
require_once 'classes/interfaces/dashletInterface.php';
class dashletOpenVSCompleted implements DashletInterface
class DashletOpenVsCompleted implements DashletInterface
{
const version = '1.0';
@@ -275,7 +274,7 @@ class dashletOpenVSCompleted implements DashletInterface
public function render ($width = 300)
{
$g = new pmGauge();
$g = new PmGauge();
$g->w = $width;
$g->value = $this->value;

View File

@@ -1,8 +1,8 @@
<?php
require_once 'classes/interfaces/dashletInterface.php';
class dashletProcessMakerCommunity implements DashletInterface
class DashletProcessMakerCommunity implements DashletInterface
{
const version = '1.0';

View File

@@ -1,8 +1,8 @@
<?php
require_once 'classes/interfaces/dashletInterface.php';
class dashletProcessMakerEnterprise implements DashletInterface
class DashletProcessMakerEnterprise implements DashletInterface
{
const version = '1.0';

View File

@@ -1,8 +1,8 @@
<?php
require_once 'classes/interfaces/dashletInterface.php';
use ProcessMaker\Core\System;
class dashletRssReader implements DashletInterface
class DashletRssReader implements DashletInterface
{
const version = '1.0';
@@ -54,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,44 +1,6 @@
<?php
/**
* class.dates.php
*
* @package workflow.engine.classes
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
* /
*
* /*
* Created on 21/01/2008
* This class is used for handling dates
*
* @author David Callizaya <davidsantos@colosa.com>
*/
require_once ("classes/model/TaskPeer.php");
require_once ("classes/model/HolidayPeer.php");
/**
*
* @package workflow.engine.classes
*/
class dates
class Dates
{
private $holidays = array();
@@ -529,4 +491,3 @@ class dates
return $iDate;
}
}

View File

@@ -1,26 +1,5 @@
<?php
/**
* Author: Erik Amaru Ortiz <erik@colosa.com>
* Description:This is a class for load all additional connections; if exist in a particular proccess
* Date: 15-05-2008
*
*
* class.dbConnections.php
*
* Email bugs/suggestions to erik@colosa.com
*/
require_once 'model/DbSource.php';
require_once 'model/Content.php';
/**
* dbConnections
*
*
* @copyright 2008 Colosa
* @package workflow.engine.classes
*
*/
class DbConnections
{
private $PRO_UID;

View File

@@ -1,12 +1,5 @@
<?php
/**
* derivation - derivation class
*
* @package workflow.engine.ProcessMaker
*
*/
class Derivation
{
var $case;
@@ -1701,7 +1694,6 @@ class Derivation
function getGrpUser ($aData)
{
require_once 'classes/model/Content.php';
$oTasks = new Tasks();
$oGroups = new Groups();
$oContent = new Content();

View File

@@ -1,36 +1,5 @@
<?php
/**
* class.dynaFormField.php
*
* @package workflow.engine.classes
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* Dynaform Field - DynaformField class
*
* @package workflow.engine.classes
*/
class DynaFormField extends DBTable
{

View File

@@ -0,0 +1,293 @@
<?php
/**
* Created on 21/12/2007
* Dynaform - Dynaform
/**
*
* @package workflow.engine.classes
*/class DynaformEditor extends WebResource
{
private $isOldCopy = false;
public $file = '';
public $title = 'New Dynaform';
public $dyn_uid = '';
public $dyn_type = '';
public $home = '';
/**
* Other Options for Editor:
* left: 'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
* top: 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
* height: '3/4*(document.body.clientWidth-getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))*2)',
* left: 'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))'
* left: 'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))'
*
* Other Options for Toolbar:
* left: 'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
* top: 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
*/
public $defaultConfig = array('Editor' => array('left' => '0', 'top' => '0', 'width' => 'document.body.clientWidth-4', 'height' => 'document.body.clientHeight-4'),
'Toolbar' => array('left' => 'document.body.clientWidth-2-toolbar.clientWidth-24-3+7', 'top' => '52'),
'FieldsList' => array('left' => '4+toolbar.clientWidth+24', 'top' => 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))', 'width' => 244, 'height' => 400)
);
public $panelConf = array('style' => array('title' => array('textAlign' => 'center')),
'width' => 700, 'height' => 600, 'tabWidth' => 120, 'modal' => true, 'drag' => false, 'resize' => false, 'blinkToFront' => false
);
/**
* Constructor of the class dynaformEditor
*
* @param string $get
* @return void
*/
public function __construct($get)
{
$this->panelConf = array_merge($this->panelConf, $this->defaultConfig['Editor']);
//'title' => G::LoadTranslation('ID_DYNAFORM_EDITOR').' - ['.$this->title.']',
}
/**
* Create the xml form default
*
* @param string $filename
* @return void
*/
public function _createDefaultXmlForm($fileName)
{
//Create the default Dynaform
$sampleForm = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$sampleForm .= '<dynaForm type="' . $this->dyn_type . '" name="" width="500" enabletemplate="0" mode="edit">' . "\n";
switch ($this->dyn_type) {
case "xmlform":
/* $sampleForm.='<title type="title" enablehtml="0">' . "\n" .
' <en>Sample form</en>' . "\n" .
'</title>'."\n";
$sampleForm.='<submit type="submit" enablehtml="0" onclick="">' . "\n" .
' <en>Submit</en>' . "\n" .
'</submit>'."\n"; */
break;
case "grid":
/* $sampleForm.='<fieldA type="text" >' . "\n" .
'<en>A</en>' . "\n" .
'</fieldA>'."\n";
$sampleForm.='<fieldB type="text" >' . "\n" .
'<en>B</en>' . "\n" .
'</fieldB>'."\n"; */
break;
}
$sampleForm .= '</dynaForm>';
G::verifyPath(dirname($fileName), true);
$fp = fopen($fileName, 'w');
$sampleForm = str_replace('name=""', 'name="' . $this->_getFilename($this->file) . '"', $sampleForm);
fwrite($fp, $sampleForm);
fclose($fp);
}
/**
* Prints the DynaformEditor
*
* @return void
*/
public function _render()
{
global $G_PUBLISH;
$script = '';
/* Start Block: Load (Create if doesn't exist) the xmlform */
$Parameters = array('SYS_LANG' => SYS_LANG, 'URL' => G::encrypt($this->file, URL_KEY), 'DYN_UID' => $this->dyn_uid, 'PRO_UID' => $this->pro_uid, 'DYNAFORM_NAME' => $this->dyn_title, 'FILE' => $this->file, 'DYN_EDITOR' => $this->dyn_editor
);
$_SESSION['Current_Dynafom']['Parameters'] = $Parameters;
$XmlEditor = array('URL' => G::encrypt($this->file, URL_KEY), 'XML' => '' //$openDoc->getXml()
);
$JSEditor = array('URL' => G::encrypt($this->file, URL_KEY)
);
$A = G::encrypt($this->file, URL_KEY);
try {
$openDoc = new Xml_Document();
$fileName = $this->home . $this->file . '.xml';
if (file_exists($fileName)) {
$openDoc->parseXmlFile($fileName);
} else {
$this->_createDefaultXmlForm($fileName);
$openDoc->parseXmlFile($fileName);
}
//$form = new Form( $this->file , $this->home, SYS_LANG, true );
$Properties = DynaformEditorAjax::get_properties($A, $this->dyn_uid);
/* Start Block: Prepare the XMLDB connection */
define('DB_XMLDB_HOST', PATH_DYNAFORM . $this->file . '.xml');
define('DB_XMLDB_USER', '');
define('DB_XMLDB_PASS', '');
define('DB_XMLDB_NAME', '');
define('DB_XMLDB_TYPE', 'myxml');
/* Start Block: Prepare the dynaformEditor */
$G_PUBLISH = new Publisher();
$sName = 'dynaformEditor';
$G_PUBLISH->publisherId = $sName;
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->setTitle(G::LoadTranslation('ID_DYNAFORM_EDITOR') . ' - ' . $Properties['DYN_TITLE']);
$G_PUBLISH->AddContent('blank');
$this->panelConf['title'] = '';
$G_PUBLISH->AddContent('panel-init', 'mainPanel', $this->panelConf);
if ($Properties['DYN_TYPE'] == 'xmlform') {
$G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_Toolbar', 'display:none', $Parameters, '', '');
} else {
$G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_ToolbarGrid', 'display:none', $Parameters, '', '');
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Editor', 'display:none', $Parameters, '', '');
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_XmlEditor', 'display:none', $XmlEditor, '', '');
$G_PUBLISH->AddContent('blank');
$i = 0;
$aFields = array();
$aFields[] = array('XMLNODE_NAME' => 'char', 'TYPE' => 'char', 'UP' => 'char', 'DOWN' => 'char'
);
$oSession = new DBSession(new DBConnection(PATH_DYNAFORM . $this->file . '.xml', '', '', '', 'myxml'));
$oDataset = $oSession->Execute('SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" ) AND TYPE <> "pmconnection"');
$iMaximun = $oDataset->count();
while ($aRow = $oDataset->Read()) {
$aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'], 'TYPE' => $aRow['TYPE'], 'UP' => ($i > 0 ? G::LoadTranslation('ID_UP') : ''), 'DOWN' => ($i < $iMaximun - 1 ? G::LoadTranslation('ID_DOWN') : ''), 'row__' => ($i + 1)
);
$i++;
break;
}
global $_DBArray;
$_DBArray['fields'] = $aFields;
$_SESSION['_DBArray'] = $_DBArray;
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('fields');
/**
* *@Erik-> this is deprecated,.
* (unuseful) $G_PUBLISH->AddContent('propeltable', 'paged-table', 'dynaforms/fields_List', $oCriteria, $Parameters, '', SYS_URI.'dynaforms/dynaforms_PagedTableAjax');**
*/
$G_PUBLISH->AddContent('blank');
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_JSEditor', 'display:none', $JSEditor, '', '');
} catch (Exception $e) {
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Properties', 'display:none', $Properties, '', '');
//for showHide tab option @Neyek
$G_PUBLISH->AddContent('blank');
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_PREVIEW"), $sName . '[3]', 'dynaformEditor.changeToPreview', 'dynaformEditor.saveCurrentView');
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_XML"), $sName . '[4]', 'dynaformEditor.changeToXmlCode', 'dynaformEditor.saveCurrentView');
if ($Properties['DYN_TYPE'] != 'grid') {
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_HTML"), $sName . '[5]', 'dynaformEditor.changeToHtmlCode', 'dynaformEditor.saveCurrentView');
}
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_FIELDS_LIST"), $sName . '[6]', 'dynaformEditor.changeToFieldsList', 'dynaformEditor.saveCurrentView');
if ($Properties["DYN_TYPE"] != "grid") {
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_JAVASCRIPTS"), $sName . '[7]', 'dynaformEditor.changeToJavascripts', 'dynaformEditor.saveCurrentView');
}
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_PROPERTIES"), $sName . '[8]', 'dynaformEditor.changeToProperties', 'dynaformEditor.saveCurrentView');
//for showHide tab option @Neyek
if ($Properties["DYN_TYPE"] != "grid") {
$G_PUBLISH->AddContent("panel-tab", G::LoadTranslation("ID_CONDITIONS_EDITOR"), $sName . "[9]", "dynaformEditor.changeToShowHide", "dynaformEditor.saveShowHide");
}
$G_PUBLISH->AddContent('panel-close');
$oHeadPublisher->addScriptFile("/js/maborak/core/maborak.loader.js",2);
$oHeadPublisher->addScriptFile('/jscore/dynaformEditor/core/dynaformEditor.js');
$oHeadPublisher->addScriptFile('/js/codemirrorOld/js/codemirror.js',1);
$oHeadPublisher->addScriptFile('/js/grid/core/grid.js');
$oHeadPublisher->addScriptCode('
var DYNAFORM_URL="' . $Parameters['URL'] . '";
leimnud.event.add(window,"load",function(){ loadEditor(); });
');
$oHeadPublisher->addScriptCode(' var jsMeta;var __usernameLoggedDE__ = "' . (isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '') . '";var SYS_LANG = "' . SYS_LANG . '";var __DYN_UID__ = "' . $this->dyn_uid . '";');
$arrayParameterAux = $Parameters;
$arrayParameterAux["DYNAFORM_NAME"] = base64_encode($arrayParameterAux["DYNAFORM_NAME"]);
$oHeadPublisher->addScriptCode('var dynaformEditorParams = \'' . serialize($arrayParameterAux) . '\';');
G::RenderPage("publish", 'blank');
}
/**
* Get the filename
*
* @param string $file
* @return string
*/
public function _getFilename($file)
{
return (strcasecmp(substr($file, - 5), '_tmp0') == 0) ? substr($file, 0, strlen($file) - 5) : $file;
}
/**
* Set the temporal copy
*
* @param string $onOff
* @return void
*/
public function _setUseTemporalCopy($onOff)
{
$file = self::_getFilename($this->file);
if ($onOff) {
$this->file = $file . '_tmp0';
self::_setTmpData(array('useTmpCopy' => true ));
if (!file_exists(PATH_DYNAFORM . $file . '.xml')) {
$this->_createDefaultXmlForm(PATH_DYNAFORM . $file . '.xml');
}
//Creates a copy if it doesn't exist, else, use the old copy
if (!file_exists(PATH_DYNAFORM . $this->file . '.xml')) {
self::_copyFile(PATH_DYNAFORM . $file . '.xml', PATH_DYNAFORM . $this->file . '.xml');
}
if (!file_exists(PATH_DYNAFORM . $this->file . '.html') && file_exists(PATH_DYNAFORM . $file . '.html')) {
self::_copyFile(PATH_DYNAFORM . $file . '.html', PATH_DYNAFORM . $this->file . '.html');
}
} else {
$this->file = $file;
self::_setTmpData(array());
}
}
/**
* Set temporal data
*
* @param $data
* @return void
*/
public function _setTmpData($data)
{
G::verifyPath(PATH_C . 'dynEditor/', true);
$fp = fopen(PATH_C . 'dynEditor/' . session_id() . '.php', 'w');
fwrite($fp, '$tmpData=unserialize(\'' . addcslashes(serialize($data), '\\\'') . '\');');
fclose($fp);
}
/**
* Get temporal data
*
* @param string $filename
* @return array
*/
public function _getTmpData()
{
$tmpData = array();
$file = PATH_C . 'dynEditor/' . session_id() . '.php';
if (file_exists($file)) {
eval(implode('', file($file)));
}
return $tmpData;
}
/**
* Copy files
*
* @param file $from
* @param file $to
* @return void
*/
public function _copyFile($from, $to)
{
$copy = implode('', file($from));
$fcopy = fopen($to, "w");
fwrite($fcopy, $copy);
fclose($fcopy);
}
}

View File

@@ -1,15 +1,6 @@
<?php
require_once ("classes" . PATH_SEP . "class.enterpriseUtils.php");
if (!defined("PM_VERSION")) {
if (file_exists(PATH_METHODS . "login/version-pmos.php")) {
include (PATH_METHODS . "login/version-pmos.php");
} else {
define("PM_VERSION", "2.0.0");
}
}
class enterpriseClass extends PMPlugin
class EnterpriseClass extends PMPlugin
{
public function __construct()
{
@@ -108,7 +99,7 @@ class enterpriseClass extends PMPlugin
public function enterpriseLimitCreateUser()
{
$oServerConf = &serverConf::getSingleton();
$oServerConf = &ServerConf::getSingleton();
$infoLicense =$oServerConf->getProperty('LICENSE_INFO');
if (isset($infoLicense[SYS_SYS]['LIMIT_USERS'])) {
$criteria = new Criteria('workflow');
@@ -156,8 +147,3 @@ class enterpriseClass extends PMPlugin
}
}
}
if (!class_exists("pmLicenseManager")) {
require_once ("classes" . PATH_SEP . "class.pmLicenseManager.php");
}

View File

@@ -1,5 +1,6 @@
<?php
require_once ("classes/model/Configuration.php");
use ProcessMaker\Core\System;
class EnterpriseUtils
{
@@ -40,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'] : ''));
@@ -149,4 +150,3 @@ class EnterpriseUtils
return $sw;
}
}

View File

@@ -0,0 +1,23 @@
<?php
class FeaturesDetail
{
public $featureName;
public $description = null;
public $enabled = false;
public $workspaces = null;
/**
* This function is the constructor of the featuresDetail class
*
* @param string $featureName
* @param string $name
* @param string $description
* @return void
*/
public function __construct ($featureName, $description = '')
{
$this->featureName = $featureName;
$this->description = $description;
}
}

Some files were not shown because too many files have changed in this diff Show More