Merged in bugfix/HOR-3670-DC (pull request #5927)

HOR-3670

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
David Callizaya
2017-08-11 22:14:15 +00:00
committed by Julio Cesar Laura Avendaño
70 changed files with 952 additions and 1111 deletions

View File

@@ -7,6 +7,7 @@ use ProcessMaker\Services;
use ProcessMaker\Services\Api;
use Luracast\Restler\RestException;
use Illuminate\Foundation\Http\Kernel;
use G;
/**
* Web application bootstrap
@@ -448,6 +449,7 @@ class WebApplication
define("PATH_CONTROLLERS", PATH_CORE . "controllers" . PATH_SEP);
define("PATH_SERVICES_REST", PATH_CORE . "services" . PATH_SEP . "rest" . PATH_SEP);
G::defineConstants();
$arraySystemConfiguration = \PmSystem::getSystemConfiguration();
ini_set('date.timezone', $arraySystemConfiguration['time_zone']); //Set Time Zone

View File

@@ -5823,6 +5823,19 @@ class G
$_SESSION['_DATA_TRIGGER_']['_TRI_LOG_'] = true;
}
}
/**
* Define the Processmaker constants.
*
*/
public static function defineConstants()
{
//Moved from Enterprise class.
if (file_exists(PATH_METHODS . "login/version-pmos.php")) {
include (PATH_METHODS . "login/version-pmos.php");
}
//Removed default version from code.
}
}
/**

View File

@@ -369,7 +369,7 @@ class Publisher
default:
$label = ($oTable->fields[$f]['Label'] != '') ? $oTable->fields[$f]['Label'] : $f;
$label = str_replace( "\n", ' ', $label );
$pm->fields[$f] = new XmlForm_Field_popupOption( new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $oTable->id . '.showHideField("' . $f . '")' ) ) );
$pm->fields[$f] = new XmlForm_Field_PopupOption( new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $oTable->id . '.showHideField("' . $f . '")' ) ) );
$pm->values[$f] = '';
}
}

View File

@@ -532,7 +532,7 @@ class RBAC
{
/*----------------------------------********---------------------------------*/
$licenseManager =& pmLicenseManager::getSingleton();
$licenseManager =& PmLicenseManager::getSingleton();
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
return -7;
}

View File

@@ -5467,6 +5467,86 @@ class XmlForm
public $requiredFields = array ();
public $fieldContentWidth = 450;
/**
* List of xmlform controls and its classes.
*
* @var string[]
*/
private static $controls = [
'button' => XmlForm_Field_Button::class,
'caption' => XmlForm_Field_Caption::class,
'captioncurrency' => XmlForm_Field_CaptionCurrency::class,
'captionpercentage' => XmlForm_Field_CaptionPercentage::class,
'cellmark' => XmlForm_Field_cellMark::class,
'checkbox2' => XmlForm_Field_Checkbox2::class,
'checkbox' => XmlForm_Field_Checkbox::class,
'checkboxpt' => XmlForm_Field_Checkboxpt::class,
'checkboxtable' => XmlForm_Field_CheckBoxTable::class,
'checkgroup' => XmlForm_Field_CheckGroup::class,
'checkgroupview' => XmlForm_Field_CheckGroupView::class,
'currency' => XmlForm_Field_Currency::class,
'date2' => XmlForm_Field_Date2::class,
'date5' => XmlForm_Field_Date5::class,
'date' => XmlForm_Field_Date::class,
'dateview' => XmlForm_Field_DateView::class,
'dropdown' => XmlForm_Field_Dropdown::class,
'dropdownpt' => XmlForm_Field_Dropdownpt::class,
'dveditor' => XmlForm_Field_DVEditor::class,
'fastsearch' => XmlForm_Field_FastSearch::class,
'file' => XmlForm_Field_File::class,
'grid' => XmlForm_Field_Grid::class,
'hidden' => XmlForm_Field_Hidden::class,
'hours' => XmlForm_Field_Hours::class,
'html' => XmlForm_Field_HTML::class,
'image' => XmlForm_Field_Image::class,
'javascript' => XmlForm_Field_JavaScript::class,
'label' => XmlForm_Field_Label::class,
'link' => XmlForm_Field_Link::class,
'listbox' => XmlForm_Field_Listbox::class,
'password' => XmlForm_Field_Password::class,
'percentage' => XmlForm_Field_Percentage::class,
'popupoption' => XmlForm_Field_PopupOption::class,
'print' => XmlForm_Field_Print::class,
'radiogroup' => XmlForm_Field_RadioGroup::class,
'radiogroupview' => XmlForm_Field_RadioGroupView::class,
'reset' => XmlForm_Field_Reset::class,
'simpletext' => XmlForm_Field_SimpleText::class,
'submit' => XmlForm_Field_Submit::class,
'subtitle' => XmlForm_Field_Subtitle::class,
'suggest' => XmlForm_Field_Suggest::class,
'text' => XmlForm_Field_Text::class,
'textarea' => XmlForm_Field_Textarea::class,
'textareapm' => XmlForm_Field_TextareaPM::class,
'textpm' => XmlForm_Field_TextPM::class,
'title' => XmlForm_Field_Title::class,
'toolbar' => XmlForm_Field_ToolBar::class,
'toolbutton' => XmlForm_Field_toolButton::class,
'wysiwyg_editor' => XmlForm_Field_WYSIWYG_EDITOR::class,
'xmlform' => XmlForm_Field_Xmlform::class,
'xmlmenu' => XmlForm_Field_XmlMenu::class,
'yesno' => XmlForm_Field_YesNo::class,
];
/**
* Get xmlform control class by type.
*
* @param string $type
* @return string
*/
private function getClassByControlType($type)
{
$key = strtolower($type);
if (isset(self::$controls[$key])) {
return self::$controls[$key];
} elseif (class_exists('XmlForm_Field_' . $type)) {
return 'XmlForm_Field_' . $type;
} elseif (class_exists('XmlForm_Field_' . $key)) {
return 'XmlForm_Field_' . $key;
} else {
return 'XmlForm_Field';
}
}
/**
* Function xmlformTemplate
*
@@ -5567,14 +5647,8 @@ class XmlForm
foreach ($xmlNode as $k => $v) {
if (($xmlNode[$k]->type !== 'cdata') && isset( $xmlNode[$k]->attributes['type'] )) {
if (class_exists( 'XmlForm_Field_' . $xmlNode[$k]->attributes['type'] )) {
$x = '$field = new XmlForm_Field_' . $xmlNode[$k]->attributes['type'] . '( $xmlNode[$k], $language, $this->home, $this);';
eval( $x );
} else {
$field = new XmlForm_Field( $xmlNode[$k], $language, $this->home, $this );
}
$class = $this->getClassByControlType($xmlNode[$k]->attributes['type']);
$field = new $class( $xmlNode[$k], $language, $this->home, $this );
$field->language = $this->language;
$this->fields[$field->name] = $field;
}

View File

@@ -81,4 +81,4 @@
if (!is_dir(PATH_SMARTY_C)) G::mk_dir(PATH_SMARTY_C);
if (!is_dir(PATH_SMARTY_CACHE)) G::mk_dir(PATH_SMARTY_CACHE);
?>
G::defineConstants();

View File

@@ -170,7 +170,7 @@ class WorkflowTestCase extends TestCase
throw new \Exception('To continue please put a valid license at features/resources');
}
G::LoadClass('pmLicenseManager');
$licenseManager = new pmLicenseManager();
$licenseManager = new PmLicenseManager();
$licenseManager->installLicense($licenseFile[0]);
}

View File

@@ -171,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;
@@ -222,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;

View File

@@ -52,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

@@ -274,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,6 +1,12 @@
<?php
class DynaformEditor extends WebResource
/**
* Created on 21/12/2007
* Dynaform - Dynaform
/**
*
* @package workflow.engine.classes
*/class DynaformEditor extends WebResource
{
private $isOldCopy = false;
@@ -36,7 +42,7 @@ class DynaformEditor extends WebResource
* @param string $get
* @return void
*/
public function dynaformEditor($get)
public function __construct($get)
{
$this->panelConf = array_merge($this->panelConf, $this->defaultConfig['Editor']);
//'title' => G::LoadTranslation('ID_DYNAFORM_EDITOR').' - ['.$this->title.']',
@@ -111,7 +117,7 @@ class DynaformEditor extends WebResource
$openDoc->parseXmlFile($fileName);
}
//$form = new Form( $this->file , $this->home, SYS_LANG, true );
$Properties = dynaformEditorAjax::get_properties($A, $this->dyn_uid);
$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', '');

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,6 @@
<?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()
{

View File

@@ -1,6 +1,6 @@
<?php
interface iDynaformEditorAjax
interface IDynaformEditorAjax
{
//public function render_preview($A);
}

View File

@@ -334,7 +334,7 @@ class PMLicensedFeatures
/*----------------------------------********---------------------------------*/
public function verifyfeature ($featureName)
{
$licenseManager = pmLicenseManager::getSingleton(false);
$licenseManager = PmLicenseManager::getSingleton(false);
$_SESSION['__sw__'] = true;
$padl = new Padl();

View File

@@ -128,7 +128,7 @@ class PMPluginRegistry
return;
}
$detail = new pluginDetail( $sNamespace, $sClassName, $sFilename, $plugin->sFriendlyName, $plugin->sPluginFolder, $plugin->sDescription, $plugin->sSetupPage, $plugin->iVersion );
$detail = new PluginDetail( $sNamespace, $sClassName, $sFilename, $plugin->sFriendlyName, $plugin->sPluginFolder, $plugin->sDescription, $plugin->sSetupPage, $plugin->iVersion );
if (isset( $plugin->aWorkspaces )) {
$detail->aWorkspaces = $plugin->aWorkspaces;
@@ -1207,7 +1207,7 @@ class PMPluginRegistry
//Found a License
if (class_exists( 'pmLicenseManager' )) {
$sSerializedFile = PATH_DATA_SITE . 'lmn.singleton';
$pmLicenseManagerO = & pmLicenseManager::getSingleton();
$pmLicenseManagerO = & PmLicenseManager::getSingleton();
if (file_exists( $sSerializedFile )) {
$pmLicenseManagerO->unSerializeInstance( file_get_contents( $sSerializedFile ) );
}

View File

@@ -1,45 +1,17 @@
<?php
/**
* class.pluginRegistry.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.
*/
use ProcessMaker\Plugins\PluginRegistry;
/**
*
* @package workflow.engine.classes
*/
//@todo: Pending until class.plugin.php is solved.
require_once 'class.plugin.php';
/**
*
* @package workflow.engine.classes
*/class pluginDetail
*/class PluginDetail
{
public $sNamespace;
public $sClassName;
@@ -67,7 +39,7 @@ require_once 'class.plugin.php';
* @param integer $iVersion
* @return void
*/
public function __construct ($sNamespace, $sClassName, $sFilename, $sFriendlyName = '', $sPluginFolder = '', $sDescription = '', $sSetupPage = '', $iVersion = 0)
public function __construct($sNamespace, $sClassName, $sFilename, $sFriendlyName = '', $sPluginFolder = '', $sDescription = '', $sSetupPage = '', $iVersion = 0)
{
$this->sNamespace = $sNamespace;
$this->sClassName = $sClassName;

View File

@@ -1,20 +1,10 @@
<?php
/**
* class.pmDynaform.php
* Implementing pmDynaform library in the running case.
*
* @author Roly Rudy Gutierrez Pinto
* @package engine.classes
*/
/**
* class.pmDynaform.php
* Implementing pmDynaform library in the running case.
*
* @author Roly Rudy Gutierrez Pinto
* @package engine.classes
*/class pmDynaform
*/class PmDynaform
{
public static $instance = null;

View File

@@ -1,7 +1,7 @@
<?php
class pmGauge
class PmGauge
{
/**

View File

@@ -11,7 +11,7 @@ use ProcessMaker\Plugins\PluginRegistry;
/**
* class.pmLicenseManager.php
*
*/class pmLicenseManager
*/class PmLicenseManager
{
private static $instance = null;
@@ -120,7 +120,7 @@ use ProcessMaker\Plugins\PluginRegistry;
public static function getSingleton($flagActivatePlugins = true)
{
if (self::$instance == null) {
self::$instance = new pmLicenseManager($flagActivatePlugins);
self::$instance = new PmLicenseManager($flagActivatePlugins);
}
return self::$instance;
}

View File

@@ -1,48 +1,12 @@
<?php
/**
* class.ArrayPeer.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.
*
*/
/**
* Phing Class Wrapper
*
* @author Erik Amaru Ortiz <erik@colosa.com>
*/
include_once 'phing/Phing.php';
set_include_path( PATH_THIRDPARTY . 'propel-generator/classes/' . PATH_SEPARATOR . get_include_path() );
if (! class_exists( 'Phing' )) {
throw new Exception( 'Fatal Error: Phing is not loaded!' );
}
class pmPhing extends Phing
class PmPhing extends Phing
{
public function getPhingVersion ()
public function getPhingVersion()
{
return 'pmPhing Ver 1.0';
}

View File

@@ -914,7 +914,7 @@ class PmTable
Phing::startup();
Phing::setProperty('phing.home', getenv('PHING_HOME'));
$m = new pmPhing();
$m = new PmPhing();
$m->execute($args);
$m->runBuild();
}

View File

@@ -37,7 +37,7 @@ class PopupMenu extends form
$label = str_replace( "\n", ' ', $label );
$pmXmlNode = new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $tableId . '.showHideField("' . $f . '")'
) );
$this->fields[$f] = new XmlForm_Field_popupOption( $pmXmlNode );
$this->fields[$f] = new XmlForm_Field_PopupOption( $pmXmlNode );
$this->values[$f] = '';
}
}

View File

@@ -1985,7 +1985,7 @@ class WorkspaceTools
$licensedFeatures = & PMLicensedFeatures::getSingleton();
/*----------------------------------********---------------------------------*/
if ($licensedFeatures->verifyfeature('95OY24wcXpEMzIyRmlNSnF0STNFSHJzMG9wYTJKekpLNmY2ZmRCeGtuZk5oUDloaUNhUGVjTDJBPT0=')) {
enterpriseClass::setHashPassword($response);
EnterpriseClass::setHashPassword($response);
} else {
return false;
}

View File

@@ -1,50 +1,10 @@
<?php
/**
* class.xmlDb.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.
*
*/
/**
* XMLDB
*
* ProcessMaker Open Source Edition
*
* @copyright (C) 2004 - 2008 Colosa Inc.23
* @package workflow.engine.ProcessMaker
*
*/
/**
* XMLDB
*
* ProcessMaker Open Source Edition
*
* @copyright (C) 2004 - 2008 Colosa Inc.23
* @package workflow.engine.ProcessMaker
*
*/class XMLDB
class XMLDB
{
/**

View File

@@ -1,50 +1,11 @@
<?php
/**
* class.xmlDb.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.
*
*/
/**
* XMLDB
*
* ProcessMaker Open Source Edition
*
* @copyright (C) 2004 - 2008 Colosa Inc.23
* @package workflow.engine.ProcessMaker
*
*/
/**
* XMLResult
*
* ProcessMaker Open Source Edition
*
* @copyright (C) 2004 - 2008 Colosa Inc.23
* @package workflow.engine.ProcessMaker
*
*/class XMLResult
*/
class XMLResult
{
var $result = array ();
var $cursor = 0;

View File

@@ -1,36 +1,10 @@
<?php
/**
* class.xmlfield_InputPM.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.
*
* @package workflow.engine.classes
**/
/**
* Class XmlForm_Field_CheckBoxTable
*/class XmlForm_Field_CheckBoxTable extends XmlForm_Field_Checkbox
*
*/
class XmlForm_Field_CheckBoxTable extends XmlForm_Field_Checkbox
{
/**
@@ -42,11 +16,10 @@
* @param eter string owner
* @return string
*/
public function render ($value = null, $owner = null)
public function render($value = null, $owner = null)
{
//$optionName = $owner->values['USR_UID'];
$optionName = $value;
$onclick = (($this->onclick) ? ' onclick="' . G::replaceDataField( $this->onclick, $owner->values ) . '" ' : '');
$onclick = (($this->onclick) ? ' onclick="' . G::replaceDataField($this->onclick, $owner->values) . '" ' : '');
$html = '<input class="FormCheck" id="form[' . $this->name . '][' . $optionName . ']" name="form[' . $this->name . '][' . $optionName . ']" type=\'checkbox\' value="' . $value . '"' . $onclick . '> <span class="FormCheck"></span></input>';
return $html;
}

View File

@@ -1,36 +1,10 @@
<?php
/**
* class.xmlfield_InputPM.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.
*
* @package workflow.engine.classes
**/
/**
* Class XmlForm_Field_hours
*/class XmlForm_Field_hours extends XmlForm_Field_SimpleText
*
*/
class XmlForm_Field_Hours extends XmlForm_Field_SimpleText
{
public $size = 15;
public $maxLength = 64;
@@ -45,7 +19,7 @@
public $readOnly = false;
public $sqlConnection = 0;
public $sql = '';
public $sqlOption = array ();
public $sqlOption = array();
//Atributes only for grids
public $formula = '';
public $function = '';
@@ -63,21 +37,21 @@
* @param eter string owner
* @return string
*/
public function render ($value = null, $owner = null)
public function render($value = null, $owner = null)
{
if ($this->strTo === 'UPPER') {
$value = strtoupper( $value );
$value = strtoupper($value);
}
if ($this->strTo === 'LOWER') {
$value = strtolower( $value );
$value = strtolower($value);
}
//if ($this->strTo==='CAPITALIZE') $value = strtocapitalize($value);
$onkeypress = G::replaceDataField( $this->onkeypress, $owner->values );
$onkeypress = G::replaceDataField($this->onkeypress, $owner->values);
if ($this->replaceTags == 1) {
$value = G::replaceDataField( $value, $owner->values );
$value = G::replaceDataField($value, $owner->values);
}
if ($this->showVars == 1) {
$this->process = G::replaceDataField( $this->process, $owner->values );
$this->process = G::replaceDataField($this->process, $owner->values);
//$sShowVars = '&nbsp;<a href="#" onclick="showDynaformsFormVars(\'form['.$this->name.']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;">' . $this->symbol . '</a>';
$sShowVars = '&nbsp;<input type="button" value="' . $this->symbol . '" onclick="showDynaformsFormVars(\'form[' . $this->name . ']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;"/>';
} else {
@@ -85,14 +59,14 @@
}
if ($this->mode === 'edit') {
if ($this->readOnly) {
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ) . '\' readOnly="readOnly" style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" onkeypress="' . htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities($value, ENT_COMPAT, 'utf-8') . '\' readOnly="readOnly" style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" onkeypress="' . htmlentities($onkeypress, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
} else {
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ) . '\' style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" onkeypress="' . htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities($value, ENT_COMPAT, 'utf-8') . '\' style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" onkeypress="' . htmlentities($onkeypress, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
}
} elseif ($this->mode === 'view') {
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ) . '\' style="display:none;' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" onkeypress="' . htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '"/>' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities($value, ENT_COMPAT, 'utf-8') . '\' style="display:none;' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" onkeypress="' . htmlentities($onkeypress, ENT_COMPAT, 'utf-8') . '"/>' . $this->htmlentities($value, ENT_COMPAT, 'utf-8');
} else {
return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
return $this->htmlentities($value, ENT_COMPAT, 'utf-8');
}
}
@@ -105,16 +79,16 @@
* @param eter string owner
* @return string
*/
public function renderGrid ($values = array(),$owner)
public function renderGrid($values = array(), $owner)
{
$result = array ();
$result = array();
$r = 1;
foreach ($values as $v) {
if ($this->replaceTags == 1) {
$v = G::replaceDataField( $v, $owner->values );
$v = G::replaceDataField($v, $owner->values);
}
if ($this->showVars == 1) {
$this->process = G::replaceDataField( $this->process, $owner->values );
$this->process = G::replaceDataField($this->process, $owner->values);
//$sShowVars = '&nbsp;<a href="#" onclick="showDynaformsFormVars(\'form['.$owner->name .']['.$r.']['.$this->name.']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;">' . $this->symbol . '</a>';
$sShowVars = '&nbsp;<input type="button" value="' . $this->symbol . '" onclick="showDynaformsFormVars(\'form[' . $owner->name . '][' . $r . '][' . $this->name . ']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;"/>';
} else {
@@ -122,14 +96,14 @@
}
if ($this->mode === 'edit') {
if ($this->readOnly) {
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ) . '" readOnly="readOnly" style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities($v, ENT_COMPAT, 'utf-8') . '" readOnly="readOnly" style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
} else {
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ) . '" style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities($v, ENT_COMPAT, 'utf-8') . '" style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
}
} elseif ($this->mode === 'view') {
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities( number_format( $v, 2 ), ENT_COMPAT, 'utf-8' ) . '</p>';
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities(number_format($v, 2), ENT_COMPAT, 'utf-8') . '</p>';
} else {
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities( number_format( $v, 2 ), ENT_COMPAT, 'utf-8' ) . '</p>';
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities(number_format($v, 2), ENT_COMPAT, 'utf-8') . '</p>';
}
$r ++;
}
@@ -143,7 +117,7 @@
* @param eter string $element
* @return string
*/
public function attachEvents ($element)
public function attachEvents($element)
{
return "myForm.aElements[i] = new G_Text(myForm, $element,'{$this->name}');
myForm.aElements[i].setAttributes(" . $this->getAttributes() . ");";

View File

@@ -1,50 +1,22 @@
<?php
/**
* class.PopupMenu.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.
*
*/
/**
* PopupMenu - PopupMenu
/**
* XmlForm_Field_popupOption - XmlForm_Field_popupOption class
*
* @package workflow.engine.ProcessMaker
* @copyright COLOSA
*/class XmlForm_Field_popupOption extends XmlForm_Field
*/
class XmlForm_Field_PopupOption extends XmlForm_Field
{
var $launch = '';
public $launch = '';
/**
* Get Events
*
* @return string
*/
function getEvents ()
public function getEvents()
{
$script = '{name:"' . $this->name . '",text:"' . addcslashes( $this->label, '\\"' ) . '", launch:leimnud.closure({Function:function(target){' . $this->launch . '}, args:target})}';
$script = '{name:"' . $this->name . '",text:"' . addcslashes($this->label, '\\"') . '", launch:leimnud.closure({Function:function(target){' . $this->launch . '}, args:target})}';
return $script;
}
}

View File

@@ -2387,7 +2387,7 @@ function PMFgetLabelOption ($PROCESS, $DYNAFORM_UID, $FIELD_NAME, $FIELD_SELECTE
{
$data = array();
$data["CURRENT_DYNAFORM"] = $DYNAFORM_UID;
$dynaform = new pmDynaform($data);
$dynaform = new PmDynaform($data);
if ($dynaform->isResponsive()) {
$json = $dynaform->searchFieldByName($DYNAFORM_UID, $FIELD_NAME);
$options = $json->options + $json->optionsSql;
@@ -3127,7 +3127,7 @@ function PMFDynaFormFields($dynUid, $appUid = false, $delIndex = 0)
}
$data["CURRENT_DYNAFORM"] = $dynUid;
$dynaform = new pmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($data));
$dynaform = new PmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($data));
$dynaform->onPropertyRead = function(&$json, $key, $value) {
if (isset($json->data) && !isset($json->value)) {
$json->value = $json->data->value;

View File

@@ -222,7 +222,7 @@ class AddonsManager extends BaseAddonsManager
}
///////
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
$activeLicense = $licenseManager->getActiveLicense();
$data = $data . "Content-Disposition: form-data; name=\"licenseFile\"; filename=\"" . $licenseManager->file . "\"\n";

View File

@@ -34,7 +34,7 @@ class AddonsStore extends BaseAddonsStore
public static function checkLicenseStore()
{
//getting the licenseManager....
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
if (isset($licenseManager->id)) {
//Remove any license store that is not the active license
@@ -71,7 +71,7 @@ class AddonsStore extends BaseAddonsStore
AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); //Getting the licenseManager
$licenseManager = &PmLicenseManager::getSingleton(); //Getting the licenseManager
$result["store_errors"] = array();
list($stores, $errors) = AddonsStore::updateAll(false, $type);
@@ -183,7 +183,7 @@ class AddonsStore extends BaseAddonsStore
AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton(); //Getting the licenseManager
$licenseManager = &PmLicenseManager::getSingleton(); //Getting the licenseManager
$result["store_errors"] = array();
list($stores, $errors) = AddonsStore::updateAll(false);
@@ -350,7 +350,7 @@ class AddonsStore extends BaseAddonsStore
$aPluginsPP = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
}
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
$pmLicenseManagerO = &PmLicenseManager::getSingleton();
$localPlugins = array();
if ($type == 'plugin') {

View File

@@ -142,3 +142,4 @@
define('PML_UPLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/uploadProcess');
define('PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download');
G::defineConstants();

View File

@@ -1386,7 +1386,7 @@ class adminProxy extends HttpProxyController
$oServerConf = &serverConf::getSingleton();
$pluginRegistry = PluginRegistry::loadSingleton();
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
//License Information:
$activeLicense = $licenseManager->getActiveLicense();

View File

@@ -46,7 +46,7 @@ class Main extends Controller
$expireInLabel = '';
require_once ("classes" . PATH_SEP . "class.pmLicenseManager.php");
$pmLicenseManager = &pmLicenseManager::getSingleton();
$pmLicenseManager = &PmLicenseManager::getSingleton();
$expireIn = $pmLicenseManager->getExpireIn();
$expireInLabel = $pmLicenseManager->getExpireInLabel();

View File

@@ -1365,7 +1365,7 @@ class pmTablesProxy extends HttpProxyController
$arrayDynaFormData = $dynaForm->getDynaFormRecordByPk($dynaFormUid, [], false);
if ($arrayDynaFormData !== false) {
$arrayGrid = pmDynaform::getGridsAndFields($arrayDynaFormData['DYN_CONTENT']);
$arrayGrid = PmDynaform::getGridsAndFields($arrayDynaFormData['DYN_CONTENT']);
if ($arrayGrid !== false && isset($arrayGrid[$gridId])) {
$grid = $arrayGrid[$gridId];
@@ -1545,7 +1545,7 @@ class pmTablesProxy extends HttpProxyController
$record = $rsCriteria->getRow();
if ($flagIsBpmn) {
$arrayGrid = pmDynaform::getGridsAndFields($record['DYN_CONTENT']);
$arrayGrid = PmDynaform::getGridsAndFields($record['DYN_CONTENT']);
if ($arrayGrid !== false) {
foreach ($arrayGrid as $value) {

View File

@@ -255,7 +255,7 @@ if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
$enterprise->enable();
$enterprise->setup();
}
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
$pmLicenseManagerO = &PmLicenseManager::getSingleton();
$licenseStatusInfo = $pmLicenseManagerO->getCurrentLicenseStatus();
$licStatusMsg = null;

View File

@@ -978,7 +978,7 @@ class Ajax
$FieldsPmDynaform = $Fields;
$FieldsPmDynaform["PRO_UID"] = $_SESSION['PROCESS'];
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_REQUEST['DYN_UID'];
$a = new pmDynaform($FieldsPmDynaform);
$a = new PmDynaform($FieldsPmDynaform);
if ($a->isResponsive()) {
$a->printView();
} else {

View File

@@ -127,7 +127,7 @@ if ($sStatus == "1" && $sDynUid != "") {
if ($isBPMN) {
$pmDyna = new pmDynaform(array());
$pmDyna = new PmDynaform(array());
$pmDyna->fields["CURRENT_DYNAFORM"] = $sDynUid;
$dataDyna = $pmDyna->getDynaform();
$json = G::json_decode($dataDyna["DYN_CONTENT"]);

View File

@@ -390,7 +390,7 @@ if ($actionAjax == 'dynaformChangeLogViewHistory') {
$FieldsPmDynaform = $Fields;
$FieldsPmDynaform["PRO_UID"] = $_SESSION['PROCESS'];
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_GET['DYN_UID'];
$a = new pmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
$a = new PmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
if ($a->isResponsive()) {
$a->printView();
} else {
@@ -479,7 +479,7 @@ if ($actionAjax == 'historyDynaformGridPreview') {
$FieldsPmDynaform = $Fields;
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_GET['DYN_UID'];
$a = new pmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
$a = new PmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
if ($a->isResponsive()) {
$a->printView();
} else {

View File

@@ -141,7 +141,7 @@ try {
$dataFields = $Fields["APP_DATA"];
$dataFields["CURRENT_DYNAFORM"] = $_GET['UID'];
$oPmDynaform = new pmDynaform($dataFields);
$oPmDynaform = new PmDynaform($dataFields);
$pmdynaform = $oPmDynaform->validatePost($pmdynaform);
$Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], $pmdynaform );

View File

@@ -341,7 +341,7 @@ try {
$FieldsPmDynaform["STEP_MODE"] = $oStep->getStepMode();
$FieldsPmDynaform["PRO_SHOW_MESSAGE"] = $noShowTitle;
$FieldsPmDynaform["TRIGGER_DEBUG"] = $_SESSION['TRIGGER_DEBUG']['ISSET'];
$a = new pmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
$a = new PmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
if ($a->isResponsive()) {
$a->printEdit();
} else {

View File

@@ -149,7 +149,7 @@ if ($_GET['DYN_UID'] != '') {
$FieldsPmDynaform = $Fields;
$FieldsPmDynaform["PRO_UID"] = $_SESSION['PROCESS'];
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_GET['DYN_UID'];
$a = new pmDynaform($FieldsPmDynaform);
$a = new PmDynaform($FieldsPmDynaform);
if ($a->isResponsive()) {
$a->printEditSupervisor();
}else{

View File

@@ -2,6 +2,6 @@
$DYN_UID = $_GET["dyn_uid"];
$_SESSION['PROCESS'] = $_GET["prj_uid"];
$a = new pmDynaform(array("CURRENT_DYNAFORM" => $DYN_UID));
$a = new PmDynaform(array("CURRENT_DYNAFORM" => $DYN_UID));
$a->lang = null;
$a->printPmDynaform();

View File

@@ -70,7 +70,7 @@ try {
if ($result->next()) {
$FieldsPmDynaform = $applicationFields;
$FieldsPmDynaform["CURRENT_DYNAFORM"] = $_REQUEST['DYN_UID'];
$a = new pmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
$a = new PmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($FieldsPmDynaform));
$a->printView();
}
if (file_exists( PATH_DYNAFORM . $applicationFields['PRO_UID'] . PATH_SEP . $_REQUEST['DYN_UID'] . '.xml' )) {

View File

@@ -36,4 +36,4 @@ if (! isset( $_DBArray )) {
$_DBArray = array ();
}
$oDynaformEditorAjax = new dynaformEditorAjax( $_POST );
$oDynaformEditorAjax = new DynaformEditorAjax( $_POST );

View File

@@ -80,7 +80,7 @@ if (isset( $_GET['bpmn'] ) && $_GET['bpmn'] == '1') {
$_SESSION['dynaform_editor'] = 'processmap';
}
$editor = new dynaformEditor( $_POST );
$editor = new DynaformEditor( $_POST );
$editor->file = $dynaform->getDynFilename();
$editor->home = PATH_DYNAFORM;
$editor->title = $dynaform->getDynTitle();

View File

@@ -282,7 +282,7 @@ $_SESSION['_DBArray'] = $_DBArray;
// Additions to javascript
if (isset($sType) && $sType === 'javascript') {
$sCode = urlencode($pmeCode);
$editor = new dynaformEditorAjax($_POST);
$editor = new DynaformEditorAjax($_POST);
$editor->set_javascript($A, $fieldName, $sCode);
}

View File

@@ -2,7 +2,7 @@
AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
$oHeadPublisher = &headPublisher::getSingleton();
if (isset($licenseManager->date) && is_array($licenseManager->date)) {

View File

@@ -51,12 +51,12 @@ try {
$dir = PATH_DATA_SITE;
G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]);
//reading the file that was uploaded
$oPmLicenseManager = &pmLicenseManager::getSingleton();
$oPmLicenseManager = &PmLicenseManager::getSingleton();
$response = $oPmLicenseManager->installLicense($dir . $aInfoLoadFile["name"]);
///////
//This command also find the following file "AddonsStore.php"
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches);
$realId = urlencode($matches[1]);
@@ -210,7 +210,7 @@ try {
}
///////
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
$server = $licenseManager->server;
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
$url = "http://$server/sys".$workspace."/en/green/services/rest";

View File

@@ -133,7 +133,7 @@ class enterprisePlugin extends PMPlugin
require_once (PATH_CORE . 'classes/model/AddonsStore.php');
AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
AddonsStore::updateAll(false);
}

View File

@@ -116,7 +116,7 @@ switch ($option) {
}
///////
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
$server = isset($licenseManager->server) ? $licenseManager->server : '';
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
@@ -292,7 +292,7 @@ switch ($option) {
}
///////
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
$server = (isset($licenseManager->server)) ? $licenseManager->server : '';
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';

View File

@@ -180,7 +180,7 @@ try {
if ($oPluginRegistry->existsTrigger ( PM_LOGIN )) {
$oPluginRegistry->executeTriggers ( PM_LOGIN , $loginInfo );
}
enterpriseClass::enterpriseSystemUpdate($loginInfo);
EnterpriseClass::enterpriseSystemUpdate($loginInfo);
$_SESSION['USER_LOGGED'] = $uid;
$_SESSION['USR_USERNAME'] = $usr;
} else {

View File

@@ -15,11 +15,11 @@ if ($aux['extension'] != 'dat') {
G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]);
//reading the file that was uploaded
$licenseManager =& pmLicenseManager::getSingleton();
$licenseManager =& PmLicenseManager::getSingleton();
$response = $licenseManager->installLicense($dir . $aInfoLoadFile["name"], false, false);
if ($response) {
$licenseManager = new pmLicenseManager();
$licenseManager = new PmLicenseManager();
preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches);
$realId = urlencode($matches[1]);
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';

View File

@@ -208,7 +208,7 @@ $_SESSION['NW_PASSWORD2'] = $pass1;
/*----------------------------------********---------------------------------*/
$licenseManager =& pmLicenseManager::getSingleton();
$licenseManager =& PmLicenseManager::getSingleton();
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
$G_PUBLISH = new Publisher();
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));

View File

@@ -56,7 +56,7 @@ if (isset($_GET['BROWSER_TIME_ZONE_OFFSET'])) {
$record['APP_DATA'] = $caseFields['APP_DATA'];
if (is_null($caseFields['DEL_FINISH_DATE'])) {
$a = new pmDynaform($record);
$a = new PmDynaform($record);
$a->printABE($action,$record);
} else {

View File

@@ -15,7 +15,7 @@ if (isset($_REQUEST['dynaformEditorParams'])) {
$dynaform = new Dynaform();
$dynaform->load($_REQUEST['DYN_UID']);
$editor = new dynaformEditor(array());
$editor = new DynaformEditor(array());
$editor->file = $dynaform->getDynFilename();
$editor->home = PATH_DYNAFORM;
$editor->title = $dynaform->getDynTitle();

View File

@@ -105,12 +105,12 @@ try {
require_once ('classes/model/AddonsStore.php');
AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
AddonsStore::updateAll(false);
$message = G::loadTranslation( 'ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation( 'ID_LOG_AGAIN');
G::SendMessageText($message, "INFO");
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
die('<script type="text/javascript">parent.parent.location = "../login/login";</script>');
}
}
@@ -179,12 +179,12 @@ try {
require_once ('classes/model/AddonsStore.php');
AddonsStore::checkLicenseStore();
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
AddonsStore::updateAll(false);
$message = G::loadTranslation( 'ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation( 'ID_LOG_AGAIN');
G::SendMessageText($message, "INFO");
$licenseManager = &pmLicenseManager::getSingleton();
$licenseManager = &PmLicenseManager::getSingleton();
die('<script type="text/javascript">parent.parent.location = "../login/login";</script>');
}
}

View File

@@ -63,7 +63,7 @@ switch ($_GET['CTO_TYPE_OBJ']) {
$Fields["PRO_UID"] = $_SESSION["PROCESS"];
$Fields["CURRENT_DYNAFORM"] = $_GET["CTO_UID_OBJ"];
$pmDynaForm = new pmDynaform($Fields);
$pmDynaForm = new PmDynaform($Fields);
if ($pmDynaForm->isResponsive()) {
$pmDynaForm->printTracker();

View File

@@ -701,7 +701,7 @@ class SkinEngine
$freeOfChargeText = "";
if (! defined('SKIP_FREE_OF_CHARGE_TEXT'))
$freeOfChargeText = "Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by ProcessMaker and its Certified Partners.";
if(file_exists(PATH_CLASSES."class.pmLicenseManager.php")) $freeOfChargeText="";
if(file_exists(PATH_CLASSES."PmLicenseManager.php")) $freeOfChargeText="";
$fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
if (file_exists($fileFooter)) {
@@ -757,7 +757,7 @@ class SkinEngine
}
if (defined('SYS_SYS')) {
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
$pmLicenseManagerO = &PmLicenseManager::getSingleton();
$expireIn = $pmLicenseManagerO->getExpireIn();
$expireInLabel = $pmLicenseManagerO->getExpireInLabel();

View File

@@ -3,6 +3,7 @@
namespace ProcessMaker\BusinessModel;
use ProcessMaker\Plugins\PluginRegistry;
use PmDynaform;
/**
* Description of ActionsByEmailService
@@ -579,7 +580,7 @@ class ActionsByEmail
$configuration = $resultD->getRow();
$field = new \stdClass();
$obj = new \pmDynaform($configuration);
$obj = new PmDynaform($configuration);
if ($dataRes['ABE_RES_DATA'] !== '') {
$value = unserialize($dataRes['ABE_RES_DATA']);

View File

@@ -10,6 +10,7 @@ use Exception;
use WsBase;
use RBAC;
use Applications;
use PmDynaform;
class Cases
{
@@ -1632,7 +1633,7 @@ class Cases
if (isset($field['type'])) {
if ($field['type'] != 'form') {
foreach ($field as &$val) {
if (is_string($val) && in_array(substr($val, 0, 2), \pmDynaform::$prefixs)) {
if (is_string($val) && in_array(substr($val, 0, 2), PmDynaform::$prefixs)) {
$val = substr($val, 2);
}
}
@@ -1695,7 +1696,7 @@ class Cases
if (!is_null($dynaFormUid)) {
$data["CURRENT_DYNAFORM"] = $dynaFormUid;
$pmDynaForm = new \pmDynaform($data);
$pmDynaForm = new PmDynaform($data);
$arrayDynaFormData = $pmDynaForm->getDynaform();
$arrayDynContent = \G::json_decode($arrayDynaFormData['DYN_CONTENT']);
$pmDynaForm->jsonr($arrayDynContent);

View File

@@ -1,13 +1,14 @@
<?php
namespace ProcessMaker\BusinessModel;
use \G;
use \Smarty;
use \Criteria;
use \ReportTablePeer;
use \ResultSet;
use \CaseConsolidatedCorePeer;
use \ContentPeer;
use G;
use Smarty;
use Criteria;
use ReportTablePeer;
use ResultSet;
use CaseConsolidatedCorePeer;
use ContentPeer;
use PmDynaform;
/**
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
@@ -468,7 +469,7 @@ class Consolidated
$dataTask = $oDyna->load($dyn_uid);
if ($dataTask['DYN_VERSION'] > 0) {
$_SESSION['PROCESS'] = $pro_uid;
$pmDyna = new \pmDynaform(array('APP_DATA' => array(), "CURRENT_DYNAFORM" => $dyn_uid));
$pmDyna = new PmDynaform(array('APP_DATA' => array(), "CURRENT_DYNAFORM" => $dyn_uid));
$json = G::json_decode($dataTask["DYN_CONTENT"]);
$pmDyna->jsonr($json);
$fieldsDyna = $json->items[0]->items;

View File

@@ -1,6 +1,8 @@
<?php
namespace ProcessMaker\BusinessModel;
use PmDynaform;
class InputDocument
{
private $arrayFieldDefinition = array(
@@ -378,7 +380,7 @@ class InputDocument
$result = $inputDocument->update($arrayData);
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$pmDynaform->synchronizeInputDocument($processUid, $arrayData);
//Return

View File

@@ -8,6 +8,7 @@ use UsersPeer;
use AppDelegationPeer;
use AppDelayPeer;
use ProcessMaker\Util\DateTime;
use PmLicenseManager;
class Light
{
@@ -779,7 +780,7 @@ class Light
/*----------------------------------********---------------------------------*/
$licenseManager =& \pmLicenseManager::getSingleton();
$licenseManager =& PmLicenseManager::getSingleton();
if (in_array(md5($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
$G_PUBLISH = new \Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');

View File

@@ -2,6 +2,7 @@
namespace ProcessMaker\BusinessModel\Light;
use PmDynaform;
class Tracker
{
@@ -266,7 +267,7 @@ class Tracker
$Fields["PRO_UID"] = $pro_uid;
$Fields["CURRENT_DYNAFORM"] = $obj_uid;
$pmDynaForm = new \pmDynaform($Fields);
$pmDynaForm = new PmDynaform($Fields);
// if ($pmDynaForm->isResponsive()) {
// $pmDynaForm->printTracker();

View File

@@ -4,6 +4,7 @@ namespace ProcessMaker\BusinessModel;
use G;
use Exception;
use AdditionalTables;
use PmDynaform;
class Variable
{
@@ -194,7 +195,7 @@ class Variable
"VAR_ACCEPTED_VALUES" => $variable->getVarAcceptedValues()
);
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$pmDynaform->synchronizeVariable($processUid, $newVariable, $oldVariable);
} else {
@@ -236,7 +237,7 @@ class Variable
$this->throwExceptionIfVariableIsAssociatedAditionalTable($variableUid);
$variable = $this->getVariable($processUid, $variableUid);
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$isUsed = $pmDynaform->isUsed($processUid, $variable);
if ($isUsed !== false) {
$titleDynaform=$pmDynaform->getDynaformTitle($isUsed);
@@ -783,7 +784,7 @@ class Variable
//This value is required to be able to query the database.
$_SESSION["PROCESS"] = $proUid;
//The pmdynaform class is instantiated
$pmDynaform = new \pmDynaform(array("APP_DATA" => $params));
$pmDynaform = new PmDynaform(array("APP_DATA" => $params));
//Get control from dynaform.
//The parameters: queryFilter, queryStart, queryLimit, are only necessary

View File

@@ -2,12 +2,13 @@
namespace ProcessMaker\Services\Api;
use \G;
use \ProcessMaker\Project\Adapter;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
use \ProcessMaker\BusinessModel\Validator;
use \ProcessMaker\Util\DateTime;
use G;
use ProcessMaker\Project\Adapter;
use ProcessMaker\Services\Api;
use Luracast\Restler\RestException;
use ProcessMaker\BusinessModel\Validator;
use ProcessMaker\Util\DateTime;
use PmDynaform;
/**
*
@@ -867,7 +868,7 @@ class Light extends Api
$response = $process->getDynaForms($prj_uid);
$result = $this->parserDataDynaForm($response);
$pmDynaForm = new \pmDynaform();
$pmDynaForm = new PmDynaform();
foreach ($result as $k => $form) {
$result[$k]['formContent'] = (isset($form['formContent']) && $form['formContent'] != null)?json_decode($form['formContent']):"";
$pmDynaForm->jsonr($result[$k]['formContent']);
@@ -1009,7 +1010,7 @@ class Light extends Api
$caseVariables = DateTime::convertUtcToTimeZone($caseVariables);
}
$pmDynaform = new \pmDynaform(array("APP_DATA" => $caseVariables, "CURRENT_DYNAFORM" => $dyn_uid));
$pmDynaform = new PmDynaform(array("APP_DATA" => $caseVariables, "CURRENT_DYNAFORM" => $dyn_uid));
$pmDynaform->jsonr($result['formContent']);
return $result;
} catch (\Exception $e) {
@@ -1033,7 +1034,7 @@ class Light extends Api
$result = $this->parserDataDynaForm($response);
$result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null) ? \G::json_decode($result['formContent']) : "";
$pmDynaForm = new \pmDynaform(["CURRENT_DYNAFORM" => $dyn_uid]);
$pmDynaForm = new PmDynaform(["CURRENT_DYNAFORM" => $dyn_uid]);
$pmDynaForm->jsonr($result['formContent']);
return $result;
} catch (\Exception $e) {
@@ -1057,7 +1058,7 @@ class Light extends Api
$return = array();
foreach ($request_data['formId'] as $dyn_uid) {
$response = $dynaForm->getDynaForm($dyn_uid);
$pmDynaForm = new \pmDynaform(array("CURRENT_DYNAFORM" => $dyn_uid));
$pmDynaForm = new PmDynaform(array("CURRENT_DYNAFORM" => $dyn_uid));
$result = $this->parserDataDynaForm($response);
$result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null)?json_decode($result['formContent']):"";
$pmDynaForm->jsonr($result['formContent']);

View File

@@ -1,9 +1,10 @@
<?php
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
use \ProcessMaker\Util\DateTime;
use ProcessMaker\Services\Api;
use Luracast\Restler\RestException;
use ProcessMaker\Util\DateTime;
use PmDynaform;
/**
* Project\DynaForm Api Controller
@@ -128,7 +129,7 @@ class DynaForm extends Api
{
try {
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
return $pmDynaform->downloadLanguage($dyn_uid, $lang);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -145,7 +146,7 @@ class DynaForm extends Api
{
try {
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$pmDynaform->uploadLanguage($dyn_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -162,7 +163,7 @@ class DynaForm extends Api
{
try {
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
$pmDynaform->deleteLanguage($dyn_uid, $lang);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -179,7 +180,7 @@ class DynaForm extends Api
{
try {
$pmDynaform = new \pmDynaform();
$pmDynaform = new PmDynaform();
return $pmDynaform->listLanguage($dyn_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -283,6 +283,8 @@ define( 'PML_WSDL_URL', PML_SERVER . '/syspmLibrary/en/green/services/wsdl' );
define( 'PML_UPLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/uploadProcess' );
define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download' );
G::defineConstants();
$config = Bootstrap::getSystemConfiguration();
// starting session