From e5d0258cc4ac5edd069ccb6a71d117d745802d93 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 22 Aug 2017 17:20:16 -0400 Subject: [PATCH 01/20] HOR-3773 --- workflow/engine/classes/class.AppDocumentDrive.php | 6 ++++++ workflow/engine/classes/class.AppSolr.php | 7 +++++++ workflow/engine/classes/class.ArrayPeer.php | 7 +++++++ workflow/engine/classes/class.BasePeer.php | 7 +++++++ workflow/engine/classes/class.Installer.php | 7 +++++++ workflow/engine/classes/class.Upgrade.php | 6 ++++++ workflow/engine/classes/class.actionsByEmailCore.php | 7 +++++++ workflow/engine/classes/class.applications.php | 7 +++++++ workflow/engine/classes/class.archive.php | 7 +++++++ workflow/engine/classes/class.calendar.php | 7 +++++++ workflow/engine/classes/class.case.php | 7 +++++++ workflow/engine/classes/class.cli.php | 7 +++++++ workflow/engine/classes/class.configuration.php | 7 +++++++ workflow/engine/classes/class.consolidatedCases.php | 7 +++++++ workflow/engine/classes/class.dashboards.php | 7 +++++++ workflow/engine/classes/class.dashletOpenVSCompleted.php | 7 +++++++ .../engine/classes/class.dashletProcessMakerCommunity.php | 7 +++++++ .../engine/classes/class.dashletProcessMakerEnterprise.php | 7 +++++++ workflow/engine/classes/class.dashletRssReader.php | 7 +++++++ workflow/engine/classes/class.dates.php | 7 +++++++ workflow/engine/classes/class.dbConnections.php | 7 +++++++ workflow/engine/classes/class.derivation.php | 7 +++++++ workflow/engine/classes/class.dynaFormField.php | 7 +++++++ workflow/engine/classes/class.dynaformEditor.php | 7 +++++++ workflow/engine/classes/class.enterprise.php | 7 +++++++ workflow/engine/classes/class.enterpriseUtils.php | 7 +++++++ workflow/engine/classes/class.fieldValidator.php | 7 +++++++ workflow/engine/classes/class.fileCache.php | 7 +++++++ workflow/engine/classes/class.formBatchRouting.php | 7 +++++++ workflow/engine/classes/class.groupUser.php | 7 +++++++ workflow/engine/classes/class.groups.php | 7 +++++++ workflow/engine/classes/class.indicatorsCalculator.php | 7 +++++++ workflow/engine/classes/class.javaBridgePM.php | 7 +++++++ workflow/engine/classes/class.labelsGmail.php | 7 +++++++ workflow/engine/classes/class.ldapAdvanced.php | 7 +++++++ workflow/engine/classes/class.license.app.php | 7 +++++++ workflow/engine/classes/class.license.lib.php | 7 +++++++ workflow/engine/classes/class.licensedFeatures.php | 7 +++++++ workflow/engine/classes/class.memcached.php | 7 +++++++ workflow/engine/classes/class.multipleFilesBackup.php | 7 +++++++ workflow/engine/classes/class.net.php | 7 +++++++ workflow/engine/classes/class.patch.php | 7 +++++++ workflow/engine/classes/class.pluginRegistry.php | 7 +++++++ workflow/engine/classes/class.pmDashlet.php | 7 +++++++ workflow/engine/classes/class.pmDrive.php | 7 +++++++ workflow/engine/classes/class.pmDynaform.php | 7 +++++++ workflow/engine/classes/class.pmGauge.php | 7 +++++++ workflow/engine/classes/class.pmGoogleApi.php | 7 +++++++ workflow/engine/classes/class.pmLicenseManager.php | 7 +++++++ workflow/engine/classes/class.pmPhing.php | 7 +++++++ workflow/engine/classes/class.pmSso.php | 7 +++++++ workflow/engine/classes/class.pmTable.php | 7 +++++++ workflow/engine/classes/class.popupMenu.php | 7 +++++++ workflow/engine/classes/class.processMap.php | 7 +++++++ workflow/engine/classes/class.processes.php | 7 +++++++ workflow/engine/classes/class.propelTable.php | 7 +++++++ workflow/engine/classes/class.replacementLogo.php | 7 +++++++ workflow/engine/classes/class.report.php | 7 +++++++ workflow/engine/classes/class.reportTables.php | 7 +++++++ workflow/engine/classes/class.searchIndex.php | 7 +++++++ workflow/engine/classes/class.serverConfiguration.php | 7 +++++++ workflow/engine/classes/class.sessions.php | 7 +++++++ workflow/engine/classes/class.solr.php | 7 +++++++ workflow/engine/classes/class.spool.php | 7 +++++++ workflow/engine/classes/class.system.php | 7 +++++++ workflow/engine/classes/class.tasks.php | 7 +++++++ workflow/engine/classes/class.toolBar.php | 7 +++++++ workflow/engine/classes/class.triggerLibrary.php | 7 +++++++ workflow/engine/classes/class.wsBase.php | 7 +++++++ workflow/engine/classes/class.wsResponse.php | 7 +++++++ workflow/engine/classes/class.wsTools.php | 7 +++++++ workflow/engine/classes/class.xmlDb.php | 7 +++++++ workflow/engine/classes/class.xmlfield_Image.php | 7 +++++++ workflow/engine/classes/class.xmlfield_InputPM.php | 7 +++++++ 74 files changed, 516 insertions(+) create mode 100644 workflow/engine/classes/class.AppDocumentDrive.php create mode 100644 workflow/engine/classes/class.AppSolr.php create mode 100644 workflow/engine/classes/class.ArrayPeer.php create mode 100644 workflow/engine/classes/class.BasePeer.php create mode 100644 workflow/engine/classes/class.Installer.php create mode 100644 workflow/engine/classes/class.Upgrade.php create mode 100644 workflow/engine/classes/class.actionsByEmailCore.php create mode 100644 workflow/engine/classes/class.applications.php create mode 100644 workflow/engine/classes/class.archive.php create mode 100644 workflow/engine/classes/class.calendar.php create mode 100644 workflow/engine/classes/class.case.php create mode 100644 workflow/engine/classes/class.cli.php create mode 100644 workflow/engine/classes/class.configuration.php create mode 100644 workflow/engine/classes/class.consolidatedCases.php create mode 100644 workflow/engine/classes/class.dashboards.php create mode 100644 workflow/engine/classes/class.dashletOpenVSCompleted.php create mode 100644 workflow/engine/classes/class.dashletProcessMakerCommunity.php create mode 100644 workflow/engine/classes/class.dashletProcessMakerEnterprise.php create mode 100644 workflow/engine/classes/class.dashletRssReader.php create mode 100644 workflow/engine/classes/class.dates.php create mode 100644 workflow/engine/classes/class.dbConnections.php create mode 100644 workflow/engine/classes/class.derivation.php create mode 100644 workflow/engine/classes/class.dynaFormField.php create mode 100644 workflow/engine/classes/class.dynaformEditor.php create mode 100644 workflow/engine/classes/class.enterprise.php create mode 100644 workflow/engine/classes/class.enterpriseUtils.php create mode 100644 workflow/engine/classes/class.fieldValidator.php create mode 100644 workflow/engine/classes/class.fileCache.php create mode 100644 workflow/engine/classes/class.formBatchRouting.php create mode 100644 workflow/engine/classes/class.groupUser.php create mode 100644 workflow/engine/classes/class.groups.php create mode 100644 workflow/engine/classes/class.indicatorsCalculator.php create mode 100644 workflow/engine/classes/class.javaBridgePM.php create mode 100644 workflow/engine/classes/class.labelsGmail.php create mode 100644 workflow/engine/classes/class.ldapAdvanced.php create mode 100644 workflow/engine/classes/class.license.app.php create mode 100644 workflow/engine/classes/class.license.lib.php create mode 100644 workflow/engine/classes/class.licensedFeatures.php create mode 100644 workflow/engine/classes/class.memcached.php create mode 100644 workflow/engine/classes/class.multipleFilesBackup.php create mode 100644 workflow/engine/classes/class.net.php create mode 100644 workflow/engine/classes/class.patch.php create mode 100644 workflow/engine/classes/class.pluginRegistry.php create mode 100644 workflow/engine/classes/class.pmDashlet.php create mode 100644 workflow/engine/classes/class.pmDrive.php create mode 100644 workflow/engine/classes/class.pmDynaform.php create mode 100644 workflow/engine/classes/class.pmGauge.php create mode 100644 workflow/engine/classes/class.pmGoogleApi.php create mode 100644 workflow/engine/classes/class.pmLicenseManager.php create mode 100644 workflow/engine/classes/class.pmPhing.php create mode 100644 workflow/engine/classes/class.pmSso.php create mode 100644 workflow/engine/classes/class.pmTable.php create mode 100644 workflow/engine/classes/class.popupMenu.php create mode 100644 workflow/engine/classes/class.processMap.php create mode 100644 workflow/engine/classes/class.processes.php create mode 100644 workflow/engine/classes/class.propelTable.php create mode 100644 workflow/engine/classes/class.replacementLogo.php create mode 100644 workflow/engine/classes/class.report.php create mode 100644 workflow/engine/classes/class.reportTables.php create mode 100644 workflow/engine/classes/class.searchIndex.php create mode 100644 workflow/engine/classes/class.serverConfiguration.php create mode 100644 workflow/engine/classes/class.sessions.php create mode 100644 workflow/engine/classes/class.solr.php create mode 100644 workflow/engine/classes/class.spool.php create mode 100644 workflow/engine/classes/class.system.php create mode 100644 workflow/engine/classes/class.tasks.php create mode 100644 workflow/engine/classes/class.toolBar.php create mode 100644 workflow/engine/classes/class.triggerLibrary.php create mode 100644 workflow/engine/classes/class.wsBase.php create mode 100644 workflow/engine/classes/class.wsResponse.php create mode 100644 workflow/engine/classes/class.wsTools.php create mode 100644 workflow/engine/classes/class.xmlDb.php create mode 100644 workflow/engine/classes/class.xmlfield_Image.php create mode 100644 workflow/engine/classes/class.xmlfield_InputPM.php diff --git a/workflow/engine/classes/class.AppDocumentDrive.php b/workflow/engine/classes/class.AppDocumentDrive.php new file mode 100644 index 000000000..c00b89868 --- /dev/null +++ b/workflow/engine/classes/class.AppDocumentDrive.php @@ -0,0 +1,6 @@ + Date: Wed, 23 Aug 2017 13:38:43 -0400 Subject: [PATCH 02/20] HOR-3474 update update udpate udpate --- .../pear/HTTP/WebDAV/Server/Filesystem.php | 5 +- thirdparty/pear/OS/Guess.php | 4 +- thirdparty/pear/PEAR/Builder.php | 4 +- thirdparty/pear/PEAR/Command/Package.php | 15 ++-- thirdparty/pear/PEAR/Common.php | 11 ++- thirdparty/pear/PEAR/Config.php | 7 +- thirdparty/pear/PEAR/Installer.php | 5 +- thirdparty/pear/PEAR/Packager.php | 3 +- thirdparty/pear/PEAR/Registry.php | 1 - thirdparty/pear/PEAR/Remote.php | 4 +- .../pear/{System.php => PearSystem.php} | 76 +++++++++---------- thirdparty/pear/package-PEAR.xml | 4 +- .../classes/propel/phing/PropelSQLExec.php | 8 +- workflow/engine/classes/class.webdav.php | 5 +- 14 files changed, 71 insertions(+), 81 deletions(-) rename thirdparty/pear/{System.php => PearSystem.php} (88%) diff --git a/thirdparty/pear/HTTP/WebDAV/Server/Filesystem.php b/thirdparty/pear/HTTP/WebDAV/Server/Filesystem.php index 5b98f0eac..7e2520c7c 100644 --- a/thirdparty/pear/HTTP/WebDAV/Server/Filesystem.php +++ b/thirdparty/pear/HTTP/WebDAV/Server/Filesystem.php @@ -1,7 +1,6 @@ _slashify($options["path"])."%'"; mysql_query($query); - System::rm("-rf $path"); + PearSystem::rm("-rf $path"); } else { unlink ($path); } @@ -577,7 +576,7 @@ mysql_query($query); } else { if (is_dir($source)) { - $files = System::find($source); + $files = PearSystem::find($source); $files = array_reverse($files); } else { $files = array($source); diff --git a/thirdparty/pear/OS/Guess.php b/thirdparty/pear/OS/Guess.php index abcae5946..356741959 100644 --- a/thirdparty/pear/OS/Guess.php +++ b/thirdparty/pear/OS/Guess.php @@ -159,8 +159,8 @@ class OS_Guess { // Use glibc's header file to // get major and minor version number: - include_once "System.php"; - $tmpfile = System::mktemp("glibctest"); + include_once "PearSystem.php"; + $tmpfile = PearSystem::mktemp("glibctest"); $fp = fopen($tmpfile, "w"); fwrite($fp, "#include \n__GLIBC__ __GLIBC_MINOR__\n"); fclose($fp); diff --git a/thirdparty/pear/PEAR/Builder.php b/thirdparty/pear/PEAR/Builder.php index e862312a0..d404ea9a7 100644 --- a/thirdparty/pear/PEAR/Builder.php +++ b/thirdparty/pear/PEAR/Builder.php @@ -245,9 +245,9 @@ class PEAR_Builder extends PEAR_Common $build_dir = "$build_basedir/$info[package]-$info[version]"; $this->log(1, "building in $build_dir"); if (is_dir($build_dir)) { - System::rm("-rf $build_dir"); + PearSystem::rm("-rf $build_dir"); } - if (!System::mkDir("-p $build_dir")) { + if (!PearSystem::mkDir("-p $build_dir")) { return $this->raiseError("could not create build dir: $build_dir"); } $this->addTempFile($build_dir); diff --git a/thirdparty/pear/PEAR/Command/Package.php b/thirdparty/pear/PEAR/Command/Package.php index ac9f264aa..55f68829e 100644 --- a/thirdparty/pear/PEAR/Command/Package.php +++ b/thirdparty/pear/PEAR/Command/Package.php @@ -531,9 +531,9 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm return $this->raiseError($info); } include_once "Archive/Tar.php"; - include_once "System.php"; + include_once "PearSystem.php"; $tar = new Archive_Tar($params[0]); - $tmpdir = System::mktemp('-d pearsign'); + $tmpdir = PearSystem::mktemp('-d pearsign'); if (!$tar->extractList('package.xml package.sig', $tmpdir)) { return $this->raiseError("failed to extract tar file"); } @@ -569,10 +569,10 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm } include_once "Archive/Tar.php"; include_once "PEAR/Installer.php"; - include_once "System.php"; + include_once "PearSystem.php"; $tar = new Archive_Tar($params[0]); - $tmpdir = System::mktemp('-d pear2rpm'); - $instroot = System::mktemp('-d pear2rpm'); + $tmpdir = PearSystem::mktemp('-d pear2rpm'); + $instroot = PearSystem::mktemp('-d pear2rpm'); $tmp = $this->config->get('verbose'); $this->config->set('verbose', 0); $installer = new PEAR_Installer($this->ui); @@ -592,10 +592,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm if (!file_exists("$tmpdir/package.xml")) { return $this->raiseError("no package.xml found in $params[0]"); } -// System::mkdir("-p $instroot$info[rpm_xml_dir]"); -// if (!@copy("$tmpdir/package.xml", "$instroot$info[rpm_xml_dir]/$info[package].xml")) { -// return $this->raiseError("could not copy package.xml file: $php_errormsg"); -// } + if (isset($options['spec-template'])) { $spec_template = $options['spec-template']; } else { diff --git a/thirdparty/pear/PEAR/Common.php b/thirdparty/pear/PEAR/Common.php index ab84ff6b1..519ef4b26 100644 --- a/thirdparty/pear/PEAR/Common.php +++ b/thirdparty/pear/PEAR/Common.php @@ -21,7 +21,6 @@ require_once 'PEAR.php'; require_once 'Archive/Tar.php'; -require_once 'System.php'; require_once 'PEAR/Config.php'; // {{{ constants and globals @@ -156,7 +155,7 @@ class PEAR_Common extends PEAR $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles']; while ($file = array_shift($tempfiles)) { if (@is_dir($file)) { - System::rm("-rf $file"); + PearSystem::rm("-rf $file"); } elseif (file_exists($file)) { unlink($file); } @@ -186,7 +185,7 @@ class PEAR_Common extends PEAR // {{{ mkDirHier() /** - * Wrapper to System::mkDir(), creates a directory as well as + * Wrapper to PearSystem::mkDir(), creates a directory as well as * any necessary parent directories. * * @param string $dir directory name @@ -198,7 +197,7 @@ class PEAR_Common extends PEAR function mkDirHier($dir) { $this->log(2, "+ create dir $dir"); - return System::mkDir("-p $dir"); + return PearSystem::mkDir("-p $dir"); } // }}} @@ -246,7 +245,7 @@ class PEAR_Common extends PEAR } else { $topt = ''; } - if (!$tmpdir = System::mktemp($topt . '-d pear')) { + if (!$tmpdir = PearSystem::mktemp($topt . '-d pear')) { return false; } $this->addTempFile($tmpdir); @@ -686,7 +685,7 @@ class PEAR_Common extends PEAR break; } } - $tmpdir = System::mkTemp('-d pear'); + $tmpdir = PearSystem::mkTemp('-d pear'); $this->addTempFile($tmpdir); if (!$xml || !$tar->extractList($xml, $tmpdir)) { return $this->raiseError('could not extract the package.xml file'); diff --git a/thirdparty/pear/PEAR/Config.php b/thirdparty/pear/PEAR/Config.php index 6cc2e40f4..2832bae01 100644 --- a/thirdparty/pear/PEAR/Config.php +++ b/thirdparty/pear/PEAR/Config.php @@ -19,7 +19,6 @@ // $Id: Config.php,v 1.43 2003/03/18 12:06:06 ssb Exp $ require_once 'PEAR.php'; -require_once 'System.php'; /** * Last created PEAR_Config instance. @@ -112,7 +111,7 @@ if (getenv('PHP_PEAR_CACHE_DIR')) { define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR')); } else { define('PEAR_CONFIG_DEFAULT_CACHE_DIR', - System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + PearSystem::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . DIRECTORY_SEPARATOR . 'cache'); } @@ -164,7 +163,7 @@ if (getenv('PHP_PEAR_SIG_BIN')) { define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN')); } else { define('PEAR_CONFIG_DEFAULT_SIG_BIN', - System::which( + PearSystem::which( 'gpg', OS_WINDOWS ? 'c:\gnupg\gpg.exe' : '/usr/local/bin/gpg')); } @@ -564,7 +563,7 @@ class PEAR_Config extends PEAR } $data = $this->configuration[$layer]; $this->_encodeOutput($data); - if (!@System::mkDir("-p " . dirname($file))) { + if (!@PearSystem::mkDir("-p " . dirname($file))) { return $this->raiseError("could not create directory: " . dirname($file)); } if (@is_file($file) && !@is_writeable($file)) { diff --git a/thirdparty/pear/PEAR/Installer.php b/thirdparty/pear/PEAR/Installer.php index 6fc5e1491..a2aca03f9 100644 --- a/thirdparty/pear/PEAR/Installer.php +++ b/thirdparty/pear/PEAR/Installer.php @@ -22,7 +22,6 @@ require_once 'PEAR/Common.php'; require_once 'PEAR/Registry.php'; require_once 'PEAR/Dependency.php'; -require_once 'System.php'; define('PEAR_INSTALLER_OK', 1); define('PEAR_INSTALLER_FAILED', 0); @@ -534,7 +533,7 @@ class PEAR_Installer extends PEAR_Common if ($need_download) { $downloaddir = $this->config->get('download_dir'); if (empty($downloaddir)) { - if (PEAR::isError($downloaddir = System::mktemp('-d'))) { + if (PEAR::isError($downloaddir = PearSystem::mktemp('-d'))) { return $downloaddir; } $this->log(2, '+ tmp dir created at ' . $downloaddir); @@ -559,7 +558,7 @@ class PEAR_Installer extends PEAR_Common chdir($oldcwd); } - if (PEAR::isError($tmpdir = System::mktemp('-d'))) { + if (PEAR::isError($tmpdir = PearSystem::mktemp('-d'))) { return $tmpdir; } $this->log(2, '+ tmp dir created at ' . $tmpdir); diff --git a/thirdparty/pear/PEAR/Packager.php b/thirdparty/pear/PEAR/Packager.php index f0a240d7c..5e29dbcf4 100644 --- a/thirdparty/pear/PEAR/Packager.php +++ b/thirdparty/pear/PEAR/Packager.php @@ -20,7 +20,6 @@ // $Id: Packager.php,v 1.46 2003/03/18 12:06:06 ssb Exp $ require_once 'PEAR/Common.php'; -require_once 'System.php'; /** * Administration class used to make a PEAR release tarball. @@ -116,7 +115,7 @@ class PEAR_Packager extends PEAR_Common chdir($oldcwd); return $this->raiseError($new_xml); } - if (!($tmpdir = System::mktemp('-t '.getcwd().' -d'))) { + if (!($tmpdir = PearSystem::mktemp('-t '.getcwd().' -d'))) { chdir($oldcwd); return $this->raiseError("PEAR_Packager: mktemp failed"); } diff --git a/thirdparty/pear/PEAR/Registry.php b/thirdparty/pear/PEAR/Registry.php index 6304523aa..49ca4edb9 100644 --- a/thirdparty/pear/PEAR/Registry.php +++ b/thirdparty/pear/PEAR/Registry.php @@ -26,7 +26,6 @@ TODO: - Add application level lock (avoid change the registry from the cmdline while using the GTK interface, for ex.) */ -require_once "System.php"; require_once "PEAR.php"; define('PEAR_REGISTRY_ERROR_LOCK', -2); diff --git a/thirdparty/pear/PEAR/Remote.php b/thirdparty/pear/PEAR/Remote.php index b6108e2b4..915cf9fb3 100644 --- a/thirdparty/pear/PEAR/Remote.php +++ b/thirdparty/pear/PEAR/Remote.php @@ -56,7 +56,7 @@ class PEAR_Remote extends PEAR $id = $this->encryptOld(serialize($args)); $cachedir = $this->config->get('cache_dir'); if (!file_exists($cachedir)) { - System::mkdir('-p '.$cachedir); + PearSystem::mkdir('-p '.$cachedir); } $filename = $cachedir . DIRECTORY_SEPARATOR . 'xmlrpc_cache_' . $id; if (!file_exists($filename)) { @@ -86,7 +86,7 @@ class PEAR_Remote extends PEAR $id = $this->encryptOld(serialize($args)); $cachedir = $this->config->get('cache_dir'); if (!file_exists($cachedir)) { - System::mkdir('-p '.$cachedir); + PearSystem::mkdir('-p '.$cachedir); } $filename = $cachedir.'/xmlrpc_cache_'.$id; diff --git a/thirdparty/pear/System.php b/thirdparty/pear/PearSystem.php similarity index 88% rename from thirdparty/pear/System.php rename to thirdparty/pear/PearSystem.php index 910596988..943fdf80b 100644 --- a/thirdparty/pear/System.php +++ b/thirdparty/pear/PearSystem.php @@ -37,14 +37,14 @@ $GLOBALS['_System_temp_files'] = array(); * http://pear.php.net/manual/ * * Example usage: -* if (!@System::rm('-r file1 dir1')) { +* if (!@PearSystem::rm('-r file1 dir1')) { * print "could not delete file1 or dir1"; * } * * In case you need to to pass file names with spaces, * pass the params as an array: * -* System::rm(array('-r', $file1, $dir1)); +* PearSystem::rm(array('-r', $file1, $dir1)); * * @package System * @author Tomas V.V.Cox @@ -52,7 +52,7 @@ $GLOBALS['_System_temp_files'] = array(); * @access public * @see http://pear.php.net/manual/ */ -class System +class PearSystem { /** * returns the commandline arguments of a function @@ -73,7 +73,7 @@ class System /** * Output errors with PHP trigger_error(). You can silence the errors - * with prefixing a "@" sign to the function call: @System::mkdir(..); + * with prefixing a "@" sign to the function call: @PearSystem::mkdir(..); * * @param mixed $error a PEAR error or a string with the error message * @return bool false @@ -91,7 +91,7 @@ class System /** * Creates a nested array representing the structure of a directory * - * System::_dirToStruct('dir1', 0) => + * PearSystem::_dirToStruct('dir1', 0) => * Array * ( * [dirs] => Array @@ -116,7 +116,7 @@ class System { $struct = array('dirs' => array(), 'files' => array()); if (($dir = @opendir($sPath)) === false) { - System::raiseError("Could not open dir $sPath"); + PearSystem::raiseError("Could not open dir $sPath"); return $struct; // XXX could not open error } $struct['dirs'][] = $sPath; // XXX don't add if '.' or '..' ? @@ -132,7 +132,7 @@ class System foreach($list as $val) { $path = $sPath . DIRECTORY_SEPARATOR . $val; if (is_dir($path)) { - $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1); + $tmp = PearSystem::_dirToStruct($path, $maxinst, $aktinst+1); $struct = array_merge_recursive($tmp, $struct); } else { $struct['files'][] = $path; @@ -147,7 +147,7 @@ class System * * @param array $files Array listing files and dirs * @return array - * @see System::_dirToStruct() + * @see PearSystem::_dirToStruct() */ function _multipleToStruct($files) { @@ -155,7 +155,7 @@ class System settype($files, 'array'); foreach ($files as $file) { if (is_dir($file)) { - $tmp = System::_dirToStruct($file, 0); + $tmp = PearSystem::_dirToStruct($file, 0); $struct = array_merge_recursive($tmp, $struct); } else { $struct['files'][] = $file; @@ -174,9 +174,9 @@ class System */ function rm($args) { - $opts = System::_parseArgs($args, 'rf'); // "f" do nothing but like it :-) + $opts = PearSystem::_parseArgs($args, 'rf'); // "f" do nothing but like it :-) if (PEAR::isError($opts)) { - return System::raiseError($opts); + return PearSystem::raiseError($opts); } foreach($opts[0] as $opt) { if ($opt[0] == 'r') { @@ -185,7 +185,7 @@ class System } $ret = true; if (isset($do_recursive)) { - $struct = System::_multipleToStruct($opts[1]); + $struct = PearSystem::_multipleToStruct($opts[1]); foreach($struct['files'] as $file) { if (!@unlink($file)) { $ret = false; @@ -209,7 +209,7 @@ class System /** * Make directories. Note that we use call_user_func('mkdir') to avoid - * a problem with ZE2 calling System::mkDir instead of the native PHP func. + * a problem with ZE2 calling PearSystem::mkDir instead of the native PHP func. * * @param string $args the name of the director(y|ies) to create * @return bool True for success @@ -217,9 +217,9 @@ class System */ function mkDir($args) { - $opts = System::_parseArgs($args, 'pm:'); + $opts = PearSystem::_parseArgs($args, 'pm:'); if (PEAR::isError($opts)) { - return System::raiseError($opts); + return PearSystem::raiseError($opts); } $mode = 0777; // default mode foreach($opts[0] as $opt) { @@ -265,9 +265,9 @@ class System * Concatenate files * * Usage: - * 1) $var = System::cat('sample.txt test.txt'); - * 2) System::cat('sample.txt test.txt > final.txt'); - * 3) System::cat('sample.txt test.txt >> final.txt'); + * 1) $var = PearSystem::cat('sample.txt test.txt'); + * 2) PearSystem::cat('sample.txt test.txt > final.txt'); + * 3) PearSystem::cat('sample.txt test.txt >> final.txt'); * * Note: as the class use fopen, urls should work also (test that) * @@ -297,14 +297,14 @@ class System } if (isset($mode)) { if (!$outputfd = fopen($outputfile, $mode)) { - $err = System::raiseError("Could not open $outputfile"); + $err = PearSystem::raiseError("Could not open $outputfile"); return $err; } $ret = true; } foreach ($files as $file) { if (!$fd = fopen($file, 'r')) { - System::raiseError("Could not open $file"); + PearSystem::raiseError("Could not open $file"); continue; } while ($cont = fread($fd, 2048)) { @@ -327,10 +327,10 @@ class System * the created files when the scripts finish its execution. * * Usage: - * 1) $tempfile = System::mktemp("prefix"); - * 2) $tempdir = System::mktemp("-d prefix"); - * 3) $tempfile = System::mktemp(); - * 4) $tempfile = System::mktemp("-t /var/tmp prefix"); + * 1) $tempfile = PearSystem::mktemp("prefix"); + * 2) $tempdir = PearSystem::mktemp("-d prefix"); + * 3) $tempfile = PearSystem::mktemp(); + * 4) $tempfile = PearSystem::mktemp("-t /var/tmp prefix"); * * prefix -> The string that will be prepended to the temp name * (defaults to "tmp"). @@ -342,15 +342,15 @@ class System * * @param string $args The arguments * @return mixed the full path of the created (file|dir) or false - * @see System::tmpdir() + * @see PearSystem::tmpdir() * @access public */ function mktemp($args = null) { static $first_time = true; - $opts = System::_parseArgs($args, 't:d'); + $opts = PearSystem::_parseArgs($args, 't:d'); if (PEAR::isError($opts)) { - return System::raiseError($opts); + return PearSystem::raiseError($opts); } foreach($opts[0] as $opt) { if($opt[0] == 'd') { @@ -361,16 +361,16 @@ class System } $prefix = (isset($opts[1][0])) ? $opts[1][0] : 'tmp'; if (!isset($tmpdir)) { - $tmpdir = System::tmpdir(); + $tmpdir = PearSystem::tmpdir(); } - if (!System::mkDir("-p $tmpdir")) { + if (!PearSystem::mkDir("-p $tmpdir")) { return false; } $tmp = tempnam($tmpdir, $prefix); if (isset($tmp_is_dir)) { unlink($tmp); // be careful possible race condition here if (!call_user_func('mkdir', $tmp, 0700)) { - return System::raiseError("Unable to create temporary directory $tmpdir"); + return PearSystem::raiseError("Unable to create temporary directory $tmpdir"); } } $GLOBALS['_System_temp_files'][] = $tmp; @@ -392,7 +392,7 @@ class System if (count($GLOBALS['_System_temp_files'])) { $delete = $GLOBALS['_System_temp_files']; array_unshift($delete, '-r'); - System::rm($delete); + PearSystem::rm($delete); } } @@ -465,12 +465,12 @@ class System * * Usage: * - * System::find($dir); - * System::find("$dir -type d"); - * System::find("$dir -type f"); - * System::find("$dir -name *.php"); - * System::find("$dir -name *.php -name *.htm*"); - * System::find("$dir -maxdepth 1"); + * PearSystem::find($dir); + * PearSystem::find("$dir -type d"); + * PearSystem::find("$dir -type f"); + * PearSystem::find("$dir -name *.php"); + * PearSystem::find("$dir -name *.php -name *.htm*"); + * PearSystem::find("$dir -maxdepth 1"); * * Params implmented: * $dir -> Start the search at this directory @@ -516,7 +516,7 @@ class System break; } } - $path = System::_dirToStruct($dir, $depth); + $path = PearSystem::_dirToStruct($dir, $depth); if ($do_files && $do_dirs) { $files = array_merge($path['files'], $path['dirs']); } elseif ($do_dirs) { diff --git a/thirdparty/pear/package-PEAR.xml b/thirdparty/pear/package-PEAR.xml index ad739feae..b7bf44dc5 100644 --- a/thirdparty/pear/package-PEAR.xml +++ b/thirdparty/pear/package-PEAR.xml @@ -138,7 +138,7 @@ PEAR INSTALLER: * PEAR_Config class uses getenv() rather than $_ENV to read environment variables. - * System::which() Windows fix, now looks for + * PearSystem::which() Windows fix, now looks for exe/bat/cmd/com suffixes rather than just exe * Added "pear cvsdiff" command @@ -237,7 +237,7 @@ Bugfixes, Installer: New Features, PEAR Library: * added PEAR::loadExtension($ext) * added PEAR::delExpect() -* System::mkTemp() now cleans up at shutdown +* PearSystem::mkTemp() now cleans up at shutdown * defined PEAR_ZE2 constant (boolean) * added PEAR::throwError() with a simpler API than raiseError() diff --git a/thirdparty/propel-generator/classes/propel/phing/PropelSQLExec.php b/thirdparty/propel-generator/classes/propel/phing/PropelSQLExec.php index ec1c28b46..451400c54 100644 --- a/thirdparty/propel-generator/classes/propel/phing/PropelSQLExec.php +++ b/thirdparty/propel-generator/classes/propel/phing/PropelSQLExec.php @@ -417,7 +417,7 @@ class PropelSQLExec extends TaskPhing { $this->conn->rollback(); } catch (SQLException $ex) { // do nothing. - System::println("Rollback failed."); + PearSystem::println("Rollback failed."); } } if ($this->statement) $this->statement->close(); @@ -428,7 +428,7 @@ class PropelSQLExec extends TaskPhing { $this->conn->rollback(); } catch (SQLException $ex) { // do nothing. - System::println("Rollback failed"); + PearSystem::println("Rollback failed"); } } if ($this->statement) $this->statement->close(); @@ -620,12 +620,12 @@ class PropelSQLExec extends TaskPhing { $out->newLine(); } - System::println($line); + PearSystem::println($line); $line = ""; } // while rs->next() } } while ($this->statement->getMoreResults()); - System::println(); + PearSystem::println(); if ($out !== null) $out->newLine(); } diff --git a/workflow/engine/classes/class.webdav.php b/workflow/engine/classes/class.webdav.php index d02d0d86e..9f509d560 100644 --- a/workflow/engine/classes/class.webdav.php +++ b/workflow/engine/classes/class.webdav.php @@ -9,7 +9,6 @@ use ProcessMaker\Core\System; require_once "HTTP/WebDAV/Server.php"; -require_once "System.php"; /** * ProcessMaker Filesystem access using WebDAV @@ -745,7 +744,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server if (is_dir($path)) { $query = "DELETE FROM properties WHERE path LIKE '" . $this->_slashify($options["path"]) . "%'"; mysql_query($query); - System::rm("-rf $path"); + PearSystem::rm("-rf $path"); } else { unlink($path); } @@ -848,7 +847,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server mysql_query($query); } else { if (is_dir($source)) { - $files = System::find($source); + $files = PearSystem::find($source); $files = array_reverse($files); } else { $files = array($source From a92d23008003da690b9013086cd1016c0389a7b9 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Wed, 23 Aug 2017 15:39:12 -0400 Subject: [PATCH 03/20] HOR-3771 Renamed Installer controller to InstallerModule --- workflow/engine/controllers/adminProxy.php | 2 +- workflow/engine/controllers/installer.php | 3 ++- workflow/engine/methods/setup/systemInfo.php | 2 +- workflow/public_html/sysGeneric.php | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php index 6c4aebb86..e1a5e54c7 100644 --- a/workflow/engine/controllers/adminProxy.php +++ b/workflow/engine/controllers/adminProxy.php @@ -1427,7 +1427,7 @@ class adminProxy extends HttpProxyController } //Database server Version (MySQL version) - $installer = new Installer(); + $installer = new InstallerModule(); $systemInfo = $installer->getSystemInfo(); try { $params['mysql'] = mysql_get_server_info(); diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index 634e28f07..aca7f0526 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -1,11 +1,12 @@ getSystemInfo(); diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 36bbd3778..03bbcaef7 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -523,7 +523,7 @@ if (! defined( 'PATH_DATA' ) || ! file_exists( PATH_DATA )) { transactionLog(PATH_CONTROLLERS.'installer.php'); $pathFile = PATH_CONTROLLERS . 'installer.php'; require_once ($pathFile); - $controller = 'Installer'; + $controller = InstallerModule::class; // if the method name is empty set default to index method if (strpos( SYS_TARGET, '/' ) !== false) { @@ -535,7 +535,7 @@ if (! defined( 'PATH_DATA' ) || ! file_exists( PATH_DATA )) { $controllerAction = ($controllerAction != '' && $controllerAction != 'login') ? $controllerAction : 'index'; // create the installer controller and call its method - if (is_callable( Array ('Installer',$controllerAction + if (is_callable( Array (InstallerModule::class,$controllerAction ) )) { $installer = new $controller(); $installer->setHttpRequestData( $_REQUEST ); From 38219f66ad85335e4f3b93c2daadf19e4a78726d Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Wed, 23 Aug 2017 10:45:16 -0400 Subject: [PATCH 04/20] HOR-3772 --- composer.json | 10 ++- composer.lock | 66 +++++++++++++- .../engine/compatibility/ClassAliasMap.php | 89 +++++++++++++++++++ 3 files changed, 160 insertions(+), 5 deletions(-) create mode 100644 workflow/engine/compatibility/ClassAliasMap.php diff --git a/composer.json b/composer.json index 129585279..07837e00a 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,8 @@ "phpmailer/phpmailer": "5.2.*", "tecnickcom/tcpdf": "6.2.*", "pear/archive_tar": "1.4.*", - "pear/console_getopt": "1.4.*" + "pear/console_getopt": "1.4.*", + "TYPO3/class-alias-loader": "^1.0" }, "require-dev": { "guzzle/guzzle": "~3.1.1", @@ -93,5 +94,12 @@ "scripts": { "post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wimg/php-compatibility", "post-update-cmd" : "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wimg/php-compatibility" + }, + "extra": { + "typo3/class-alias-loader": { + "class-alias-maps": [ + "workflow/engine/compatibility/ClassAliasMap.php" + ] + } } } diff --git a/composer.lock b/composer.lock index cd92e0f83..e80284b8f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "09272e30ec880b324430ae1e42a4c5ae", + "content-hash": "730dde95d76fde91ba2f3aa10f116fb7", "packages": [ { "name": "bshaffer/oauth2-server-php", @@ -29,7 +29,7 @@ "OAuth2": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -328,7 +328,7 @@ "src/" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -2285,6 +2285,64 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "time": "2016-09-20T12:50:39+00:00" }, + { + "name": "typo3/class-alias-loader", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/TYPO3/class-alias-loader.git", + "reference": "a9dd295c81ed0b51455644be420ab9210cad688f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TYPO3/class-alias-loader/zipball/a9dd295c81ed0b51455644be420ab9210cad688f", + "reference": "a9dd295c81ed0b51455644be420ab9210cad688f", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=5.3.7" + }, + "replace": { + "helhum/class-alias-loader": "*" + }, + "require-dev": { + "composer/composer": "dev-master", + "mikey179/vfsstream": "1.4.*@dev", + "phpunit/phpunit": "~4.7.0" + }, + "type": "composer-plugin", + "extra": { + "class": "TYPO3\\ClassAliasLoader\\Plugin", + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "TYPO3\\ClassAliasLoader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Helmut Hummel", + "email": "info@helhum.io" + } + ], + "description": "Amends the composer class loader to support class aliases to provide backwards compatibility for packages", + "homepage": "http://github.com/TYPO3/class-alias-loader", + "keywords": [ + "alias", + "autoloader", + "classloader", + "composer" + ], + "time": "2015-10-06T10:25:44+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v2.4.0", @@ -3132,7 +3190,7 @@ "Guzzle": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], diff --git a/workflow/engine/compatibility/ClassAliasMap.php b/workflow/engine/compatibility/ClassAliasMap.php new file mode 100644 index 000000000..66c01a386 --- /dev/null +++ b/workflow/engine/compatibility/ClassAliasMap.php @@ -0,0 +1,89 @@ + AppDocumentDrive::class, + 'AppSolr' => AppSolr::class, + 'InvalidIndexSearchTextException' => InvalidIndexSearchTextException::class, + 'ApplicationWithoutDelegationRecordsException' => ApplicationWithoutDelegationRecordsException::class, + 'ApplicationWithCorruptDynaformException' => ApplicationWithCorruptDynaformException::class, + 'ApplicationAPP_DATAUnserializeException' => ApplicationAppDataUnserializeException::class, + 'ArrayBasePeer' => ArrayBasePeer::class, + 'GulliverBasePeer' => GulliverBasePeer::class, + 'Upgrade' => Upgrade::class, + 'actionsByEmailCoreClass' => ActionsByEmailCoreClass::class, + 'Applications' => Applications::class, + 'archive' => Archive::class, + 'calendar' => Calendar::class, + 'Cases' => Cases::class, + 'CLI' => CLI::class, + 'Configurations' => Configurations::class, + 'ConsolidatedCases' => ConsolidatedCases::class, + 'Dashboards' => Dashboards::class, + 'dashletOpenVSCompleted' => DashletOpenVsCompleted::class, + 'dashletProcessMakerCommunity' => DashletProcessMakerCommunity::class, + 'dashletProcessMakerEnterprise' => DashletProcessMakerEnterprise::class, + 'dashletRssReader' => DashletRssReader::class, + 'dates' => Dates::class, + 'dbConnections' => DbConnections::class, + 'Derivation' => Derivation::class, + 'DynaFormField' => DynaFormField::class, + 'dynaformEditor' => DynaformEditor::class, + 'dynaformEditorAjax' => DynaformEditorAjax::class, + 'enterpriseClass' => EnterpriseClass::class, + 'EnterpriseUtils' => EnterpriseUtils::class, + 'FieldValidator' => FieldValidator::class, + 'FileCache' => FileCache::class, + 'FormBatchRouting' => FormBatchRouting::class, + 'Groups' => Groups::class, + 'indicatorsCalculator' => IndicatorsCalculator::class, + 'JavaBridgePM' => JavaBridgePM::class, + 'labelsGmail' => labelsGmail::class, + 'ldapAdvanced' => LdapAdvanced::class, + 'License_Application' => license_application::class, + 'padl' => Padl::class, + 'featuresDetail' => FeaturesDetail::class, + 'PMmemcached' => PMmemcached::class, + 'multipleFilesBackup' => MultipleFilesBackup::class, + 'NET' => Net::class, + 'p11835' => p11835::class, + 'PMPlugin' => PMPlugin::class, + 'pluginDetail' => PluginDetail::class, + 'PMDashlet' => PmDashlet::class, + 'PMDrive' => PmDrive::class, + 'pmDynaform' => PmDynaform::class, + 'pmGauge' => PmGauge::class, + 'PMGoogleApi' => PmGoogleApi::class, + 'pmLicenseManager' => PmLicenseManager::class, + 'pmPhing' => PmPhing::class, + 'pmSsoClass' => PmSsoClass::class, + 'PmTable' => PmTable::class, + 'popupMenu' => PopupMenu::class, + 'processMap' => ProcessMap::class, + 'Processes' => Processes::class, + 'propelTable' => PropelTable::class, + 'replacementLogo' => ReplacementLogo::class, + 'Report' => Report::class, + 'ReportTables' => ReportTables::class, + 'BpmnEngine_Services_SearchIndex' => BpmnEngineServicesSearchIndex::class, + 'serverConf' => ServerConf::class, + 'Sessions' => Sessions::class, + 'BpmnEngine_SearchIndexAccess_Solr' => BpmnEngineSearchIndexAccessSolr::class, + 'spoolRun' => SpoolRun::class, + 'Tasks' => Tasks::class, + 'ToolBar' => ToolBar::class, + 'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class, + 'XmlForm_Field_toolButton' => XmlFormFieldToolButton::class, + 'triggerLibrary' => TriggerLibrary::class, + 'ProcessMakerWebDav' => ProcessMakerWebDav::class, + 'wsBase' => WsBase::class, + 'wsResponse' => WsResponse::class, + 'workspaceTools' => WorkspaceTools::class, + 'XMLDB' => XMLDB::class, + 'XMLConnection' => XMLConnection::class, + 'XMLResult' => XMLResult::class, + 'XmlForm_Field_Image' => XmlFormFieldImage::class, + 'XmlForm_Field_TextPM' => XmlFormFieldTextPm::class, + 'XmlForm_Field_TextareaPM' => XmlFormFieldTextareaPm::class, + 'XmlForm_Field_hours' => XmlFormFieldHours::class, + 'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class +); From b903c015a305b71f08060b89b7ec332cec0ce46c Mon Sep 17 00:00:00 2001 From: Ronald Quenta Date: Wed, 23 Aug 2017 16:14:48 -0400 Subject: [PATCH 05/20] HOR-3776 --- workflow/engine/bin/cron_single.php | 1 + workflow/engine/classes/class.pmScript.php | 13 -------- .../ProcessMaker/Plugins/PluginRegistry.php | 2 ++ .../src/ProcessMaker/Plugins/Traits/Init.php | 33 +++++++++++++++++++ workflow/public_html/sysGeneric.php | 2 ++ 5 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index 29cccc25b..5b90f449b 100644 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -284,6 +284,7 @@ function processWorkspace() { try { $oPluginRegistry = PluginRegistry::loadSingleton(); + $oPluginRegistry->init(); global $sObject; global $sLastExecution; diff --git a/workflow/engine/classes/class.pmScript.php b/workflow/engine/classes/class.pmScript.php index 5d40faa7e..6e786a1aa 100644 --- a/workflow/engine/classes/class.pmScript.php +++ b/workflow/engine/classes/class.pmScript.php @@ -57,19 +57,6 @@ if (defined('SYS_SYS') && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPAC Bootstrap::setConstantsRelatedWs(SYS_SYS); } -//call plugin -if (class_exists( 'folderData' )) { - //$folderData = new folderData($sProUid, $proFields['PRO_TITLE'], $sAppUid, $Fields['APP_TITLE'], $sUsrUid); - $oPluginRegistry = PluginRegistry::loadSingleton(); - $aAvailablePmFunctions = $oPluginRegistry->getPmFunctions(); - foreach ($aAvailablePmFunctions as $key => $class) { - $filePlugin = PATH_PLUGINS . $class . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php'; - if (file_exists( $filePlugin )) { - include_once ($filePlugin); - } - } -} -//end plugin //Add External Triggers $dir = G::ExpandPath( "classes" ) . 'triggers'; $filesArray = array (); diff --git a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php index c6fc39dd2..5a1a3f7f7 100644 --- a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php +++ b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php @@ -31,6 +31,7 @@ use ProcessMaker\Plugins\Interfaces\TaskExtendedProperty; use ProcessMaker\Plugins\Interfaces\ToolbarDetail; use ProcessMaker\Plugins\Interfaces\TriggerDetail; use ProcessMaker\Plugins\Traits\Attributes; +use ProcessMaker\Plugins\Traits\Init; use ProcessMaker\Plugins\Traits\PluginStructure; use Publisher; use stdClass; @@ -43,6 +44,7 @@ class PluginRegistry { use PluginStructure; use Attributes; + use Init; const NAME_CACHE = SYS_SYS . __CLASS__; /** diff --git a/workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php b/workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php new file mode 100644 index 000000000..94e8e4593 --- /dev/null +++ b/workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php @@ -0,0 +1,33 @@ +initFunction(); + } + + /** + * Initialization of plugin pmFunctions + */ + private function initFunction() + { + $pmFunctions = $this->getPmFunctions(); + foreach ($pmFunctions as $namespace) { + $filePmFunctions = PATH_PLUGINS . $namespace . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php'; + if (file_exists($filePmFunctions) && $this->isEnable($namespace)) { + include_once($filePmFunctions); + } + } + } + +} diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 36bbd3778..292ef0a28 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -1023,6 +1023,8 @@ if (! defined( 'EXECUTE_BY_CRON' )) { } $_SESSION['phpLastFileFound'] = $_SERVER['REQUEST_URI']; + // Initialization functions plugins + $oPluginRegistry->init(); /** * New feature for Gulliver framework to support Controllers & HttpProxyController classes handling * From d45708168a10d1355565995ce9dd7687c3cf91a2 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Wed, 23 Aug 2017 16:39:03 -0400 Subject: [PATCH 06/20] HOR-3772 Moved class alias map. --- .../classaliasmap.php | 57 ++++++++++--------- composer.json | 2 +- 2 files changed, 31 insertions(+), 28 deletions(-) rename workflow/engine/compatibility/ClassAliasMap.php => bootstrap/classaliasmap.php (95%) diff --git a/workflow/engine/compatibility/ClassAliasMap.php b/bootstrap/classaliasmap.php similarity index 95% rename from workflow/engine/compatibility/ClassAliasMap.php rename to bootstrap/classaliasmap.php index 66c01a386..ef26a9e4b 100644 --- a/workflow/engine/compatibility/ClassAliasMap.php +++ b/bootstrap/classaliasmap.php @@ -1,18 +1,17 @@ AppDocumentDrive::class, - 'AppSolr' => AppSolr::class, - 'InvalidIndexSearchTextException' => InvalidIndexSearchTextException::class, - 'ApplicationWithoutDelegationRecordsException' => ApplicationWithoutDelegationRecordsException::class, - 'ApplicationWithCorruptDynaformException' => ApplicationWithCorruptDynaformException::class, - 'ApplicationAPP_DATAUnserializeException' => ApplicationAppDataUnserializeException::class, - 'ArrayBasePeer' => ArrayBasePeer::class, - 'GulliverBasePeer' => GulliverBasePeer::class, - 'Upgrade' => Upgrade::class, 'actionsByEmailCoreClass' => ActionsByEmailCoreClass::class, + 'AppDocumentDrive' => AppDocumentDrive::class, + 'ApplicationAPP_DATAUnserializeException' => ApplicationAppDataUnserializeException::class, 'Applications' => Applications::class, + 'ApplicationWithCorruptDynaformException' => ApplicationWithCorruptDynaformException::class, + 'ApplicationWithoutDelegationRecordsException' => ApplicationWithoutDelegationRecordsException::class, + 'AppSolr' => AppSolr::class, 'archive' => Archive::class, + 'ArrayBasePeer' => ArrayBasePeer::class, + 'BpmnEngine_SearchIndexAccess_Solr' => BpmnEngineSearchIndexAccessSolr::class, + 'BpmnEngine_Services_SearchIndex' => BpmnEngineServicesSearchIndex::class, 'calendar' => Calendar::class, 'Cases' => Cases::class, 'CLI' => CLI::class, @@ -26,27 +25,29 @@ return array( 'dates' => Dates::class, 'dbConnections' => DbConnections::class, 'Derivation' => Derivation::class, - 'DynaFormField' => DynaFormField::class, 'dynaformEditor' => DynaformEditor::class, 'dynaformEditorAjax' => DynaformEditorAjax::class, + 'DynaFormField' => DynaFormField::class, 'enterpriseClass' => EnterpriseClass::class, 'EnterpriseUtils' => EnterpriseUtils::class, + 'featuresDetail' => FeaturesDetail::class, 'FieldValidator' => FieldValidator::class, 'FileCache' => FileCache::class, 'FormBatchRouting' => FormBatchRouting::class, 'Groups' => Groups::class, + 'GulliverBasePeer' => GulliverBasePeer::class, 'indicatorsCalculator' => IndicatorsCalculator::class, + 'Installer' => \ProcessMaker\Core\Installer::class, + 'installer' => \ProcessMaker\Core\Installer::class, + 'InvalidIndexSearchTextException' => InvalidIndexSearchTextException::class, 'JavaBridgePM' => JavaBridgePM::class, 'labelsGmail' => labelsGmail::class, 'ldapAdvanced' => LdapAdvanced::class, 'License_Application' => license_application::class, - 'padl' => Padl::class, - 'featuresDetail' => FeaturesDetail::class, - 'PMmemcached' => PMmemcached::class, 'multipleFilesBackup' => MultipleFilesBackup::class, 'NET' => Net::class, 'p11835' => p11835::class, - 'PMPlugin' => PMPlugin::class, + 'padl' => Padl::class, 'pluginDetail' => PluginDetail::class, 'PMDashlet' => PmDashlet::class, 'PMDrive' => PmDrive::class, @@ -54,36 +55,38 @@ return array( 'pmGauge' => PmGauge::class, 'PMGoogleApi' => PmGoogleApi::class, 'pmLicenseManager' => PmLicenseManager::class, + 'PMmemcached' => PMmemcached::class, 'pmPhing' => PmPhing::class, + 'PMPlugin' => PMPlugin::class, 'pmSsoClass' => PmSsoClass::class, 'PmTable' => PmTable::class, 'popupMenu' => PopupMenu::class, - 'processMap' => ProcessMap::class, 'Processes' => Processes::class, + 'ProcessMakerWebDav' => ProcessMakerWebDav::class, + 'processMap' => ProcessMap::class, 'propelTable' => PropelTable::class, 'replacementLogo' => ReplacementLogo::class, 'Report' => Report::class, 'ReportTables' => ReportTables::class, - 'BpmnEngine_Services_SearchIndex' => BpmnEngineServicesSearchIndex::class, 'serverConf' => ServerConf::class, 'Sessions' => Sessions::class, - 'BpmnEngine_SearchIndexAccess_Solr' => BpmnEngineSearchIndexAccessSolr::class, 'spoolRun' => SpoolRun::class, + 'System' => \ProcessMaker\Core\System::class, 'Tasks' => Tasks::class, 'ToolBar' => ToolBar::class, - 'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class, - 'XmlForm_Field_toolButton' => XmlFormFieldToolButton::class, 'triggerLibrary' => TriggerLibrary::class, - 'ProcessMakerWebDav' => ProcessMakerWebDav::class, + 'Upgrade' => Upgrade::class, + 'workspaceTools' => WorkspaceTools::class, 'wsBase' => WsBase::class, 'wsResponse' => WsResponse::class, - 'workspaceTools' => WorkspaceTools::class, - 'XMLDB' => XMLDB::class, 'XMLConnection' => XMLConnection::class, - 'XMLResult' => XMLResult::class, - 'XmlForm_Field_Image' => XmlFormFieldImage::class, - 'XmlForm_Field_TextPM' => XmlFormFieldTextPm::class, - 'XmlForm_Field_TextareaPM' => XmlFormFieldTextareaPm::class, + 'XMLDB' => XMLDB::class, + 'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class, 'XmlForm_Field_hours' => XmlFormFieldHours::class, - 'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class + 'XmlForm_Field_Image' => XmlFormFieldImage::class, + 'XmlForm_Field_TextareaPM' => XmlFormFieldTextareaPm::class, + 'XmlForm_Field_TextPM' => XmlFormFieldTextPm::class, + 'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class, + 'XmlForm_Field_toolButton' => XmlFormFieldToolButton::class, + 'XMLResult' => XMLResult::class, ); diff --git a/composer.json b/composer.json index 07837e00a..13716310a 100644 --- a/composer.json +++ b/composer.json @@ -98,7 +98,7 @@ "extra": { "typo3/class-alias-loader": { "class-alias-maps": [ - "workflow/engine/compatibility/ClassAliasMap.php" + "bootstrap/classaliasmap.php" ] } } From a6d5a0b750b6c49368926130fe68e9fc54420e8e Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Wed, 23 Aug 2017 17:02:17 -0400 Subject: [PATCH 07/20] HOR-3772 Complete class alias map --- bootstrap/classaliasmap.php | 60 +++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/bootstrap/classaliasmap.php b/bootstrap/classaliasmap.php index ef26a9e4b..17764a3b1 100644 --- a/bootstrap/classaliasmap.php +++ b/bootstrap/classaliasmap.php @@ -1,5 +1,7 @@ ActionsByEmailCoreClass::class, 'AppDocumentDrive' => AppDocumentDrive::class, @@ -71,9 +73,10 @@ return array( 'serverConf' => ServerConf::class, 'Sessions' => Sessions::class, 'spoolRun' => SpoolRun::class, - 'System' => \ProcessMaker\Core\System::class, + 'System' => \ProcessMaker\Core\System::class, 'Tasks' => Tasks::class, 'ToolBar' => ToolBar::class, + 'Tree' => PmTree::class, 'triggerLibrary' => TriggerLibrary::class, 'Upgrade' => Upgrade::class, 'workspaceTools' => WorkspaceTools::class, @@ -81,12 +84,65 @@ return array( 'wsResponse' => WsResponse::class, 'XMLConnection' => XMLConnection::class, 'XMLDB' => XMLDB::class, + 'XmlForm_Field' => XmlFormField::class, + 'XmlForm_Field_Button' => XmlFormFieldButton::class, + 'XmlForm_Field_Caption' => XmlFormFieldCaption::class, + 'XmlForm_Field_CaptionCurrency' => XmlFormFieldCaptionCurrency::class, + 'XmlForm_Field_CaptionPercentage' => XmlFormFieldCaptionPercentage::class, + 'XmlForm_Field_CellMark' => XmlFormFieldCellMark::class, + 'XmlForm_Field_Checkbox' => XmlFormFieldCheckbox::class, + 'XmlForm_Field_Checkbox2' => XmlFormFieldCheckbox2::class, + 'XmlForm_Field_Checkboxpt' => XmlFormFieldCheckboxpt::class, 'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class, + 'XmlForm_Field_CheckBoxTable' => XmlFormFieldCheckBoxTable::class, + 'XmlForm_Field_CheckGroup' => XmlFormFieldCheckGroup::class, + 'XmlForm_Field_CheckGroupView' => XmlFormFieldCheckGroupView::class, + 'XmlForm_Field_Currency' => XmlFormFieldCurrency::class, + 'XmlForm_Field_Date' => XmlFormFieldDate::class, + 'XmlForm_Field_Date2' => XmlFormFieldDate2::class, + 'XmlForm_Field_Date5' => XmlFormFieldDate5::class, + 'XmlForm_Field_DateView' => XmlFormFieldDateView::class, + 'XmlForm_Field_Dropdown' => XmlFormFieldDropdown::class, + 'XmlForm_Field_Dropdownpt' => XmlFormFieldDropdownpt::class, + 'XmlForm_Field_DVEditor' => XmlFormFieldDVEditor::class, + 'XmlForm_Field_FastSearch' => XmlFormFieldFastSearch::class, + 'XmlForm_Field_File' => XmlFormFieldFile::class, + 'XmlForm_Field_Grid' => XmlFormFieldGrid::class, + 'XmlForm_Field_Hidden' => XmlFormFieldHidden::class, 'XmlForm_Field_hours' => XmlFormFieldHours::class, + 'XmlForm_Field_Hours' => XmlFormFieldHours::class, + 'XmlForm_Field_HTML' => XmlFormFieldHTML::class, 'XmlForm_Field_Image' => XmlFormFieldImage::class, + 'XmlForm_Field_Image' => XmlFormFieldImage::class, + 'XmlForm_Field_JavaScript' => XmlFormFieldJavaScript::class, + 'XmlForm_Field_Label' => XmlFormFieldLabel::class, + 'XmlForm_Field_Link' => XmlFormFieldLink::class, + 'XmlForm_Field_Listbox' => XmlFormFieldListbox::class, + 'XmlForm_Field_Password' => XmlFormFieldPassword::class, + 'XmlForm_Field_Percentage' => XmlFormFieldPercentage::class, + 'XmlForm_Field_PopupOption' => XmlFormFieldPopupOption::class, + 'XmlForm_Field_Print' => XmlFormFieldPrint::class, + 'XmlForm_Field_RadioGroup' => XmlFormFieldRadioGroup::class, + 'XmlForm_Field_RadioGroupView' => XmlFormFieldRadioGroupView::class, + 'XmlForm_Field_Reset' => XmlFormFieldReset::class, + 'XmlForm_Field_SimpleText' => XmlFormFieldSimpleText::class, + 'XmlForm_Field_Submit' => XmlFormFieldSubmit::class, + 'XmlForm_Field_Subtitle' => XmlFormFieldSubtitle::class, + 'XmlForm_Field_Suggest' => XmlFormFieldSuggest::class, + 'XmlForm_Field_Text' => XmlFormFieldText::class, + 'XmlForm_Field_Textarea' => XmlFormFieldTextarea::class, 'XmlForm_Field_TextareaPM' => XmlFormFieldTextareaPm::class, + 'XmlForm_Field_TextareaPm' => XmlFormFieldTextareaPm::class, 'XmlForm_Field_TextPM' => XmlFormFieldTextPm::class, + 'XmlForm_Field_TextPm' => XmlFormFieldTextPm::class, + 'XmlForm_Field_Title' => XmlFormFieldTitle::class, + 'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class, 'XmlForm_Field_ToolBar' => XmlFormFieldToolBar::class, 'XmlForm_Field_toolButton' => XmlFormFieldToolButton::class, + 'XmlForm_Field_ToolButton' => XmlFormFieldToolButton::class, + 'XmlForm_Field_WYSIWYGEditor' => XmlFormFieldWYSIWYGEditor::class, + 'XmlForm_Field_Xmlform' => XmlFormFieldXmlform::class, + 'XmlForm_Field_XmlMenu' => XmlFormFieldXmlMenu::class, + 'XmlForm_Field_YesNo' => XmlFormFieldYesNo::class, 'XMLResult' => XMLResult::class, ); From d4ce3b85e6e68c2b6605923a4706d9342be0c71a Mon Sep 17 00:00:00 2001 From: Ronald Quenta Date: Fri, 25 Aug 2017 08:47:09 -0400 Subject: [PATCH 08/20] HOR-3231 --- framework/src/Maveriks/WebApplication.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 56caa5907..d5b399b4b 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -2,6 +2,7 @@ namespace Maveriks; +use Bootstrap; use Maveriks\Util; use ProcessMaker\Core\System; use ProcessMaker\Plugins\PluginRegistry; @@ -486,9 +487,9 @@ class WebApplication app()->useStoragePath(realpath(PATH_DATA)); app()->make(Kernel::class)->bootstrap(); - \Bootstrap::setLanguage(); + Bootstrap::setLanguage(); - \Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en"); + Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en"); if (empty($workspace)) { return true; @@ -584,6 +585,11 @@ class WebApplication define('TIME_ZONE', ini_get('date.timezone')); + $oPluginRegistry = PluginRegistry::loadSingleton(); + $attributes = $oPluginRegistry->getAttributes(); + Bootstrap::LoadTranslationPlugins(defined('SYS_LANG') ? SYS_LANG : "en", $attributes); + // Initialization functions plugins + $oPluginRegistry->init(); //Return return true; } From e3c0d6e6cafce60402607b6e1af71a0d94d80a9b Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Fri, 25 Aug 2017 08:58:17 -0400 Subject: [PATCH 09/20] HOR-3769 Fix P11835 alias --- bootstrap/classaliasmap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/classaliasmap.php b/bootstrap/classaliasmap.php index 17764a3b1..35bcba995 100644 --- a/bootstrap/classaliasmap.php +++ b/bootstrap/classaliasmap.php @@ -48,7 +48,7 @@ return array( 'License_Application' => license_application::class, 'multipleFilesBackup' => MultipleFilesBackup::class, 'NET' => Net::class, - 'p11835' => p11835::class, + 'p11835' => P11835::class, 'padl' => Padl::class, 'pluginDetail' => PluginDetail::class, 'PMDashlet' => PmDashlet::class, From 52322493dff2c7d3939d23eda30a973acc5fab6c Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Fri, 25 Aug 2017 10:57:20 -0400 Subject: [PATCH 10/20] HOR-3769 Fix Net class and error reporting level. --- framework/src/Maveriks/WebApplication.php | 1 + processmaker | 1 - workflow/engine/classes/Net.php | 38 ++++++++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 56caa5907..12a680e00 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -485,6 +485,7 @@ class WebApplication // Change storage path app()->useStoragePath(realpath(PATH_DATA)); app()->make(Kernel::class)->bootstrap(); + error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED); \Bootstrap::setLanguage(); diff --git a/processmaker b/processmaker index 947685aa0..8d5144b45 100755 --- a/processmaker +++ b/processmaker @@ -6,7 +6,6 @@ use Illuminate\Foundation\Console\Kernel; require_once __DIR__ . '/gulliver/system/class.g.php'; require_once __DIR__ . '/bootstrap/autoload.php'; require_once __DIR__ . '/bootstrap/app.php'; -$app->make(Kernel::class)->bootstrap(); $scriptDir = dirname(__FILE__).'/'; diff --git a/workflow/engine/classes/Net.php b/workflow/engine/classes/Net.php index 69bbef50a..8aac86469 100644 --- a/workflow/engine/classes/Net.php +++ b/workflow/engine/classes/Net.php @@ -19,13 +19,49 @@ class Net public function __construct() { $a = func_get_args(); - $f = "__construct" . func_num_args(); + $f = "init" . func_num_args(); if (method_exists($this, $f)) { call_user_func_array(array($this, $f), $a); } } + /** + * This function is the constructor of the class net + * + * return void + */ + protected function init0() + { + $this->errno = 0; + $this->error = ""; + } + + /** + * This function is the constructor of the class net + * + * @param string $pHost + * @return void + */ + protected function init1($pHost) + { + $this->errno = 0; + $this->errstr = ""; + $this->db_instance = ""; + + unset($this->db_user); + unset($this->db_passwd); + unset($this->db_sourcename); + + #verifing valid param + if ($pHost == "") { + $this->errno = 1000; + $this->errstr = "NET::You must specify a host"; + //$this->showMsg(); + } + $this->resolv($pHost); + } + /** * This function puts a host * From 8cd78e72713b667d6f38d88e768ab8d7f1f1c59f Mon Sep 17 00:00:00 2001 From: dante Date: Fri, 25 Aug 2017 13:38:21 -0400 Subject: [PATCH 11/20] Adding an alias to the Light php file --- workflow/engine/src/ProcessMaker/Services/Api/Light.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php index 7b34f0d8c..193cb1844 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php @@ -13,7 +13,7 @@ use Exception; use ProcessMaker\BusinessModel\Light as BusinessModelLight; use RBAC; use ProcessMaker\BusinessModel\Cases as BusinessModelCases; -use Cases; +use Cases as ClassesCases; use AppDelegation; use ProcessMaker\BusinessModel\Lists; use ProcessMaker\BusinessModel\Task; @@ -805,7 +805,7 @@ class Light extends Api public function doDeleteCases($app_uid) { try { - $oCase = new Cases(); + $oCase = new ClassesCases(); $oCase->removeCase($app_uid); $result = array( "message" => G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY") @@ -1003,7 +1003,7 @@ class Light extends Api public function doGetNextStep($pro_uid, $app_uid, $cas_index, $step_pos) { try { - $oCase = new Cases(); + $oCase = new ClassesCases(); $oAppDelegate = new AppDelegation(); $alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $cas_index); @@ -1046,7 +1046,7 @@ class Light extends Api $caseVariables = array(); if (!is_null($app_uid)) { - $case = new Cases(); + $case = new ClassesCases(); $fields = $case->loadCase($app_uid, $del_index); $caseVariables = array_merge($fields['APP_DATA'], BusinessModelCases::getGlobalVariables($fields['APP_DATA'])); From 1fabaea9309f8f2e55bf877292b452862c82c16a Mon Sep 17 00:00:00 2001 From: hjonathan Date: Fri, 25 Aug 2017 12:07:35 -0400 Subject: [PATCH 12/20] HOR-3796 update update udpate --- .../classes/model/ListParticipatedLast.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/workflow/engine/classes/model/ListParticipatedLast.php b/workflow/engine/classes/model/ListParticipatedLast.php index aba75b537..56962c98e 100644 --- a/workflow/engine/classes/model/ListParticipatedLast.php +++ b/workflow/engine/classes/model/ListParticipatedLast.php @@ -503,4 +503,26 @@ class ListParticipatedLast extends BaseListParticipatedLast return (int) $aRow['TOTAL']; } + + /** + * @deprecated This function is deprecated, it hasn’t been removed because of its compatibility with the External Registration plugin + * @param $where + * @param $set + * @return void + */ + public function updateCurrentUser($where, $set) + { + $con = Propel::getConnection('workflow'); + //Update - WHERE + $criteriaWhere = new Criteria('workflow'); + $criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $where['APP_UID'], Criteria::EQUAL); + $criteriaWhere->add(ListParticipatedLastPeer::USR_UID, $where['USR_UID'], Criteria::EQUAL); + $criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $where['DEL_INDEX'], Criteria::EQUAL); + //Update - SET + $criteriaSet = new Criteria('workflow'); + foreach ($set as $k => $v) { + eval('$criteriaSet->add( ListParticipatedLastPeer::' . $k . ',$v, Criteria::EQUAL);'); + } + BasePeer::doUpdate($criteriaWhere, $criteriaSet, $con); + } } From 57348d6ef71b249afe9d6f0be079f1877650712f Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Fri, 25 Aug 2017 14:21:19 -0400 Subject: [PATCH 13/20] HOR-3769 --- .../BusinessModel/Cases/ChangeLog.php | 8 ++--- .../BusinessModel/ProcessPermissions.php | 1 - .../src/ProcessMaker/BusinessModel/User.php | 4 +-- .../src/ProcessMaker/Project/Workflow.php | 30 +++++++++---------- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ChangeLog.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ChangeLog.php index 751480f74..1f09e8a2c 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ChangeLog.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ChangeLog.php @@ -5,11 +5,11 @@ namespace ProcessMaker\BusinessModel\Cases; use Propel; use StdClass; use G; -use Cases; +use Cases as ClassesCase; use AppDocument; use Dynaform; use Exception; -use Task; +use Task as ClassesTask; /** * Return the ChangeLog of a Dynaform @@ -166,7 +166,7 @@ class ChangeLog $title = $obj->getDynTitle(); break; case 'TASK': - $obj = new Task(); + $obj = new ClassesTask(); $obj->load($uid); $title = $obj->getTasTitle(); break; @@ -178,7 +178,7 @@ class ChangeLog private function loadPermissions($APP_UID, $PRO_UID, $TAS_UID) { - $oCase = new Cases(); + $oCase = new ClassesCases(); $this->permissions = $oCase->getAllObjects( $PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED'] ); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessPermissions.php b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessPermissions.php index 0a61b4eb4..d66b6e197 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessPermissions.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessPermissions.php @@ -3,7 +3,6 @@ namespace ProcessMaker\BusinessModel; use Behat\Behat\Exception\Exception; use \G; -use \Cases; use \Criteria; use \ObjectPermissionPeer; diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/User.php b/workflow/engine/src/ProcessMaker/BusinessModel/User.php index 764165637..8a9860917 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/User.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/User.php @@ -8,7 +8,7 @@ use BasePeer; use Bootstrap; use Calendar; use CalendarDefinitionPeer; -use Cases; +use Cases as ClassesCases; use Configurations; use Criteria; use DashletInstancePeer; @@ -1066,7 +1066,7 @@ class User //Verify data $this->throwExceptionIfNotExistsUser($usrUid, $this->arrayFieldNameForException["usrUid"]); - $oProcessMap = new Cases(); + $oProcessMap = new ClassesCases(); $USR_UID = $usrUid; $total = 0; $history = 0; diff --git a/workflow/engine/src/ProcessMaker/Project/Workflow.php b/workflow/engine/src/ProcessMaker/Project/Workflow.php index 028faa844..495b3f507 100644 --- a/workflow/engine/src/ProcessMaker/Project/Workflow.php +++ b/workflow/engine/src/ProcessMaker/Project/Workflow.php @@ -1,15 +1,15 @@ load($proUid); } catch (\Exception $e) { if (is_null(\ProcessPeer::retrieveByPK($proUid))) { @@ -80,7 +80,7 @@ class Workflow extends Handler } // Create project - $process = new Process(); + $process = new ClassesProcess(); $this->proUid = $process->create($data, false); // Call Plugins @@ -106,7 +106,7 @@ class Workflow extends Handler public function update($data) { - $process = new Process(); + $process = new ClassesProcess(); $data["PRO_UID"] = $this->getUid(); $process->update($data); } @@ -137,7 +137,7 @@ class Workflow extends Handler public static function getList($start = null, $limit = null, $filter = "", $changeCaseTo = CASE_UPPER) { //return Project::getAll($start, $limit, $filter, $changeCaseTo); - $process = new Process(); + $process = new ClassesProcess(); $processes = $process->getAllProcesses($start, $limit); //$processes = $process->getAll(); @@ -182,7 +182,7 @@ class Workflow extends Handler try { self::log("Add Task with data: ", $taskData); - $task = new Task(); + $task = new ClassesTask(); $tasUid = $task->create($taskData, false); self::log("Add Task Success!"); @@ -203,7 +203,7 @@ class Workflow extends Handler { try { self::log("Update Task: $tasUid", "With data: ", $taskData); - $task = new Task(); + $task = new ClassesTask(); $taskData['TAS_UID'] = $tasUid; $result = $task->update($taskData); self::log("Update Task Success!"); @@ -252,7 +252,7 @@ class Workflow extends Handler public function getTask($tasUid) { try { - $task = new Task(); + $task = new ClassesTask(); $taskData = $task->load($tasUid); } catch (\Exception $e){ $taskData = null; @@ -583,7 +583,7 @@ class Workflow extends Handler try { //Instance all classes necesaries - $oProcess = new \Process(); + $oProcess = new ClassesProcess(); $oDynaform = new \Dynaform(); $oInputDocument = new \InputDocument(); $oOutputDocument = new \OutputDocument(); From 79844995718d36e0e06a8f21f9b3a89f6192e385 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Fri, 25 Aug 2017 15:44:53 -0400 Subject: [PATCH 14/20] HOR-3769 Compatibility fixes for PowerUp plugin. --- composer.json | 1 - composer.lock | 255 +++++++++++----------------- gulliver/system/class.bootstrap.php | 2 +- 3 files changed, 98 insertions(+), 160 deletions(-) diff --git a/composer.json b/composer.json index 13716310a..cff48d5cf 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "libchart/libchart": "1.4.0", "indeyets/pake": "1.99.*", "phpmailer/phpmailer": "5.2.*", - "tecnickcom/tcpdf": "6.2.*", "pear/archive_tar": "1.4.*", "pear/console_getopt": "1.4.*", "TYPO3/class-alias-loader": "^1.0" diff --git a/composer.lock b/composer.lock index e80284b8f..d14a950ca 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "730dde95d76fde91ba2f3aa10f116fb7", + "hash": "047fd790a13c1ba76987614467ecec45", + "content-hash": "c118a4dc7a7e3cd273f394337e5fb835", "packages": [ { "name": "bshaffer/oauth2-server-php", @@ -29,7 +30,7 @@ "OAuth2": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -47,7 +48,7 @@ "oauth", "oauth2" ], - "time": "2013-08-12T16:35:58+00:00" + "time": "2013-08-12 16:35:58" }, { "name": "colosa/MichelangeloFE", @@ -145,7 +146,7 @@ "captcha", "security" ], - "time": "2016-12-04T17:45:57+00:00" + "time": "2016-12-04 17:45:57" }, { "name": "doctrine/inflector", @@ -212,7 +213,7 @@ "singularize", "string" ], - "time": "2015-11-06T14:35:42+00:00" + "time": "2015-11-06 14:35:42" }, { "name": "erusev/parsedown", @@ -254,7 +255,7 @@ "markdown", "parser" ], - "time": "2017-05-14T14:47:48+00:00" + "time": "2017-05-14 14:47:48" }, { "name": "geshi/geshi", @@ -328,7 +329,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -337,7 +338,7 @@ "keywords": [ "google" ], - "time": "2015-10-16T22:11:08+00:00" + "time": "2015-10-16 22:11:08" }, { "name": "indeyets/pake", @@ -403,7 +404,7 @@ "build", "task" ], - "time": "2013-11-04T08:29:46+00:00" + "time": "2013-11-04 08:29:46" }, { "name": "laravel/framework", @@ -532,7 +533,7 @@ "framework", "laravel" ], - "time": "2017-08-14T20:17:41+00:00" + "time": "2017-08-14 20:17:41" }, { "name": "league/flysystem", @@ -615,7 +616,7 @@ "sftp", "storage" ], - "time": "2017-08-06T17:41:04+00:00" + "time": "2017-08-06 17:41:04" }, { "name": "libchart/libchart", @@ -661,7 +662,7 @@ "line charts", "pie charts" ], - "time": "2013-10-19T22:21:30+00:00" + "time": "2013-10-19 22:21:30" }, { "name": "luracast/restler", @@ -740,7 +741,7 @@ "rest", "server" ], - "time": "2017-01-11T03:42:36+00:00" + "time": "2017-01-11 03:42:36" }, { "name": "monolog/monolog", @@ -818,7 +819,7 @@ "logging", "psr-3" ], - "time": "2016-04-12T18:29:35+00:00" + "time": "2016-04-12 18:29:35" }, { "name": "mtdowling/cron-expression", @@ -862,7 +863,7 @@ "cron", "schedule" ], - "time": "2017-01-23T04:29:33+00:00" + "time": "2017-01-23 04:29:33" }, { "name": "nesbot/carbon", @@ -915,7 +916,7 @@ "datetime", "time" ], - "time": "2017-01-16T07:55:07+00:00" + "time": "2017-01-16 07:55:07" }, { "name": "paragonie/random_compat", @@ -963,7 +964,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13T16:27:32+00:00" + "time": "2017-03-13 16:27:32" }, { "name": "pear/archive_tar", @@ -1029,7 +1030,7 @@ "archive", "tar" ], - "time": "2017-06-11T17:28:11+00:00" + "time": "2017-06-11 17:28:11" }, { "name": "pear/console_getopt", @@ -1076,7 +1077,7 @@ } ], "description": "More info available on: http://pear.php.net/package/Console_Getopt", - "time": "2015-07-20T20:28:12+00:00" + "time": "2015-07-20 20:28:12" }, { "name": "pear/pear-core-minimal", @@ -1120,7 +1121,7 @@ } ], "description": "Minimal set of PEAR core files to be used as composer dependency", - "time": "2017-02-28T16:46:11+00:00" + "time": "2017-02-28 16:46:11" }, { "name": "pear/pear_exception", @@ -1175,7 +1176,7 @@ "keywords": [ "exception" ], - "time": "2015-02-10T20:07:52+00:00" + "time": "2015-02-10 20:07:52" }, { "name": "phpmailer/phpmailer", @@ -1252,7 +1253,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2017-07-26T21:00:20+00:00" + "time": "2017-07-26 21:00:20" }, { "name": "psr/log", @@ -1290,7 +1291,7 @@ "psr", "psr-3" ], - "time": "2012-12-21T11:40:51+00:00" + "time": "2012-12-21 11:40:51" }, { "name": "ramsey/uuid", @@ -1372,7 +1373,7 @@ "identifier", "uuid" ], - "time": "2017-08-04T13:39:04+00:00" + "time": "2017-08-04 13:39:04" }, { "name": "swiftmailer/swiftmailer", @@ -1426,7 +1427,7 @@ "mail", "mailer" ], - "time": "2017-05-01T15:54:03+00:00" + "time": "2017-05-01 15:54:03" }, { "name": "symfony/console", @@ -1495,7 +1496,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-07-29T21:27:59+00:00" + "time": "2017-07-29 21:27:59" }, { "name": "symfony/css-selector", @@ -1548,7 +1549,7 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-05-01T15:01:29+00:00" + "time": "2017-05-01 15:01:29" }, { "name": "symfony/debug", @@ -1604,7 +1605,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-07-28T15:27:31+00:00" + "time": "2017-07-28 15:27:31" }, { "name": "symfony/event-dispatcher", @@ -1667,7 +1668,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-06-09T14:53:08+00:00" + "time": "2017-06-09 14:53:08" }, { "name": "symfony/finder", @@ -1716,7 +1717,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-06-01T21:01:25+00:00" + "time": "2017-06-01 21:01:25" }, { "name": "symfony/http-foundation", @@ -1769,7 +1770,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-07-21T11:04:46+00:00" + "time": "2017-07-21 11:04:46" }, { "name": "symfony/http-kernel", @@ -1855,7 +1856,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-08-01T10:25:59+00:00" + "time": "2017-08-01 10:25:59" }, { "name": "symfony/polyfill-mbstring", @@ -1914,7 +1915,7 @@ "portable", "shim" ], - "time": "2017-06-14T15:44:48+00:00" + "time": "2017-06-14 15:44:48" }, { "name": "symfony/process", @@ -1963,7 +1964,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-07-13T13:05:09+00:00" + "time": "2017-07-13 13:05:09" }, { "name": "symfony/routing", @@ -2041,7 +2042,7 @@ "uri", "url" ], - "time": "2017-07-21T17:43:13+00:00" + "time": "2017-07-21 17:43:13" }, { "name": "symfony/translation", @@ -2106,7 +2107,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-06-24T16:45:30+00:00" + "time": "2017-06-24 16:45:30" }, { "name": "symfony/var-dumper", @@ -2174,69 +2175,7 @@ "debug", "dump" ], - "time": "2017-07-28T06:06:09+00:00" - }, - { - "name": "tecnickcom/tcpdf", - "version": "6.2.13", - "source": { - "type": "git", - "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "95c5938aafe4b20df1454dbddb3e5005c0b26f64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/95c5938aafe4b20df1454dbddb3e5005c0b26f64", - "reference": "95c5938aafe4b20df1454dbddb3e5005c0b26f64", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPLv3" - ], - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "homepage": "http://nicolaasuni.tecnick.com" - } - ], - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "homepage": "http://www.tcpdf.org/", - "keywords": [ - "PDFD32000-2008", - "TCPDF", - "barcodes", - "datamatrix", - "pdf", - "pdf417", - "qrcode" - ], - "time": "2017-04-26T08:14:48+00:00" + "time": "2017-07-28 06:06:09" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -2283,7 +2222,7 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2016-09-20T12:50:39+00:00" + "time": "2016-09-20 12:50:39" }, { "name": "typo3/class-alias-loader", @@ -2341,7 +2280,7 @@ "classloader", "composer" ], - "time": "2015-10-06T10:25:44+00:00" + "time": "2015-10-06 10:25:44" }, { "name": "vlucas/phpdotenv", @@ -2391,7 +2330,7 @@ "env", "environment" ], - "time": "2016-09-01T10:05:43+00:00" + "time": "2016-09-01 10:05:43" } ], "packages-dev": [ @@ -2448,7 +2387,7 @@ "assertion", "validation" ], - "time": "2017-05-04T02:00:24+00:00" + "time": "2017-05-04 02:00:24" }, { "name": "behat/behat", @@ -2530,7 +2469,7 @@ "symfony", "testing" ], - "time": "2017-05-15T16:49:16+00:00" + "time": "2017-05-15 16:49:16" }, { "name": "behat/gherkin", @@ -2589,7 +2528,7 @@ "gherkin", "parser" ], - "time": "2016-10-30T11:50:56+00:00" + "time": "2016-10-30 11:50:56" }, { "name": "behat/mink", @@ -2647,7 +2586,7 @@ "testing", "web" ], - "time": "2016-03-05T08:26:18+00:00" + "time": "2016-03-05 08:26:18" }, { "name": "behat/mink-selenium2-driver", @@ -2708,7 +2647,7 @@ "testing", "webdriver" ], - "time": "2016-03-05T09:10:18+00:00" + "time": "2016-03-05 09:10:18" }, { "name": "behat/transliterator", @@ -2752,7 +2691,7 @@ "slug", "transliterator" ], - "time": "2017-04-04T11:38:05+00:00" + "time": "2017-04-04 11:38:05" }, { "name": "clue/graph", @@ -2797,7 +2736,7 @@ "network", "vertex" ], - "time": "2015-03-07T18:11:31+00:00" + "time": "2015-03-07 18:11:31" }, { "name": "container-interop/container-interop", @@ -2828,7 +2767,7 @@ ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" + "time": "2017-02-14 19:40:03" }, { "name": "doctrine/instantiator", @@ -2882,7 +2821,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2015-06-14 21:17:01" }, { "name": "facebook/webdriver", @@ -2934,7 +2873,7 @@ "selenium", "webdriver" ], - "time": "2017-04-28T14:54:49+00:00" + "time": "2017-04-28 14:54:49" }, { "name": "florianwolters/component-core-stringutils", @@ -2979,7 +2918,7 @@ "string", "wrapper" ], - "time": "2013-07-01T10:24:07+00:00" + "time": "2013-07-01 10:24:07" }, { "name": "florianwolters/component-util-reflection", @@ -3023,7 +2962,7 @@ "reflection", "utility" ], - "time": "2013-03-19T16:42:41+00:00" + "time": "2013-03-19 16:42:41" }, { "name": "florianwolters/component-util-singleton", @@ -3074,7 +3013,7 @@ "singleton", "utility" ], - "time": "2013-06-29T12:35:22+00:00" + "time": "2013-06-29 12:35:22" }, { "name": "graphp/algorithms", @@ -3124,7 +3063,7 @@ "prim", "shortest path" ], - "time": "2015-03-08T10:12:01+00:00" + "time": "2015-03-08 10:12:01" }, { "name": "guzzle/guzzle", @@ -3190,7 +3129,7 @@ "Guzzle": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -3217,7 +3156,7 @@ "web service" ], "abandoned": "guzzlehttp/guzzle", - "time": "2013-01-28T00:07:40+00:00" + "time": "2013-01-28 00:07:40" }, { "name": "instaclick/php-webdriver", @@ -3276,7 +3215,7 @@ "webdriver", "webtest" ], - "time": "2017-06-30T04:02:48+00:00" + "time": "2017-06-30 04:02:48" }, { "name": "lmc/steward", @@ -3351,7 +3290,7 @@ "testing", "webdriver" ], - "time": "2017-06-05T23:56:28+00:00" + "time": "2017-06-05 23:56:28" }, { "name": "myclabs/deep-copy", @@ -3393,7 +3332,7 @@ "object", "object graph" ], - "time": "2017-04-12T18:52:22+00:00" + "time": "2017-04-12 18:52:22" }, { "name": "nette/caching", @@ -3455,7 +3394,7 @@ ], "description": "Nette Caching Component", "homepage": "https://nette.org", - "time": "2017-07-11T16:41:08+00:00" + "time": "2017-07-11 16:41:08" }, { "name": "nette/finder", @@ -3511,7 +3450,7 @@ ], "description": "Nette Finder: Files Searching", "homepage": "https://nette.org", - "time": "2017-07-10T23:47:08+00:00" + "time": "2017-07-10 23:47:08" }, { "name": "nette/reflection", @@ -3575,7 +3514,7 @@ "nette", "reflection" ], - "time": "2017-07-11T19:28:57+00:00" + "time": "2017-07-11 19:28:57" }, { "name": "nette/utils", @@ -3638,7 +3577,7 @@ ], "description": "Nette Utility Classes", "homepage": "https://nette.org", - "time": "2017-07-11T19:25:29+00:00" + "time": "2017-07-11 19:25:29" }, { "name": "ondram/ci-detector", @@ -3691,7 +3630,7 @@ "teamcity", "travis" ], - "time": "2017-05-26T16:39:57+00:00" + "time": "2017-05-26 16:39:57" }, { "name": "phpdocumentor/reflection-common", @@ -3745,7 +3684,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "time": "2015-12-27 11:43:31" }, { "name": "phpdocumentor/reflection-docblock", @@ -3790,7 +3729,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-08-08T06:39:58+00:00" + "time": "2017-08-08 06:39:58" }, { "name": "phpdocumentor/type-resolver", @@ -3837,7 +3776,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-06-03T08:32:36+00:00" + "time": "2017-06-03 08:32:36" }, { "name": "phpspec/prophecy", @@ -3900,7 +3839,7 @@ "spy", "stub" ], - "time": "2017-03-02T20:05:34+00:00" + "time": "2017-03-02 20:05:34" }, { "name": "phpunit/php-code-coverage", @@ -3963,7 +3902,7 @@ "testing", "xunit" ], - "time": "2017-04-02T07:44:40+00:00" + "time": "2017-04-02 07:44:40" }, { "name": "phpunit/php-file-iterator", @@ -4010,7 +3949,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2016-10-03 07:40:28" }, { "name": "phpunit/php-text-template", @@ -4051,7 +3990,7 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2015-06-21 13:50:34" }, { "name": "phpunit/php-timer", @@ -4100,7 +4039,7 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2017-02-26 11:10:40" }, { "name": "phpunit/php-token-stream", @@ -4149,7 +4088,7 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27T10:12:30+00:00" + "time": "2017-02-27 10:12:30" }, { "name": "phpunit/phpunit", @@ -4231,7 +4170,7 @@ "testing", "xunit" ], - "time": "2017-06-21T08:11:54+00:00" + "time": "2017-06-21 08:11:54" }, { "name": "phpunit/phpunit-mock-objects", @@ -4290,7 +4229,7 @@ "mock", "xunit" ], - "time": "2017-06-30T09:13:00+00:00" + "time": "2017-06-30 09:13:00" }, { "name": "psr/container", @@ -4339,7 +4278,7 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2017-02-14 16:28:37" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4384,7 +4323,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "time": "2017-03-04 06:30:41" }, { "name": "sebastian/comparator", @@ -4448,7 +4387,7 @@ "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2017-01-29 09:50:25" }, { "name": "sebastian/diff", @@ -4500,7 +4439,7 @@ "keywords": [ "diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2017-05-22 07:24:03" }, { "name": "sebastian/environment", @@ -4550,7 +4489,7 @@ "environment", "hhvm" ], - "time": "2016-11-26T07:53:53+00:00" + "time": "2016-11-26 07:53:53" }, { "name": "sebastian/exporter", @@ -4617,7 +4556,7 @@ "export", "exporter" ], - "time": "2016-11-19T08:54:04+00:00" + "time": "2016-11-19 08:54:04" }, { "name": "sebastian/global-state", @@ -4668,7 +4607,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2015-10-12 03:26:01" }, { "name": "sebastian/object-enumerator", @@ -4714,7 +4653,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18T15:18:39+00:00" + "time": "2017-02-18 15:18:39" }, { "name": "sebastian/recursion-context", @@ -4767,7 +4706,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19T07:33:16+00:00" + "time": "2016-11-19 07:33:16" }, { "name": "sebastian/resource-operations", @@ -4809,7 +4748,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2015-07-28 20:34:47" }, { "name": "sebastian/version", @@ -4852,7 +4791,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "time": "2016-10-03 07:35:21" }, { "name": "squizlabs/php_codesniffer", @@ -4903,7 +4842,7 @@ "phpcs", "standards" ], - "time": "2017-07-18T01:12:32+00:00" + "time": "2017-07-18 01:12:32" }, { "name": "symfony/class-loader", @@ -4959,7 +4898,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2017-06-02T09:51:43+00:00" + "time": "2017-06-02 09:51:43" }, { "name": "symfony/config", @@ -5021,7 +4960,7 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2017-07-19T07:37:29+00:00" + "time": "2017-07-19 07:37:29" }, { "name": "symfony/dependency-injection", @@ -5091,7 +5030,7 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2017-07-28T15:27:31+00:00" + "time": "2017-07-28 15:27:31" }, { "name": "symfony/filesystem", @@ -5140,7 +5079,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-07-11T07:17:58+00:00" + "time": "2017-07-11 07:17:58" }, { "name": "symfony/options-resolver", @@ -5194,7 +5133,7 @@ "configuration", "options" ], - "time": "2017-04-12T14:14:56+00:00" + "time": "2017-04-12 14:14:56" }, { "name": "symfony/stopwatch", @@ -5243,7 +5182,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:14:56+00:00" + "time": "2017-04-12 14:14:56" }, { "name": "symfony/yaml", @@ -5298,7 +5237,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-07-23T12:43:26+00:00" + "time": "2017-07-23 12:43:26" }, { "name": "webmozart/assert", @@ -5348,7 +5287,7 @@ "check", "validate" ], - "time": "2016-11-23T20:04:58+00:00" + "time": "2016-11-23 20:04:58" }, { "name": "wimg/php-compatibility", @@ -5400,7 +5339,7 @@ "phpcs", "standards" ], - "time": "2017-08-07T19:39:05+00:00" + "time": "2017-08-07 19:39:05" } ], "aliases": [], diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 33c3ec4f3..e8ed3cd19 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -694,7 +694,7 @@ class Bootstrap // Include also the extendGulliverClass that could have some // new definitions for fields if (file_exists($possiblePath . 'classes' . PATH_SEP . 'class.extendGulliver.php')) { - + include_once $possiblePath . 'classes' . PATH_SEP . 'class.extendGulliver.php'; } } } From 47c7abe691a7d19efb327d2e8c7c419b1dab895f Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Fri, 25 Aug 2017 17:47:17 -0400 Subject: [PATCH 15/20] HOR-3769: Datareportingtool issue in the export --- framework/src/Maveriks/Util/Common.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/framework/src/Maveriks/Util/Common.php b/framework/src/Maveriks/Util/Common.php index afe8a6b75..f14ed1486 100644 --- a/framework/src/Maveriks/Util/Common.php +++ b/framework/src/Maveriks/Util/Common.php @@ -113,6 +113,32 @@ class Common return $result; } + /** + * Maintained for compatibility reasons with the plugin DataReportingTool + * @deprecated 3.2.2, by backward compatibility because it is used in plugins enterprise + * + */ + public static function getLastVersion($pattern, $flag = 0) + { + $files = glob($pattern, $flag); + $maxVersion = 0; + + $pattern = str_replace("*", '([0-9\.]+)', basename($pattern)); + + foreach ($files as $file) { + $filename = basename($file); + + if (preg_match('/'.$pattern.'/', $filename, $match)) { + + if ($maxVersion < $match[1]) { + $maxVersion = $match[1]; + } + } + } + + return $maxVersion; + } + public static function mk_dir($strPath, $rights = 0777) { $folder_path = array($strPath); From f3eb2f8504badeb01cd5aecc4890b278da96b656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Cesar=20Laura=20Avenda=C3=B1o?= Date: Fri, 25 Aug 2017 18:09:55 -0400 Subject: [PATCH 16/20] HOR-3769 compatibility for NewRelic plugin --- .../engine/classes/{interfaces => }/DashletInterface.php | 0 workflow/engine/classes/interfaces/dashletInterface.php | 7 +++++++ 2 files changed, 7 insertions(+) rename workflow/engine/classes/{interfaces => }/DashletInterface.php (100%) create mode 100644 workflow/engine/classes/interfaces/dashletInterface.php diff --git a/workflow/engine/classes/interfaces/DashletInterface.php b/workflow/engine/classes/DashletInterface.php similarity index 100% rename from workflow/engine/classes/interfaces/DashletInterface.php rename to workflow/engine/classes/DashletInterface.php diff --git a/workflow/engine/classes/interfaces/dashletInterface.php b/workflow/engine/classes/interfaces/dashletInterface.php new file mode 100644 index 000000000..541f15245 --- /dev/null +++ b/workflow/engine/classes/interfaces/dashletInterface.php @@ -0,0 +1,7 @@ + Date: Fri, 25 Aug 2017 19:38:41 -0400 Subject: [PATCH 17/20] HOR-3769 --- workflow/engine/src/ProcessMaker/Services/Api/Light.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php index 193cb1844..d5d849b73 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php @@ -1689,7 +1689,7 @@ class Light extends Api * Get Case Variables * * @access protected - * @class AccessControl {@className \ProcessMaker\Services\ApiCases} + * @class AccessControl {@className \ProcessMaker\Services\Api\Cases} * @url GET /:app_uid/variables * * @param string $app_uid {@min 1}{@max 32} @@ -1852,7 +1852,7 @@ class Light extends Api $response = array(); //conditionalSteps - $oCase = new Cases(); + $oCase = new ClassesCases(); $oAppDelegate = new AppDelegation(); $alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $app_index); if ($alreadyRouted) { From 5e3077f2a2f141b331d8b8a5c858f944a3ca68d1 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Mon, 28 Aug 2017 08:29:12 -0400 Subject: [PATCH 18/20] HOR-3769 --- workflow/engine/src/ProcessMaker/Project/Workflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/src/ProcessMaker/Project/Workflow.php b/workflow/engine/src/ProcessMaker/Project/Workflow.php index 495b3f507..fce9a0965 100644 --- a/workflow/engine/src/ProcessMaker/Project/Workflow.php +++ b/workflow/engine/src/ProcessMaker/Project/Workflow.php @@ -75,7 +75,7 @@ class Workflow extends Handler self::log("Create Process with data:", $data); //validate if process with specified name already exists - if (Process::existsByProTitle($data["PRO_TITLE"])) { + if (ClassesProcess::existsByProTitle($data["PRO_TITLE"])) { throw new Exception\ProjectAlreadyExists($this, $data["PRO_TITLE"]); } From a6b65d0baba29e0151f8f7d57548237db2ab7bd3 Mon Sep 17 00:00:00 2001 From: Ronald Quenta Date: Mon, 28 Aug 2017 11:07:26 -0400 Subject: [PATCH 19/20] HOR-3803 --- .gitignore | 2 ++ rbac/engine/classes/model/Roles.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b5945bbd1..2729c73bd 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ build-prod.zip node_modules /workflow/engine/config/system-tables.ini test_shared/ +**/cache/ +storage/ diff --git a/rbac/engine/classes/model/Roles.php b/rbac/engine/classes/model/Roles.php index 56dd1e5c3..cc8f0cd33 100644 --- a/rbac/engine/classes/model/Roles.php +++ b/rbac/engine/classes/model/Roles.php @@ -215,7 +215,6 @@ class Roles extends BaseRoles { function createRole($aData) { $con = Propel::getConnection(RolesPeer::DATABASE_NAME); try { - $con->begin(); $sRolCode = $aData['ROL_CODE']; $sRolSystem = $aData['ROL_SYSTEM']; $status = $fields['ROL_STATUS'] = 1 ? 'ACTIVE' : 'INACTIVE'; @@ -239,6 +238,7 @@ class Roles extends BaseRoles { $obj = new Roles(); $obj->fromArray($aData, BasePeer::TYPE_FIELDNAME); if ($obj->validate()) { + $con->begin(); $result = $obj->save(); $con->commit(); $obj->setRolName($rol_name); From dc7e5d933e9b4c4de5e648261ccb0cd25fce456e Mon Sep 17 00:00:00 2001 From: Ronald Quenta Date: Tue, 29 Aug 2017 11:58:03 -0400 Subject: [PATCH 20/20] HOR-3806 --- workflow/engine/bin/reindex_solr.php | 5 ++- .../classes/BpmnEngineServicesSearchIndex.php | 31 ++++++------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/workflow/engine/bin/reindex_solr.php b/workflow/engine/bin/reindex_solr.php index 6844c0022..13342fd4a 100644 --- a/workflow/engine/bin/reindex_solr.php +++ b/workflow/engine/bin/reindex_solr.php @@ -22,6 +22,10 @@ * */ +require_once __DIR__ . '/../../../gulliver/system/class.g.php'; +require_once __DIR__ . '/../../../bootstrap/autoload.php'; +require_once __DIR__ . '/../../../bootstrap/app.php'; + // check script parameters // php reindex_solr.php workspacename [reindexall|reindexmissing|optimizeindex] [-skip 1005] [-reindextrunksize 1000] // var_dump($argv); @@ -117,7 +121,6 @@ if (! defined ('PATH_HOME')) { define( 'PATH_CLASSES', PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP ); require_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php'); - spl_autoload_register(array('Bootstrap', 'autoloadClass')); } print "PATH_HOME: " . PATH_HOME . "\n"; diff --git a/workflow/engine/classes/BpmnEngineServicesSearchIndex.php b/workflow/engine/classes/BpmnEngineServicesSearchIndex.php index 5d6687f33..8436a14c7 100644 --- a/workflow/engine/classes/BpmnEngineServicesSearchIndex.php +++ b/workflow/engine/classes/BpmnEngineServicesSearchIndex.php @@ -24,8 +24,7 @@ class BpmnEngineServicesSearchIndex */ public function isEnabled($workspace) { - require_once('class.solr.php'); - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); return $solr->isEnabled($workspace); } @@ -40,12 +39,6 @@ class BpmnEngineServicesSearchIndex */ public function getFacetsList($facetRequestEntity) { - require_once('class.solr.php'); - require_once('entities/FacetGroup.php'); - require_once('entities/FacetItem.php'); - require_once('entities/SelectedFacetGroupItem.php'); - require_once('entities/FacetResult.php'); - // get array of selected facet groups $facetRequestEntity->selectedFacetsString = str_replace(',,', ',', $facetRequestEntity->selectedFacetsString); // remove descriptions of selected facet groups @@ -98,7 +91,7 @@ class BpmnEngineServicesSearchIndex } $facetRequestEntity->filters = $filters; - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); // create list of facets $facetsList = $solr->getFacetsList($facetRequestEntity); @@ -206,7 +199,7 @@ class BpmnEngineServicesSearchIndex public function getNumberDocuments($workspace) { require_once('class.solr.php'); - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); // create list of facets $numberDocuments = $solr->getNumberDocuments($workspace); @@ -220,7 +213,7 @@ class BpmnEngineServicesSearchIndex */ public function updateIndexDocument($solrUpdateDocumentEntity) { - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); // create list of facets $solr->updateDocument($solrUpdateDocumentEntity); @@ -233,7 +226,7 @@ class BpmnEngineServicesSearchIndex */ public function deleteDocumentFromIndex($workspace, $idQuery) { - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); // create list of facets $solr->deleteDocument($workspace, $idQuery); @@ -245,7 +238,7 @@ class BpmnEngineServicesSearchIndex */ public function commitIndexChanges($workspace) { - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); // commit $solr->commitChanges($workspace); @@ -257,7 +250,7 @@ class BpmnEngineServicesSearchIndex */ public function optimizeIndexChanges($workspace) { - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); // commit $solr->optimizeChanges($workspace); @@ -270,12 +263,8 @@ class BpmnEngineServicesSearchIndex */ public function getDataTablePaginatedList($solrRequestData) { - require_once('class.solr.php'); - require_once('entities/SolrRequestData.php'); - require_once('entities/SolrQueryResult.php'); - // execute query - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); $solrPaginatedResult = $solr->executeQuery($solrRequestData); // get total number of documents in index @@ -322,9 +311,7 @@ class BpmnEngineServicesSearchIndex */ public function getIndexFields($workspace) { - require_once('class.solr.php'); - - $solr = new BpmnEngine_SearchIndexAccess_Solr($this->_solrIsEnabled, $this->_solrHost); + $solr = new BpmnEngineSearchIndexAccessSolr($this->_solrIsEnabled, $this->_solrHost); $solrFieldsData = $solr->getListIndexedStoredFields($workspace); // copy list of arrays