diff --git a/gulliver/bin/tasks/pakeGulliver.php b/gulliver/bin/tasks/pakeGulliver.php index 44cf5441d..a02c1ff88 100644 --- a/gulliver/bin/tasks/pakeGulliver.php +++ b/gulliver/bin/tasks/pakeGulliver.php @@ -2037,7 +2037,7 @@ function get_DirDB($workspace) { } require_once ($dbFile); - + require_once ("propel/Propel.php"); Propel::init(PATH_CORE . "config/databases.php"); $configuration = Propel::getConfiguration(); diff --git a/rbac/public_html/sysUnnamed.php b/rbac/public_html/sysUnnamed.php index 4733a35b6..a518f3282 100644 --- a/rbac/public_html/sysUnnamed.php +++ b/rbac/public_html/sysUnnamed.php @@ -5,7 +5,7 @@ // define("URL_KEY", 'c0l0s40pt1mu59r1m3' ); // define("ENABLE_ENCRYPT", 'yes' ); - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $COMPLETE_URI = $filter->xssFilterHard($_SERVER["REQUEST_URI"]); diff --git a/thirdparty/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php b/thirdparty/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php index 8c39b2c0a..77af73bcf 100644 --- a/thirdparty/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php +++ b/thirdparty/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php @@ -96,7 +96,7 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $sFile=$filter->validateInput($file,'path'); @@ -209,7 +209,7 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac $pathTrunk = implode('/', $docuroot) . '/'; require_once($pathTrunk . 'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); if(is_file($file)) { diff --git a/thirdparty/pear/HTTP/WebDAV/Server.php b/thirdparty/pear/HTTP/WebDAV/Server.php index 15188f91f..fadd86fd7 100644 --- a/thirdparty/pear/HTTP/WebDAV/Server.php +++ b/thirdparty/pear/HTTP/WebDAV/Server.php @@ -678,7 +678,7 @@ class HTTP_WebDAV_Server $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $ns_defs = $filter->xssFilterHard($ns_defs); @@ -831,7 +831,7 @@ class HTTP_WebDAV_Server $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_mergePathes = $filter->xssFilterHard($this->_urlencode($this->_mergePathes($_SERVER["SCRIPT_NAME"], $this->path))); @@ -1167,7 +1167,7 @@ class HTTP_WebDAV_Server $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $val = $filter->xssFilterHard($val); @@ -1226,7 +1226,7 @@ class HTTP_WebDAV_Server $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $key = $filter->xssFilterHard($key); @@ -1439,7 +1439,7 @@ class HTTP_WebDAV_Server $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $options = $filter->xssFilterHard($options); $timeout = $filter->xssFilterHard($timeout); diff --git a/thirdparty/pear/Net/FTP.php b/thirdparty/pear/Net/FTP.php index 73bac26f0..9bbfc4d6f 100644 --- a/thirdparty/pear/Net/FTP.php +++ b/thirdparty/pear/Net/FTP.php @@ -1419,7 +1419,7 @@ class Net_FTP extends PEAR $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $remote_path = $this->_constructPath($remote_path); if (!$this->_checkDir($remote_path)) { diff --git a/thirdparty/pear/Net/FTP/Socket.php b/thirdparty/pear/Net/FTP/Socket.php index 805775468..2888125ea 100644 --- a/thirdparty/pear/Net/FTP/Socket.php +++ b/thirdparty/pear/Net/FTP/Socket.php @@ -644,7 +644,7 @@ function ftp_get(&$control, $local, $remote, $mode, $resume = 0, $wr='w') $pathTrunk = implode('/', $docuroot) . '/'; require_once($pathTrunk . 'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); if (!is_resource($control) || !is_writable(dirname($local)) || !is_integer($mode) || !is_integer($resume)) { diff --git a/thirdparty/pear/PEAR/Builder.php b/thirdparty/pear/PEAR/Builder.php index cbd443d50..e862312a0 100644 --- a/thirdparty/pear/PEAR/Builder.php +++ b/thirdparty/pear/PEAR/Builder.php @@ -13,7 +13,7 @@ // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ -// | Authors: Stig Sæther Bakken | +// | Authors: Stig S�ther Bakken | // +----------------------------------------------------------------------+ // // $Id: Builder.php,v 1.10 2003/03/21 07:57:27 ssb Exp $ @@ -23,7 +23,7 @@ require_once 'PEAR/Common.php'; /** * Class to handle building (compiling) extensions. * - * @author Stig Sæther Bakken + * @author Stig S�ther Bakken */ class PEAR_Builder extends PEAR_Common { @@ -118,7 +118,7 @@ class PEAR_Builder extends PEAR_Common require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $dsp = $filter->validateInput($dsp,"path"); // msdev doesn't tell us the output directory :/ @@ -370,7 +370,7 @@ class PEAR_Builder extends PEAR_Common require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $command = $filter->validateInput($command); diff --git a/thirdparty/pear/PEAR/Command/Package.php b/thirdparty/pear/PEAR/Command/Package.php index d4bc4ef6a..ac9f264aa 100644 --- a/thirdparty/pear/PEAR/Command/Package.php +++ b/thirdparty/pear/PEAR/Command/Package.php @@ -361,7 +361,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $command = $filter->validateInput($command); @@ -454,7 +454,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $command = $filter->validateInput($command); diff --git a/thirdparty/pear/PEAR/Common.php b/thirdparty/pear/PEAR/Common.php index 88a4f6049..ab84ff6b1 100644 --- a/thirdparty/pear/PEAR/Common.php +++ b/thirdparty/pear/PEAR/Common.php @@ -1228,7 +1228,7 @@ class PEAR_Common extends PEAR require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $file = $filter->validateInput($file,"path"); @@ -1655,7 +1655,7 @@ class PEAR_Common extends PEAR require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $dest_file = $filter->validateInput($dest_file,"path"); diff --git a/thirdparty/pear/PEAR/Installer.php b/thirdparty/pear/PEAR/Installer.php index 0e7f9d7fa..6fc5e1491 100644 --- a/thirdparty/pear/PEAR/Installer.php +++ b/thirdparty/pear/PEAR/Installer.php @@ -245,7 +245,7 @@ class PEAR_Installer extends PEAR_Common $md5sum = G::encryptOld($contents); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $subst_from = $subst_to = array(); diff --git a/thirdparty/pear/PEAR/Registry.php b/thirdparty/pear/PEAR/Registry.php index 84d57292c..6304523aa 100644 --- a/thirdparty/pear/PEAR/Registry.php +++ b/thirdparty/pear/PEAR/Registry.php @@ -174,7 +174,7 @@ class PEAR_Registry extends PEAR $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $file = $filter->validateInput($file,"path"); @@ -448,7 +448,7 @@ class PEAR_Registry extends PEAR require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $file = $filter->validateInput($file,"path"); diff --git a/thirdparty/pear/SOAP/Interop/interop_client_run.php b/thirdparty/pear/SOAP/Interop/interop_client_run.php index 75d81fff7..ae49c1f42 100644 --- a/thirdparty/pear/SOAP/Interop/interop_client_run.php +++ b/thirdparty/pear/SOAP/Interop/interop_client_run.php @@ -92,7 +92,7 @@ function print_endpoint_names() $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $currTest = $filter->xssFilterHard($iop->currentTest); @@ -163,7 +163,7 @@ foreach ($args[0] as $arg) { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $arg[1] = $filter->xssFilterHard($arg[1]); diff --git a/thirdparty/pear/nusoap.colosa.php b/thirdparty/pear/nusoap.colosa.php index cf2ec2145..43c111f91 100644 --- a/thirdparty/pear/nusoap.colosa.php +++ b/thirdparty/pear/nusoap.colosa.php @@ -818,7 +818,7 @@ class nusoap_base_colosa { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $data = $filter->xssFilterHard($data); @@ -3284,7 +3284,7 @@ class soap_server_colosa extends nusoap_base_colosa { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $err = $filter->xssFilterHard($err); @@ -3345,7 +3345,7 @@ class soap_server_colosa extends nusoap_base_colosa { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $webDescription = $filter->xssFilterHard($this->wsdl->webDescription()); diff --git a/thirdparty/pear/nusoap.php b/thirdparty/pear/nusoap.php index 89dc51e11..ebdae0b04 100644 --- a/thirdparty/pear/nusoap.php +++ b/thirdparty/pear/nusoap.php @@ -815,7 +815,7 @@ class nusoap_base { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $data = $filter->xssFilterHard($data); @@ -3287,7 +3287,7 @@ class soap_server extends nusoap_base { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $err = $filter->xssFilterHard($err); @@ -3348,7 +3348,7 @@ class soap_server extends nusoap_base { $pathTrunk = implode( '/', $docuroot ) . '/'; require_once($pathTrunk.'gulliver/system/class.g.php'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $webDescription = $filter->xssFilterHard($this->wsdl->webDescription()); diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php index bc75f488b..534f1ca76 100644 --- a/workflow/engine/bin/cron_single.php +++ b/workflow/engine/bin/cron_single.php @@ -257,7 +257,7 @@ try { define('TIME_ZONE', ini_get('date.timezone')); //Enable Monolog - Bootstrap::LoadSystem( 'monologProvider' ); + //Processing eprintln('Processing workspace: ' . $workspace, 'green'); diff --git a/workflow/engine/bin/reindex_solr.php b/workflow/engine/bin/reindex_solr.php index 4885fb8ef..17eb283f6 100644 --- a/workflow/engine/bin/reindex_solr.php +++ b/workflow/engine/bin/reindex_solr.php @@ -150,8 +150,8 @@ if (! defined ('SYS_SYS')) { define ('TIME_ZONE', $config ['time_zone']); date_default_timezone_set (TIME_ZONE); - - G::LoadSystem('inputfilter'); + + $filter = new InputFilter(); $TIME_ZONE = $filter->xssFilterHard(TIME_ZONE); $MEMCACHED_ENABLED = $filter->xssFilterHard(MEMCACHED_ENABLED); diff --git a/workflow/engine/bin/tasks/cliFlushCache.php b/workflow/engine/bin/tasks/cliFlushCache.php index ff83ae745..3934d096a 100644 --- a/workflow/engine/bin/tasks/cliFlushCache.php +++ b/workflow/engine/bin/tasks/cliFlushCache.php @@ -23,7 +23,7 @@ * * @package workflow-engine-bin-tasks */ -G::LoadSystem("g"); + CLI::taskName('flush-cache'); CLI::taskDescription(<<xssFilterHard($opts); $args = $filter->xssFilterHard($args); diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index a7002f62a..c59062b5b 100644 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -341,7 +341,7 @@ function run_info($args, $opts) { } function run_workspace_upgrade($args, $opts) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $opts = $filter->xssFilterHard($opts); $args = $filter->xssFilterHard($args); @@ -371,7 +371,7 @@ function run_workspace_upgrade($args, $opts) { } function run_translation_upgrade($args, $opts) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $opts = $filter->xssFilterHard($opts); $args = $filter->xssFilterHard($args); @@ -389,7 +389,7 @@ function run_translation_upgrade($args, $opts) { } function run_cacheview_upgrade($args, $opts) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $opts = $filter->xssFilterHard($opts); $args = $filter->xssFilterHard($args); @@ -471,7 +471,7 @@ function run_migrate_list_unassigned($args, $opts) { * @return void */ function database_upgrade($command, $args) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $command = $filter->xssFilterHard($command); $args = $filter->xssFilterHard($args); @@ -730,7 +730,7 @@ function runStructureDirectories($command, $args) { function run_database_generate_self_service_by_value($args, $opts) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $opts = $filter->xssFilterHard($opts); $args = $filter->xssFilterHard($args); @@ -812,7 +812,7 @@ function verifyMigratedDataConsistency($args) } function run_migrate_itee_to_dummytask($args, $opts){ - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $opts = $filter->xssFilterHard($opts); $args = $filter->xssFilterHard($args); @@ -944,7 +944,7 @@ function migrate_counters($command, $args) { } function migrate_list_unassigned($command, $args, $opts) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $opts = $filter->xssFilterHard($opts); $args = $filter->xssFilterHard($args); @@ -1013,7 +1013,7 @@ function migrate_content($args, $opts) } function run_migrate_self_service_value($args, $opts) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $args = $filter->xssFilterHard($args); $workspaces = get_workspaces_from_args($args); diff --git a/workflow/engine/bin/verify_solr.php b/workflow/engine/bin/verify_solr.php index 25640d26c..a67c12dd4 100644 --- a/workflow/engine/bin/verify_solr.php +++ b/workflow/engine/bin/verify_solr.php @@ -130,8 +130,8 @@ if (! defined ('SYS_SYS')) { include_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php'); include_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php'); - - G::LoadSystem('inputfilter'); + + $filter = new InputFilter(); $TIME_ZONE = $filter->xssFilterHard(TIME_ZONE); $MEMCACHED_ENABLED = $filter->xssFilterHard(MEMCACHED_ENABLED); diff --git a/workflow/engine/classes/class.Installer.php b/workflow/engine/classes/class.Installer.php index 0dab68cc4..ee5f99dd7 100644 --- a/workflow/engine/classes/class.Installer.php +++ b/workflow/engine/classes/class.Installer.php @@ -293,7 +293,7 @@ class Installer foreach ($fileTar as $value) { $dataFile = pathinfo($value); $nameSkinTmp = $dataFile['filename']; - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $value ); $pathSkinTmp = $pathSkinPartner . 'tmp' . PATH_SEP; diff --git a/workflow/engine/classes/class.Upgrade.php b/workflow/engine/classes/class.Upgrade.php index fe42cc4b1..acb269975 100644 --- a/workflow/engine/classes/class.Upgrade.php +++ b/workflow/engine/classes/class.Upgrade.php @@ -30,13 +30,13 @@ class Upgrade public function install() { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); //echo "Starting core installation...\n"; $start = microtime(1); $filename = $this->addon->getDownloadFilename(); $time = microtime(1); - G::LoadThirdParty( 'pear/Archive','Tar'); + $archive = new Archive_Tar ($filename); //printf("Time to open archive: %f\n", microtime(1) - $time); $time = microtime(1); diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php index fd71db44c..f715cfeda 100644 --- a/workflow/engine/classes/class.case.php +++ b/workflow/engine/classes/class.case.php @@ -2606,7 +2606,7 @@ class Cases ///-- $c->addAsColumn('USR_NAME', "CONCAT(USR_LASTNAME, ' ', USR_FIRSTNAME)"); $sDataBase = 'database_' . strtolower(DB_ADAPTER); if (G::LoadSystemExist($sDataBase)) { - G::LoadSystem($sDataBase); + $oDataBase = new database(); $c->addAsColumn('USR_NAME', $oDataBase->concatString("USR_LASTNAME", "' '", "USR_FIRSTNAME")); $c->addAsColumn( @@ -3866,7 +3866,7 @@ class Cases G::verifyPath($strPathName, true); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $file = $filter->xssFilterHard($file, 'path'); diff --git a/workflow/engine/classes/class.cli.php b/workflow/engine/classes/class.cli.php index 9d75ca6f7..6c6871981 100644 --- a/workflow/engine/classes/class.cli.php +++ b/workflow/engine/classes/class.cli.php @@ -253,7 +253,7 @@ EOT; self::help( null, null ); return; } - G::LoadThirdParty( 'pear/Console', 'Getopt' ); + $short = "h" . $taskData['opt']['short']; $long = array_merge( array ("help" ), $taskData['opt']['long'] ); diff --git a/workflow/engine/classes/class.dynaformEditor.php b/workflow/engine/classes/class.dynaformEditor.php index 21705a4a6..d34e89eba 100644 --- a/workflow/engine/classes/class.dynaformEditor.php +++ b/workflow/engine/classes/class.dynaformEditor.php @@ -505,7 +505,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax */ public function restore_html($A) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $script = null; $fileTmp = G::decrypt($A, URL_KEY); @@ -539,7 +539,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax public function set_htmlcode($A, $htmlcode) { try { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $iOcurrences = preg_match_all('/\{\$.*?\}/im', $htmlcode, $matches); if ($iOcurrences) { @@ -594,7 +594,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax */ public function set_xmlcode($A, $xmlcode) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $xmlcode = urldecode($xmlcode); $file = G::decrypt($A, URL_KEY); @@ -646,7 +646,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax */ public function set_javascript($A, $fieldName, $sCode, $meta = '') { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $fieldName = $filter->xssFilterHard($fieldName, 'path'); if ($fieldName == '___pm_boot_strap___') { @@ -662,7 +662,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax $ses2->execute(G::replaceDataField("UPDATE dynaForm SET XMLNODE_VALUE = @@CODE WHERE XMLNODE_NAME = @@FIELDNAME ", array('FIELDNAME'=>$fieldName,'CODE'=>$sCode), "myxml" )); */ - G::LoadSystem('dynaformhandler'); + $pathFile = $filter->xssFilterHard(PATH_DYNAFORM . "{$file}.xml", 'path'); $dynaform = new dynaFormHandler($pathFile); $dynaform->replace($fieldName, $fieldName, Array('type' => 'javascript', 'meta' => $meta, '#cdata' => $sCode @@ -718,7 +718,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax public function set_properties($A, $DYN_UID, $getFields) { try { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $post = array(); parse_str($getFields, $post); @@ -796,7 +796,7 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax */ public function set_enabletemplate($A, $value) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $file = G::decrypt($A, URL_KEY); $value = $value == "1" ? "1" : "0"; diff --git a/workflow/engine/classes/class.net.php b/workflow/engine/classes/class.net.php index a2a869a9f..1644b1801 100644 --- a/workflow/engine/classes/class.net.php +++ b/workflow/engine/classes/class.net.php @@ -208,7 +208,7 @@ class NET */ public function tryConnectServer($pDbDriver, array $arrayServerData = array(), $dbsEncode = "") { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $this->ip = $filter->validateInput($this->ip); $this->db_port = $filter->validateInput($this->db_port,'int'); @@ -331,7 +331,7 @@ class NET */ public function tryOpenDataBase($pDbDriver, array $arrayServerData = array(), $dbsEncode = "") { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $this->ip = $filter->validateInput($this->ip); $this->db_port = $filter->validateInput($this->db_port,'int'); @@ -489,7 +489,7 @@ class NET $value = 'none'; $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $value = $oDataBase->getServerVersion( $driver, $this->ip, $this->db_port, $this->db_user, $this->db_passwd, $this->db_sourcename ); } diff --git a/workflow/engine/classes/class.pluginRegistry.php b/workflow/engine/classes/class.pluginRegistry.php index 9a5933c8f..82fe83a42 100644 --- a/workflow/engine/classes/class.pluginRegistry.php +++ b/workflow/engine/classes/class.pluginRegistry.php @@ -465,7 +465,7 @@ class PMPluginRegistry */ public function installPluginArchive ($filename, $pluginName) { - G::LoadThirdParty( "pear/Archive", "Tar" ); + $tar = new Archive_Tar( $filename ); $files = $tar->listContent(); $plugins = array (); @@ -530,7 +530,7 @@ class PMPluginRegistry if (! file_exists( PATH_PLUGINS . $pluginFile )) { throw (new Exception( "File \"$pluginFile\" doesn't exist" )); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $path = PATH_PLUGINS . $pluginFile; //$path = $filter->validateInput($path, 'path'); @@ -554,7 +554,7 @@ class PMPluginRegistry /////// $path = PATH_PLUGINS . $pluginFile; - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $path = $filter->validateInput($path, 'path'); require_once ($path); @@ -1023,7 +1023,7 @@ class PMPluginRegistry */ public function executeTriggers ($triggerId, $oData) { - G::LoadThirdParty( "pear", "PEAR" ); + foreach ($this->_aTriggers as $row => $detail) { if ($triggerId == $detail->sTriggerId) { //review all folders registered for this namespace diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php index 5bbf1466d..9a258c469 100644 --- a/workflow/engine/classes/class.pmDynaform.php +++ b/workflow/engine/classes/class.pmDynaform.php @@ -1817,7 +1817,7 @@ class pmDynaform throw new Exception(G::LoadTranslation("ID_FILE_UPLOAD_INCORRECT_EXTENSION")); } $translation = array(); - G::LoadSystem('i18n_po'); + $i18n = new i18n_PO($_FILES["LANGUAGE"]["tmp_name"]); $i18n->readInit(); while ($rowTranslation = $i18n->getTranslation()) { diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index 9cfcbb4e4..338d92f77 100644 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -249,7 +249,7 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter ((isset($blackList['pmtables']))? $blackList['pmtables'] : '') ); if (!class_exists('PHPSQLParser')) { - G::LoadSystem('phpSqlParser'); + } $parseSqlStm = new PHPSQLParser($SqlStatement); try { diff --git a/workflow/engine/classes/class.pmLicenseManager.php b/workflow/engine/classes/class.pmLicenseManager.php index 447250ad4..e5c079877 100644 --- a/workflow/engine/classes/class.pmLicenseManager.php +++ b/workflow/engine/classes/class.pmLicenseManager.php @@ -441,7 +441,7 @@ class pmLicenseManager $LicenseStatus = $this->lookForStatusLicense(); //we're looking for a status ACTIVE //getting the content from file - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $path = $filter->xssFilterHard($path, 'path'); diff --git a/workflow/engine/classes/class.processMap.php b/workflow/engine/classes/class.processMap.php index bdff3d605..e6596987a 100644 --- a/workflow/engine/classes/class.processMap.php +++ b/workflow/engine/classes/class.processMap.php @@ -3102,7 +3102,7 @@ class processMap */ public function listNoProcessesUser($sProcessUID) { - G::LoadSystem('rbac'); + $memcache = & PMmemcached::getSingleton(SYS_SYS); $oCriteria = new Criteria('workflow'); @@ -5796,7 +5796,7 @@ class processMap */ public function listExtNoProcessesUser($sProcessUID) { - G::LoadSystem('rbac'); + $memcache = & PMmemcached::getSingleton(SYS_SYS); $oCriteria = new Criteria('workflow'); diff --git a/workflow/engine/classes/class.propelTable.php b/workflow/engine/classes/class.propelTable.php index 6642b536c..5da42ff76 100644 --- a/workflow/engine/classes/class.propelTable.php +++ b/workflow/engine/classes/class.propelTable.php @@ -555,7 +555,7 @@ class propelTable */ public function renderTable ($block = '', $fields = '') { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $fields = $filter->xssFilterHard($fields); $this->orderBy = $filter->xssFilterHard($this->orderBy); diff --git a/workflow/engine/classes/class.reportTables.php b/workflow/engine/classes/class.reportTables.php index b96446a6a..55c759c2e 100644 --- a/workflow/engine/classes/class.reportTables.php +++ b/workflow/engine/classes/class.reportTables.php @@ -821,7 +821,7 @@ class ReportTables $bExists = true; $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $bExists = $oDataBase->reportTableExist(); } diff --git a/workflow/engine/classes/class.spool.php b/workflow/engine/classes/class.spool.php index 986c9588f..1c04e4408 100644 --- a/workflow/engine/classes/class.spool.php +++ b/workflow/engine/classes/class.spool.php @@ -425,7 +425,7 @@ class spoolRun switch ($this->config['MESS_ENGINE']) { case 'MAIL': case 'PHPMAILER': - G::LoadThirdParty( 'phpmailer', 'class.phpmailer' ); + switch ($this->config['MESS_ENGINE']) { case 'MAIL': diff --git a/workflow/engine/classes/class.system.php b/workflow/engine/classes/class.system.php index acfadbe58..b1fc71b3b 100644 --- a/workflow/engine/classes/class.system.php +++ b/workflow/engine/classes/class.system.php @@ -291,7 +291,7 @@ class System */ public function verifyFileForUpgrade () { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $upgradeFilename = isset( $_FILES['form']['name']['UPGRADE_FILENAME'] ) ? $_FILES['form']['name']['UPGRADE_FILENAME'] : ''; $tempFilename = isset( $_FILES['form']['tmp_name']['UPGRADE_FILENAME'] ) ? $_FILES['form']['tmp_name']['UPGRADE_FILENAME'] : ''; @@ -626,7 +626,7 @@ class System } } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); //clean up xmlform folders @@ -744,7 +744,7 @@ class System */ public static function getPluginSchema ($pluginName) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $pathFile = $filter->xssFilterHard(PATH_PLUGINS . $pluginName . "/config/schema.xml", 'path'); if (file_exists( $pathFile )) { diff --git a/workflow/engine/classes/class.triggerLibrary.php b/workflow/engine/classes/class.triggerLibrary.php index ded37960c..32a89d9eb 100644 --- a/workflow/engine/classes/class.triggerLibrary.php +++ b/workflow/engine/classes/class.triggerLibrary.php @@ -5,8 +5,8 @@ * * This class Helps registering and implementing Wizard for Triggers */ -G::LoadThirdParty( 'html2ps_pdf/classes', 'include' ); -G::LoadThirdParty( 'html2ps_pdf/classes/org/active-link/doc', 'PHPClass' ); + + /** * diff --git a/workflow/engine/classes/class.webdav.php b/workflow/engine/classes/class.webdav.php index c10093637..c301b0c0f 100644 --- a/workflow/engine/classes/class.webdav.php +++ b/workflow/engine/classes/class.webdav.php @@ -397,7 +397,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server */ public function GET(&$options) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $options = $filter->xssFilterHard($options); $paths = $filter->xssFilterHard($this->paths); @@ -944,7 +944,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server */ public function checkLock($path) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $path = $filter->validateInput($path, 'nosql'); $result = false; diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index a3a3c84b1..06d0b28ff 100644 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -484,7 +484,7 @@ class workspaceTools { $this->initPropel(true); $this->checkDataConsistenceInContentTable(); - G::LoadThirdParty('pear/json', 'class.json'); + $language = new Language(); @@ -533,7 +533,7 @@ class workspaceTools return $this->db; } - G::LoadSystem('database_' . strtolower($this->dbAdapter)); + if ($rbac == true) { $this->db = new database($this->dbAdapter, $this->dbRbacHost, $this->dbRbacUser, $this->dbRbacPass, $this->dbRbacName); } else { @@ -1292,7 +1292,7 @@ class workspaceTools */ static public function createBackup($filename, $compress = true) { - G::LoadThirdParty('pear/Archive', 'Tar'); + if (!file_exists(dirname($filename))) { mkdir(dirname($filename)); } @@ -1547,7 +1547,7 @@ class workspaceTools static public function getBackupInfo($filename) { - G::LoadThirdParty('pear/Archive', 'Tar'); + $backup = new Archive_Tar($filename); //Get a temporary directory in the upgrade directory $tempDirectory = PATH_DATA . "upgrade/" . basename(tempnam(__FILE__, '')); @@ -1613,7 +1613,7 @@ class workspaceTools */ static public function restore($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true, $lang = 'en', $port = '') { - G::LoadThirdParty('pear/Archive', 'Tar'); + $backup = new Archive_Tar($filename); //Get a temporary directory in the upgrade directory $tempDirectory = PATH_DATA . "upgrade/" . basename(tempnam(__FILE__, '')); @@ -1886,7 +1886,7 @@ class workspaceTools } if ($swv == 1) { - G::LoadThirdParty("pear/Archive", "Tar"); + //Extract $tar = new Archive_Tar($f); @@ -2856,7 +2856,7 @@ class workspaceTools public function checkRbacPermissions(){ CLI::logging("-> Verifying roles permissions in RBAC \n"); //Update table RBAC permissions - Bootstrap::LoadSystem('rbac'); + $RBAC = &RBAC::getSingleton(); $RBAC->initRBAC(); $result = $RBAC->verifyPermissions(); diff --git a/workflow/engine/classes/model/AdditionalTables.php b/workflow/engine/classes/model/AdditionalTables.php index 3593829fe..0a91527c7 100644 --- a/workflow/engine/classes/model/AdditionalTables.php +++ b/workflow/engine/classes/model/AdditionalTables.php @@ -487,7 +487,7 @@ class AdditionalTables extends BaseAdditionalTables $oCriteriaCount = clone $oCriteria; eval('$count = ' . $sClassPeerName . '::doCount($oCriteria);'); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $sClassPeerName = $filter->validateInput($sClassPeerName); diff --git a/workflow/engine/classes/model/AddonsManager.php b/workflow/engine/classes/model/AddonsManager.php index 856def5c4..430b97d1d 100644 --- a/workflow/engine/classes/model/AddonsManager.php +++ b/workflow/engine/classes/model/AddonsManager.php @@ -132,7 +132,7 @@ class AddonsManager extends BaseAddonsManager $oPluginRegistry = &PMPluginRegistry::getSingleton(); - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $requiredPath = PATH_PLUGINS . $this->getAddonName() . ".php"; $requiredPath = $filter->validateInput($requiredPath, 'path'); diff --git a/workflow/engine/classes/model/Dashboard.php b/workflow/engine/classes/model/Dashboard.php index f288afae5..066f56ddf 100644 --- a/workflow/engine/classes/model/Dashboard.php +++ b/workflow/engine/classes/model/Dashboard.php @@ -48,7 +48,7 @@ class Dashboard extends BaseDashboard $this->setUser($data['USR_UID']); } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); if (isset($data['DAS_TITLE'])) { $data['DAS_TITLE'] = $filter ->validateInput($data['DAS_TITLE'], "string"); diff --git a/workflow/engine/classes/model/Dynaform.php b/workflow/engine/classes/model/Dynaform.php index 498f93f91..67498cc8b 100644 --- a/workflow/engine/classes/model/Dynaform.php +++ b/workflow/engine/classes/model/Dynaform.php @@ -279,7 +279,7 @@ class Dynaform extends BaseDynaform // For a description of a table $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $sql = $oDataBase->getTableDescription( $addTabName ); } else { diff --git a/workflow/engine/classes/model/FieldCondition.php b/workflow/engine/classes/model/FieldCondition.php index c6b79e338..4cbb86a98 100644 --- a/workflow/engine/classes/model/FieldCondition.php +++ b/workflow/engine/classes/model/FieldCondition.php @@ -132,7 +132,7 @@ class FieldCondition extends BaseFieldCondition public function getConditionScript ($DYN_UID) { require_once 'classes/model/Dynaform.php'; - G::LoadSystem( 'dynaformhandler' ); + $oDynaform = DynaformPeer::retrieveByPk( $DYN_UID ); $PRO_UID = $oDynaform->getProUid(); diff --git a/workflow/engine/classes/model/Language.php b/workflow/engine/classes/model/Language.php index 1de80ac57..c5149a144 100644 --- a/workflow/engine/classes/model/Language.php +++ b/workflow/engine/classes/model/Language.php @@ -144,7 +144,7 @@ class Language extends BaseLanguage error_log($e->getMessage()); } - G::LoadSystem( 'i18n_po' ); + $POFile = new i18n_PO( $sLanguageFile ); $POFile->readInit(); $POHeaders = $POFile->getHeaders(); @@ -246,7 +246,7 @@ class Language extends BaseLanguage continue; } - G::LoadSystem( 'dynaformhandler' ); + $dynaform = new dynaFormHandler( PATH_XMLFORM . $xmlForm ); $fieldName = $match[2]; @@ -454,7 +454,7 @@ class Language extends BaseLanguage $aOptions = array (); $nodesNames = Array (); - G::loadSystem( 'dynaformhandler' ); + foreach ($aXMLForms as $xmlFormPath) { $xmlFormFile = str_replace( chr( 92 ), '/', $xmlFormPath ); @@ -573,7 +573,7 @@ class Language extends BaseLanguage } $languageFile = PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.' . $idLanguage . '.po' ; try { - G::LoadSystem( 'i18n_po' ); + $POFile = new i18n_PO( $languageFile ); $POFile->readInit(); $POHeaders = $POFile->getHeaders(); @@ -634,7 +634,7 @@ class Language extends BaseLanguage continue; } - G::LoadSystem( 'dynaformhandler' ); + $dynaform = new dynaFormHandler( PATH_PLUGINS . $plugin . PATH_SEP . $xmlForm ); $fieldName = $match[2]; @@ -748,7 +748,7 @@ class Language extends BaseLanguage $aOptions = array (); $nodesNames = Array (); - G::loadSystem( 'dynaformhandler' ); + foreach ($aXMLForms as $xmlFormPath) { $xmlFormFile = str_replace( chr( 92 ), '/', $xmlFormPath ); diff --git a/workflow/engine/classes/model/ReportTable.php b/workflow/engine/classes/model/ReportTable.php index 9645180f5..44ee91624 100644 --- a/workflow/engine/classes/model/ReportTable.php +++ b/workflow/engine/classes/model/ReportTable.php @@ -153,7 +153,7 @@ class ReportTable extends BaseReportTable $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $oValidate = $oDataBase->getValidate( $this->validate() ); } else { diff --git a/workflow/engine/classes/model/Step.php b/workflow/engine/classes/model/Step.php index 6a4834266..3edaba75f 100644 --- a/workflow/engine/classes/model/Step.php +++ b/workflow/engine/classes/model/Step.php @@ -354,7 +354,7 @@ class Step extends BaseStep public function loadInfoAssigDynaform ($sproUid, $sObjUID) { require_once ("classes/model/DynaformPeer.php"); - G::LoadSystem( 'dynaformhandler' ); + $oC = new Criteria( 'workflow' ); $oC->add( DynaformPeer::DYN_UID, $sObjUID ); @@ -452,7 +452,7 @@ class Step extends BaseStep public function loadInfoAssigConnecctionDB ($sproUid, $sdbsUid) { require_once ("classes/model/DynaformPeer.php"); - G::LoadSystem( 'dynaformhandler' ); + $swDynaform = true; $swTriggers = true; //we are looking for triggers if there is at least one db connection @@ -528,7 +528,7 @@ class Step extends BaseStep { require_once ("classes/model/DynaformPeer.php"); - G::LoadSystem( 'dynaformhandler' ); + $uidsGrids = array (); $oC = new Criteria( 'workflow' ); $oC->add( DynaformPeer::DYN_UID, $sObjUID ); diff --git a/workflow/engine/classes/model/Translation.php b/workflow/engine/classes/model/Translation.php index df4dddf23..c1e643baf 100644 --- a/workflow/engine/classes/model/Translation.php +++ b/workflow/engine/classes/model/Translation.php @@ -314,7 +314,7 @@ class Translation extends BaseTranslation $translation[$key] = $row; } - G::LoadSystem( 'i18n_po' ); + $POFile = new i18n_PO( $languageFile ); $POFile->readInit(); while ($rowTranslation = $POFile->getTranslation()) { @@ -501,7 +501,7 @@ class Translation extends BaseTranslation return $this->sortByColumn($environments, 'LANGUAGE'); /* - G::LoadSystem('dbMaintenance'); + $o = new DataBaseMaintenance('localhost', 'root', 'atopml2005'); $o->connect('wf_os'); $r = $o->query('select * from ISO_COUNTRY'); diff --git a/workflow/engine/classes/triggers/api/class.zimbraApi.php b/workflow/engine/classes/triggers/api/class.zimbraApi.php index c4470cc5b..c1540bb90 100644 --- a/workflow/engine/classes/triggers/api/class.zimbraApi.php +++ b/workflow/engine/classes/triggers/api/class.zimbraApi.php @@ -807,7 +807,7 @@ class Zimbra protected function message($message) { if ($this->debug) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $message = $filter->xssFilterHard($message); echo $message; @@ -830,7 +830,7 @@ class Zimbra */ protected function soapRequest($body, $header = false, $connecting = false) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); if (!$connecting && !$this->_connected) { diff --git a/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php b/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php index 28c328452..bff416aeb 100644 --- a/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php +++ b/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php @@ -39,7 +39,7 @@ * @return object | $result | Response | * */ -G::LoadSystem('restClient'); + // Validation left function cancelCheckout($alfrescoServerUrl, $docUid, $user = "", $pwd = "") diff --git a/workflow/engine/classes/triggers/class.pmTrSharepoint.php b/workflow/engine/classes/triggers/class.pmTrSharepoint.php index 4e570e13b..aa8aaab7f 100644 --- a/workflow/engine/classes/triggers/class.pmTrSharepoint.php +++ b/workflow/engine/classes/triggers/class.pmTrSharepoint.php @@ -3,7 +3,7 @@ /** * class.pmTrSharepoint.php */ -G::LoadSystem("soapNtlm"); + class wscaller { diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php index 2e47512ee..172311dfb 100644 --- a/workflow/engine/controllers/adminProxy.php +++ b/workflow/engine/controllers/adminProxy.php @@ -994,7 +994,7 @@ class adminProxy extends HttpProxyController public function uploadImage() { //!dataSystem - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_SERVER["REQUEST_URI"] = $filter->xssFilterHard($_SERVER["REQUEST_URI"]); $_FILES = $filter->xssFilterHard($_FILES); @@ -1229,7 +1229,7 @@ class adminProxy extends HttpProxyController { $info = @getimagesize($imagen); - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $imagen = $filter->validateInput($imagen, "path"); @@ -1293,7 +1293,7 @@ class adminProxy extends HttpProxyController $newDir .= PATH_SEP.$base64Id; $dir .= PATH_SEP.$base64Id; - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $dir = $filter->validateInput($dir, "path"); diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index 759f807da..0e5c84623 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -324,7 +324,7 @@ class Installer extends Controller } } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $pathShared = $filter->validateInput($_REQUEST['pathShared'], 'path'); @@ -401,7 +401,7 @@ class Installer extends Controller } } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $logFile = $filter->validateInput($logFile, 'path'); @@ -449,7 +449,7 @@ class Installer extends Controller */ public function mysqlQuery ($sql) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $sql = $filter->preventSqlInjection($sql, Array()); $this->installLog( $sql ); @@ -469,7 +469,7 @@ class Installer extends Controller */ public function mssqlQuery ($sql) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $sql = $filter->preventSqlInjection($sql, Array()); $this->installLog( $sql ); @@ -609,7 +609,7 @@ class Installer extends Controller */ public function setGrantPrivilegesMySQL ($psUser, $psPassword, $psDatabase, $host) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $host = ($host == 'localhost' || $host == '127.0.0.1' ? 'localhost' : '%'); @@ -674,7 +674,7 @@ class Installer extends Controller public function createMySQLWorkspace () { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); ini_set( 'max_execution_time', '0' ); $info = new StdClass(); @@ -1013,7 +1013,7 @@ class Installer extends Controller public function createMSSQLWorkspace () { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); ini_set( 'max_execution_time', '0' ); @@ -1236,7 +1236,7 @@ class Installer extends Controller public function checkDatabases () { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $this->setResponseType( 'json' ); $info = new stdclass(); @@ -1291,7 +1291,7 @@ class Installer extends Controller private function testMySQLconnection() { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $info = new StdClass(); $info->result = false; @@ -1339,7 +1339,7 @@ class Installer extends Controller private function testMSSQLconnection() { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $info = new stdClass(); $info->result = false; @@ -1436,7 +1436,7 @@ class Installer extends Controller foreach ($fileTar as $value) { $dataFile = pathinfo($value); $nameSkinTmp = $dataFile['filename']; - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $value ); $pathSkinTmp = $pathSkinPartner . 'tmp' . PATH_SEP; @@ -1523,7 +1523,7 @@ class Installer extends Controller public function buildParternExtras($username, $password, $workspace, $lang, $skinName) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); ini_set('max_execution_time', '0'); ini_set('memory_limit', '256M'); diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 4d3b85fb9..4d367bf03 100644 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -559,7 +559,7 @@ class pmTablesProxy extends HttpProxyController */ public function importCSVDeprecated ($httpData) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $tmpfilename = $_FILES['form']['tmp_name']['CSV_FILE']; //$tmpfilename = $filter->xssFilterHard($tmpfilename, 'path'); @@ -1264,7 +1264,7 @@ class pmTablesProxy extends HttpProxyController ); $labelFieldsTypeList = array ('dropdown','radiogroup'); - G::loadSystem( 'dynaformhandler' ); + $index = 0; while ($aRow = $oDataset->getRow()) { diff --git a/workflow/engine/methods/appFolder/appFolderAjax.php b/workflow/engine/methods/appFolder/appFolderAjax.php index f49490e16..4edbdb52d 100644 --- a/workflow/engine/methods/appFolder/appFolderAjax.php +++ b/workflow/engine/methods/appFolder/appFolderAjax.php @@ -1,5 +1,5 @@ xssFilterHard($_POST); $_GET = $filter->xssFilterHard($_GET); diff --git a/workflow/engine/methods/authSources/authSourcesSynchronizeAjax.php b/workflow/engine/methods/authSources/authSourcesSynchronizeAjax.php index dcf3d55e6..76cbeb5f4 100644 --- a/workflow/engine/methods/authSources/authSourcesSynchronizeAjax.php +++ b/workflow/engine/methods/authSources/authSourcesSynchronizeAjax.php @@ -35,7 +35,7 @@ class treeNode extends stdclass try { require_once ("classes" . PATH_SEP . "model" . PATH_SEP . "Department.php"); - G::LoadThirdParty("pear" . PATH_SEP . "json", "class.json"); + $json = new Services_JSON(); header("Content-Type: application/json;"); diff --git a/workflow/engine/methods/authSources/authSources_Ajax.php b/workflow/engine/methods/authSources/authSources_Ajax.php index d84ced256..8f9211d90 100644 --- a/workflow/engine/methods/authSources/authSources_Ajax.php +++ b/workflow/engine/methods/authSources/authSources_Ajax.php @@ -46,7 +46,7 @@ try { } $aFields = $RBAC->getAuthSource( $_POST['sUID'] ); - //G::LoadThirdParty( 'pear/json', 'class.json' ); + //$oJSON = new Services_JSON(); $i = 0; $oUser = new Users(); diff --git a/workflow/engine/methods/authSources/authSources_ImportUsers.php b/workflow/engine/methods/authSources/authSources_ImportUsers.php index 125dd9a6e..26362b5c3 100644 --- a/workflow/engine/methods/authSources/authSources_ImportUsers.php +++ b/workflow/engine/methods/authSources/authSources_ImportUsers.php @@ -33,7 +33,7 @@ if (isset($aFields['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE'])) { $aAttributes = $aFields['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE']; } -//G::LoadThirdParty( 'pear/json', 'class.json' ); + //$oJSON = new Services_JSON(); foreach ($_POST['aUsers'] as $sUser) { diff --git a/workflow/engine/methods/cases/ajaxListener.php b/workflow/engine/methods/cases/ajaxListener.php index e32581e73..0f8614924 100644 --- a/workflow/engine/methods/cases/ajaxListener.php +++ b/workflow/engine/methods/cases/ajaxListener.php @@ -43,7 +43,7 @@ if (!isset($_SESSION['USER_LOGGED'])) { die(); } -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_REQUEST = $filter->xssFilterHard($_REQUEST); $_POST = $filter->xssFilterHard($_POST); diff --git a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php index d5cc39ccd..971642cb3 100644 --- a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php +++ b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php @@ -21,7 +21,7 @@ * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); $_REQUEST = $filter->xssFilterHard($_REQUEST); diff --git a/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php b/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php index e2d085a20..e6e0b9232 100644 --- a/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php +++ b/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php @@ -21,8 +21,8 @@ * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ + -G::LoadSystem('inputfilter'); $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET); $_POST = $filter->xssFilterHard($_POST); diff --git a/workflow/engine/methods/cases/casesStartPage_Ajax.php b/workflow/engine/methods/cases/casesStartPage_Ajax.php index 8c403350e..3318eb737 100644 --- a/workflow/engine/methods/cases/casesStartPage_Ajax.php +++ b/workflow/engine/methods/cases/casesStartPage_Ajax.php @@ -1,5 +1,5 @@ xssFilterHard($_POST); $_REQUEST = $filter->xssFilterHard($_REQUEST); diff --git a/workflow/engine/methods/cases/casesStreamingFile.php b/workflow/engine/methods/cases/casesStreamingFile.php index 2ee2b54ae..ad00821e6 100644 --- a/workflow/engine/methods/cases/casesStreamingFile.php +++ b/workflow/engine/methods/cases/casesStreamingFile.php @@ -68,7 +68,7 @@ exit; function rangeDownload($location,$mimeType) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $location = $filter->xssFilterHard($location, "path"); if (!file_exists($location)) diff --git a/workflow/engine/methods/cases/cases_Ajax.php b/workflow/engine/methods/cases/cases_Ajax.php index 1cae644ba..8c464dc52 100644 --- a/workflow/engine/methods/cases/cases_Ajax.php +++ b/workflow/engine/methods/cases/cases_Ajax.php @@ -1,5 +1,5 @@ xssFilterHard($_GET); $_POST = $filter->xssFilterHard($_POST); @@ -280,7 +280,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) { */ $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $sConcat = $oDataBase->concatString( "U.USR_LASTNAME", "' '", "U.USR_FIRSTNAME" ); } diff --git a/workflow/engine/methods/cases/cases_Reassign.php b/workflow/engine/methods/cases/cases_Reassign.php index e3b00df06..30ae7f877 100644 --- a/workflow/engine/methods/cases/cases_Reassign.php +++ b/workflow/engine/methods/cases/cases_Reassign.php @@ -36,7 +36,7 @@ try { break; } - G::LoadSystem( 'templatePower' ); + $tpl = new TemplatePower( PATH_TPL . "cases/cases_Reassign.html" ); $tpl->prepare(); diff --git a/workflow/engine/methods/cases/cases_Step.php b/workflow/engine/methods/cases/cases_Step.php index a17a17d8f..03e9226cb 100644 --- a/workflow/engine/methods/cases/cases_Step.php +++ b/workflow/engine/methods/cases/cases_Step.php @@ -576,7 +576,7 @@ try { $util->setInputPath( $javaInput ); $util->setOutputPath( $javaOutput ); - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); //$content = file_get_contents ( PATH_DYNAFORM . $aOD['PRO_UID'] . PATH_SEP . $aOD['OUT_DOC_UID'] . '.jrxml' ); @@ -610,7 +610,7 @@ try { $util->setInputPath( $javaInput ); $util->setOutputPath( $javaOutput ); - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $locationFrom = PATH_DYNAFORM . $aOD['PRO_UID'] . PATH_SEP . $aOD['OUT_DOC_UID'] . '.pdf'; diff --git a/workflow/engine/methods/cases/cases_StepToRevise.php b/workflow/engine/methods/cases/cases_StepToRevise.php index a58bdff7a..7e413838d 100644 --- a/workflow/engine/methods/cases/cases_StepToRevise.php +++ b/workflow/engine/methods/cases/cases_StepToRevise.php @@ -23,7 +23,7 @@ */ // die("first"); /* Permissions */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET,"url"); switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) { diff --git a/workflow/engine/methods/cases/cases_StepToReviseInputs.php b/workflow/engine/methods/cases/cases_StepToReviseInputs.php index ea5107c55..27f4045c5 100644 --- a/workflow/engine/methods/cases/cases_StepToReviseInputs.php +++ b/workflow/engine/methods/cases/cases_StepToReviseInputs.php @@ -23,7 +23,7 @@ */ //die("second"); /* Permissions */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET,"url"); switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) { diff --git a/workflow/engine/methods/cases/cases_StepToReviseOutputs.php b/workflow/engine/methods/cases/cases_StepToReviseOutputs.php index e970bf1c8..63ccf001a 100644 --- a/workflow/engine/methods/cases/cases_StepToReviseOutputs.php +++ b/workflow/engine/methods/cases/cases_StepToReviseOutputs.php @@ -23,7 +23,7 @@ */ /* Permissions */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET,"url"); switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) { diff --git a/workflow/engine/methods/cases/cases_ToReviseOutputDocView.php b/workflow/engine/methods/cases/cases_ToReviseOutputDocView.php index e596aa2ef..5c93e7164 100644 --- a/workflow/engine/methods/cases/cases_ToReviseOutputDocView.php +++ b/workflow/engine/methods/cases/cases_ToReviseOutputDocView.php @@ -23,7 +23,7 @@ */ /* Permissions */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET,"url"); switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) { diff --git a/workflow/engine/methods/cases/cases_generatePMTable.php b/workflow/engine/methods/cases/cases_generatePMTable.php index 9ced6f1ba..398feb7e0 100644 --- a/workflow/engine/methods/cases/cases_generatePMTable.php +++ b/workflow/engine/methods/cases/cases_generatePMTable.php @@ -4,7 +4,7 @@ * and open the template in the editor. */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); require_once ("classes/model/AdditionalTables.php"); diff --git a/workflow/engine/methods/cases/debug_triggers.php b/workflow/engine/methods/cases/debug_triggers.php index bf0b03b05..3866748d7 100644 --- a/workflow/engine/methods/cases/debug_triggers.php +++ b/workflow/engine/methods/cases/debug_triggers.php @@ -21,7 +21,7 @@ foreach ($aTriggers as $aTrigger) { //$t_code = addslashes($t_code); //$t_code = Only1br($t_code); //highlighting the trigger code using the geshi third party library - G::LoadThirdParty( 'geshi', 'geshi' ); + $geshi = new GeSHi( $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php' ); $geshi->enable_line_numbers( GESHI_FANCY_LINE_NUMBERS, 2 ); $geshi->set_line_style( 'background: #f0f0f0;' ); diff --git a/workflow/engine/methods/cases/proxyCasesList.php b/workflow/engine/methods/cases/proxyCasesList.php index 7f728ff43..c4d4df4b3 100644 --- a/workflow/engine/methods/cases/proxyCasesList.php +++ b/workflow/engine/methods/cases/proxyCasesList.php @@ -8,7 +8,7 @@ if (!isset($_SESSION['USER_LOGGED'])) { die(); } -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET); $_REQUEST = $filter->xssFilterHard($_REQUEST); diff --git a/workflow/engine/methods/cases/proxyPMTablesFieldList.php b/workflow/engine/methods/cases/proxyPMTablesFieldList.php index fd407bf64..75f6a25fc 100644 --- a/workflow/engine/methods/cases/proxyPMTablesFieldList.php +++ b/workflow/engine/methods/cases/proxyPMTablesFieldList.php @@ -502,7 +502,7 @@ function fieldReset($translation) function fieldComplete($translation) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); global $action; @@ -567,7 +567,7 @@ function fieldComplete($translation) function fieldLabelReset($translation) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); global $action; @@ -606,7 +606,7 @@ function fieldLabelReset($translation) function fieldSave() { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); global $conf; global $action; diff --git a/workflow/engine/methods/cases/proxyPMTablesList.php b/workflow/engine/methods/cases/proxyPMTablesList.php index 6b8a72914..b5add56fd 100644 --- a/workflow/engine/methods/cases/proxyPMTablesList.php +++ b/workflow/engine/methods/cases/proxyPMTablesList.php @@ -1,6 +1,6 @@ xssFilterHard($_SESSION['USER_LOGGED']); diff --git a/workflow/engine/methods/cases/proxyProcessList.php b/workflow/engine/methods/cases/proxyProcessList.php index b72f0c92f..1d3ab2a85 100644 --- a/workflow/engine/methods/cases/proxyProcessList.php +++ b/workflow/engine/methods/cases/proxyProcessList.php @@ -1,6 +1,6 @@ xssFilterHard($_POST); $_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']); diff --git a/workflow/engine/methods/controls/varsAjax.php b/workflow/engine/methods/controls/varsAjax.php index a47fef7b8..e83f1d71f 100644 --- a/workflow/engine/methods/controls/varsAjax.php +++ b/workflow/engine/methods/controls/varsAjax.php @@ -23,7 +23,7 @@ * */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); $_REQUEST = $filter->xssFilterHard($_REQUEST); diff --git a/workflow/engine/methods/dbConnections/dbConnectionsAjax.php b/workflow/engine/methods/dbConnections/dbConnectionsAjax.php index 564f3313c..cedca6c23 100644 --- a/workflow/engine/methods/dbConnections/dbConnectionsAjax.php +++ b/workflow/engine/methods/dbConnections/dbConnectionsAjax.php @@ -30,7 +30,7 @@ * @Param var action from POST request */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); @@ -338,7 +338,7 @@ switch ($action) { } break; case 'showEncodes': - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $engine = $_POST['engine']; diff --git a/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php b/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php index 0c38a0f16..f1578448e 100644 --- a/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php +++ b/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php @@ -47,8 +47,8 @@ try { //echo ''; break; case 'getDynaFieds': - G::LoadThirdParty( 'pear/json', 'class.json' ); - G::LoadSystem( 'dynaformhandler' ); + + $_DYN_FILENAME = $_SESSION['Current_Dynafom']['Parameters']['FILE']; $sFilter = isset( $_POST['filter'] ) ? $_POST['filter'] : ''; @@ -63,7 +63,7 @@ try { print (Bootstrap::json_encode( $aAvailableFields )) ; break; case 'showDynavars': - G::LoadSystem( 'dynaformhandler' ); + $_DYN_FILENAME = $_SESSION['Current_Dynafom']['Parameters']['FILE']; $sFilter = isset( $_POST['filter'] ) ? $_POST['filter'] : ''; diff --git a/workflow/engine/methods/dynaforms/dynaforms_Editor.php b/workflow/engine/methods/dynaforms/dynaforms_Editor.php index c956ac7dd..3ece42946 100644 --- a/workflow/engine/methods/dynaforms/dynaforms_Editor.php +++ b/workflow/engine/methods/dynaforms/dynaforms_Editor.php @@ -22,7 +22,7 @@ * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); $_GET = $filter->xssFilterHard($_GET); diff --git a/workflow/engine/methods/dynaforms/dynaforms_PagedTableAjax.php b/workflow/engine/methods/dynaforms/dynaforms_PagedTableAjax.php index 7d426289a..eca1a15ad 100644 --- a/workflow/engine/methods/dynaforms/dynaforms_PagedTableAjax.php +++ b/workflow/engine/methods/dynaforms/dynaforms_PagedTableAjax.php @@ -39,7 +39,7 @@ function pagedTable_BeforeQuery (&$ntable) } require_once (PATH_GULLIVER_HOME . 'methods/pagedTableAjax.php'); die(); -G::LoadSystem( 'pagedTable' ); + G::LoadInclude( 'ajax' ); $id = get_ajax_value( 'ptID' ); diff --git a/workflow/engine/methods/dynaforms/dynaforms_Save_as.php b/workflow/engine/methods/dynaforms/dynaforms_Save_as.php index 89625d5b2..fc4c9f880 100644 --- a/workflow/engine/methods/dynaforms/dynaforms_Save_as.php +++ b/workflow/engine/methods/dynaforms/dynaforms_Save_as.php @@ -36,7 +36,7 @@ if (! class_exists( "FieldCondition" )) { try { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $frm = $_POST['form']; $PRO_UID = $frm['PRO_UID']; diff --git a/workflow/engine/methods/dynaforms/dynaforms_checkDependentFields.php b/workflow/engine/methods/dynaforms/dynaforms_checkDependentFields.php index b26680768..c98467b09 100644 --- a/workflow/engine/methods/dynaforms/dynaforms_checkDependentFields.php +++ b/workflow/engine/methods/dynaforms/dynaforms_checkDependentFields.php @@ -28,7 +28,7 @@ * also the functionality of dependent fields in grids doesn't depends in this * file so this is somewhat expendable. */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); diff --git a/workflow/engine/methods/dynaforms/fieldsHandlerAjax.php b/workflow/engine/methods/dynaforms/fieldsHandlerAjax.php index a5b1ddfc9..afb15fdd5 100644 --- a/workflow/engine/methods/dynaforms/fieldsHandlerAjax.php +++ b/workflow/engine/methods/dynaforms/fieldsHandlerAjax.php @@ -25,7 +25,7 @@ * @Date Aug 26th, 2009 */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); $request = $_POST['request']; @@ -36,7 +36,7 @@ switch ($request) { $items = $_POST['items']; $tmpfilename = $_SESSION['Current_Dynafom']['Parameters']['FILE']; $tmpfilename = $filter->xssFilterHard($tmpfilename); - G::LoadSystem( 'dynaformhandler' ); + $o = new dynaFormHandler( PATH_DYNAFORM . "{$tmpfilename}.xml" ); @@ -58,7 +58,7 @@ switch ($request) { case 'saveHidden': $tmpfilename = $_SESSION['Current_Dynafom']['Parameters']['FILE']; $tmpfilename = $filter->xssFilterHard($tmpfilename); - G::LoadSystem( 'dynaformhandler' ); + $o = new dynaFormHandler( PATH_DYNAFORM . "{$tmpfilename}.xml" ); $hidden_items = Array (); diff --git a/workflow/engine/methods/dynaforms/fields_Ajax.php b/workflow/engine/methods/dynaforms/fields_Ajax.php index a24901de2..cb2cb73ae 100644 --- a/workflow/engine/methods/dynaforms/fields_Ajax.php +++ b/workflow/engine/methods/dynaforms/fields_Ajax.php @@ -46,7 +46,7 @@ if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) { if (isset( $_SESSION['CURRENT_PAGE_INITILIZATION'] )) { eval( $_SESSION['CURRENT_PAGE_INITILIZATION'] ); } - //G::LoadSystem('json'); + //require_once (PATH_THIRDPARTY . 'pear/json/class.json.php'); //$json = new Services_JSON(); $G_FORM = new form( G::getUIDName( urlDecode( $_POST['form'] ) ) ); diff --git a/workflow/engine/methods/dynaforms/fields_Edit.php b/workflow/engine/methods/dynaforms/fields_Edit.php index ab6d15a9b..1c75e744e 100644 --- a/workflow/engine/methods/dynaforms/fields_Edit.php +++ b/workflow/engine/methods/dynaforms/fields_Edit.php @@ -163,7 +163,7 @@ if (! (isset( $fields->Fields['XMLNODE_NAME'] ) && ($fields->Fields['XMLNODE_NAM $tableExists = true; $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $dataBase = $Fields['PME_SQLCONNECTION']; if ($Fields['PME_SQLCONNECTION'] == 'workflow') { diff --git a/workflow/engine/methods/dynaforms/test.php b/workflow/engine/methods/dynaforms/test.php index 9999dc690..3838909ce 100644 --- a/workflow/engine/methods/dynaforms/test.php +++ b/workflow/engine/methods/dynaforms/test.php @@ -51,7 +51,7 @@ for ($r = 1; $r < 10; $r ++) { database); - $stmt = $cnn->createStatement(); - - $sw = true; - - foreach ($this->table as $key => $table) { - $rs = $stmt->executeQuery($database->generateShowTablesLikeSQL($table), ResultSet::FETCHMODE_ASSOC); - - if ($rs->getRecordCount() == 0) { - $sw = false; - } - } - - return ($sw); - } - */ - public function sqlExecute($sqlFile) { $file = fopen($sqlFile, "r"); diff --git a/workflow/engine/methods/enterprise/pluginsImportFile.php b/workflow/engine/methods/enterprise/pluginsImportFile.php index a5f2d78ce..1bceef92f 100644 --- a/workflow/engine/methods/enterprise/pluginsImportFile.php +++ b/workflow/engine/methods/enterprise/pluginsImportFile.php @@ -52,7 +52,7 @@ try { throw (new Exception($str)); } - G::LoadThirdParty("pear/Archive","Tar"); + $tar = new Archive_Tar($path. $filename); $sFileName = substr($filename, 0, strrpos($filename, ".")); $sClassName = substr($filename, 0, strpos($filename, "-")); diff --git a/workflow/engine/methods/enterprise/processMakerAjax.php b/workflow/engine/methods/enterprise/processMakerAjax.php index 86d605485..0a5f75a86 100644 --- a/workflow/engine/methods/enterprise/processMakerAjax.php +++ b/workflow/engine/methods/enterprise/processMakerAjax.php @@ -19,7 +19,7 @@ if (!defined("BUFSIZE")) { function install($file) { - G::LoadThirdParty("pear/Archive", "Tar"); + $result = array(); $status = 1; diff --git a/workflow/engine/methods/events/eventsAjax.php b/workflow/engine/methods/events/eventsAjax.php index 45e4103c6..9dbbb8e73 100644 --- a/workflow/engine/methods/events/eventsAjax.php +++ b/workflow/engine/methods/events/eventsAjax.php @@ -11,7 +11,7 @@ switch($req){ */ $sDataBase = 'database_' . strtolower(DB_ADAPTER); if (G::LoadSystemExist($sDataBase)) { - G::LoadSystem($sDataBase); + $oDataBase = new database(); $sConcat = $oDataBase->concatString("USR_FIRSTNAME", "' '" , "USR_LASTNAME") ; } diff --git a/workflow/engine/methods/install/autoinstallPlugins.php b/workflow/engine/methods/install/autoinstallPlugins.php index 23db079c9..883adbf50 100644 --- a/workflow/engine/methods/install/autoinstallPlugins.php +++ b/workflow/engine/methods/install/autoinstallPlugins.php @@ -34,7 +34,7 @@ $path = PATH_OUTTRUNK . "autoinstall" . PATH_SEP; $message = ""; foreach ($availablePlugins as $filename) { - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $path . $filename ); $sFileName = substr( $filename, 0, strrpos( $filename, '.' ) ); $sClassName = substr( $filename, 0, strpos( $filename, '-' ) ); diff --git a/workflow/engine/methods/install/r.php b/workflow/engine/methods/install/r.php index 7bbf69bdc..8a134ba87 100644 --- a/workflow/engine/methods/install/r.php +++ b/workflow/engine/methods/install/r.php @@ -1,5 +1,5 @@ xssFilterHard($_GET['srv']); diff --git a/workflow/engine/methods/outputdocs/outputdocs_Ajax.php b/workflow/engine/methods/outputdocs/outputdocs_Ajax.php index 7d31f2899..e54aaaa76 100644 --- a/workflow/engine/methods/outputdocs/outputdocs_Ajax.php +++ b/workflow/engine/methods/outputdocs/outputdocs_Ajax.php @@ -1,5 +1,5 @@ xssFilterHard($_REQUEST); diff --git a/workflow/engine/methods/processes/processes_Ajax.php b/workflow/engine/methods/processes/processes_Ajax.php index 161baca47..f17d0946f 100644 --- a/workflow/engine/methods/processes/processes_Ajax.php +++ b/workflow/engine/methods/processes/processes_Ajax.php @@ -39,7 +39,7 @@ try { } */ //$oJSON = new Services_JSON(); - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET); $_POST = $filter->xssFilterHard($_POST); @@ -186,7 +186,7 @@ try { include (PATH_METHODS . 'processes/processes_webEntryValidate.php'); break; case 'webEntry_delete': - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $form = $_REQUEST; $filePath = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . $form['FILENAME']; @@ -639,7 +639,7 @@ try { break; case 'loginPML': - //G::LoadThirdParty( 'pear/json', 'class.json' ); + $oProcesses = new Processes(); try { if ($oProcesses->ws_open($oData->u, $oData->p) == 1) { diff --git a/workflow/engine/methods/processes/processes_Import_Bpmn.php b/workflow/engine/methods/processes/processes_Import_Bpmn.php index 0eb42cef4..8e21eb4bd 100644 --- a/workflow/engine/methods/processes/processes_Import_Bpmn.php +++ b/workflow/engine/methods/processes/processes_Import_Bpmn.php @@ -1,7 +1,7 @@ xssFilterHard($_FILES); $_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']); diff --git a/workflow/engine/methods/processes/processes_Save.php b/workflow/engine/methods/processes/processes_Save.php index 367e75d25..f425fa796 100644 --- a/workflow/engine/methods/processes/processes_Save.php +++ b/workflow/engine/methods/processes/processes_Save.php @@ -27,7 +27,7 @@ * */ -//G::LoadThirdParty( 'pear/json', 'class.json' ); + $function = isset( $_POST['function'] ) ? $_POST['function'] : ''; $infoProcess = new Process(); diff --git a/workflow/engine/methods/processes/processes_TriggersFormatCode.php b/workflow/engine/methods/processes/processes_TriggersFormatCode.php index e006ac827..0f419281c 100644 --- a/workflow/engine/methods/processes/processes_TriggersFormatCode.php +++ b/workflow/engine/methods/processes/processes_TriggersFormatCode.php @@ -1,6 +1,6 @@ enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2); $geshi->set_line_style('background: #f0f0f0;'); diff --git a/workflow/engine/methods/processes/processes_User.php b/workflow/engine/methods/processes/processes_User.php index 7de86738c..5b2eb772c 100644 --- a/workflow/engine/methods/processes/processes_User.php +++ b/workflow/engine/methods/processes/processes_User.php @@ -29,7 +29,7 @@ * @Date 16/05/2008 * @LastModification none */ -//G::LoadThirdParty( 'pear/json', 'class.json' ); + try { //$oJSON = new Services_JSON(); $stdObj = Bootstrap::json_decode( stripslashes( $_POST['data'] ) ); diff --git a/workflow/engine/methods/processes/processes_checkProperties.php b/workflow/engine/methods/processes/processes_checkProperties.php index 654b6861c..d26110901 100644 --- a/workflow/engine/methods/processes/processes_checkProperties.php +++ b/workflow/engine/methods/processes/processes_checkProperties.php @@ -45,12 +45,12 @@ if ($access != 1) { } } -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $form = $_POST['form']; $form = $filter->xssFilterHard($form); -//$tasUid = $form['TASKS']; +//$tasUid = $form['TASKS']; $tasUid = $form['TAS_PARENT']; $spSynchronous = $form['SP_SYNCHRONOUS']; @@ -65,7 +65,7 @@ $oDataset = RoutePeer::doSelectRS( $oCriteria ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $sw = 1; -// if there are more step we're looking them and we're checking TAS_ASSIGN_TYPE field +// if there are more step we're looking them and we're checking TAS_ASSIGN_TYPE field while ($oDataset->next() && $sw) { $aRow = $oDataset->getRow(); @@ -82,10 +82,10 @@ while ($oDataset->next() && $sw) { $sw = 0; } -///If there are at least one TAS_ASSIGN_TYPE field with MANUAL it returns 1 +///If there are at least one TAS_ASSIGN_TYPE field with MANUAL it returns 1 if (! $sw) return print $spSynchronous; else - return print '0'; - - + return print '0'; + + diff --git a/workflow/engine/methods/roles/data_rolesPermissions.php b/workflow/engine/methods/roles/data_rolesPermissions.php index 3d368d765..ff5b86823 100644 --- a/workflow/engine/methods/roles/data_rolesPermissions.php +++ b/workflow/engine/methods/roles/data_rolesPermissions.php @@ -22,7 +22,7 @@ * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET); $_REQUEST = $filter->xssFilterHard($_REQUEST); diff --git a/workflow/engine/methods/services/Rest/CURLMessage.php b/workflow/engine/methods/services/Rest/CURLMessage.php index ac27b47a0..91c972860 100644 --- a/workflow/engine/methods/services/Rest/CURLMessage.php +++ b/workflow/engine/methods/services/Rest/CURLMessage.php @@ -122,7 +122,7 @@ abstract class CURLMessage */ public function displayResponse () { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $error = curl_error( $this->ch ); $error = $filter->xssFilterHard($error); diff --git a/workflow/engine/methods/services/demoSoap.php b/workflow/engine/methods/services/demoSoap.php index 03a86c19b..1182b454b 100644 --- a/workflow/engine/methods/services/demoSoap.php +++ b/workflow/engine/methods/services/demoSoap.php @@ -61,7 +61,7 @@ a.krumo-name { xssFilterHard($_POST); $_SESSION = $filter->xssFilterHard($_SESSION); diff --git a/workflow/engine/methods/services/soap.php b/workflow/engine/methods/services/soap.php index 7135e0df8..e21b64939 100644 --- a/workflow/engine/methods/services/soap.php +++ b/workflow/engine/methods/services/soap.php @@ -120,7 +120,7 @@ function getCaseInfo ($params) function SendVariables ($params) { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); ifSessionExpiredBreakThis( $params->sessionId ); $x = ifPermission( $params->sessionId, 'PM_CASES' ); diff --git a/workflow/engine/methods/setup/appCacheViewAjax.php b/workflow/engine/methods/setup/appCacheViewAjax.php index 37a4247c1..b8b041296 100644 --- a/workflow/engine/methods/setup/appCacheViewAjax.php +++ b/workflow/engine/methods/setup/appCacheViewAjax.php @@ -1,6 +1,6 @@ xssFilterHard($_POST); $_GET = $filter->xssFilterHard($_GET); diff --git a/workflow/engine/methods/setup/emails_Ajax.php b/workflow/engine/methods/setup/emails_Ajax.php index 68e6aaa81..674b204c7 100644 --- a/workflow/engine/methods/setup/emails_Ajax.php +++ b/workflow/engine/methods/setup/emails_Ajax.php @@ -22,7 +22,7 @@ * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); if(isset($_SERVER['SERVER_NAME'])) { diff --git a/workflow/engine/methods/setup/language_Ajax.php b/workflow/engine/methods/setup/language_Ajax.php index 6ca74d209..50372f9bb 100644 --- a/workflow/engine/methods/setup/language_Ajax.php +++ b/workflow/engine/methods/setup/language_Ajax.php @@ -23,7 +23,7 @@ */ try { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); diff --git a/workflow/engine/methods/setup/pluginsImportFile.php b/workflow/engine/methods/setup/pluginsImportFile.php index 19970ba56..f7e573895 100644 --- a/workflow/engine/methods/setup/pluginsImportFile.php +++ b/workflow/engine/methods/setup/pluginsImportFile.php @@ -47,7 +47,7 @@ try { $path = PATH_DOCUMENT . 'input' . PATH_SEP; if (strpos($filename, 'enterprise') !== false) { - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $path . $filename ); $sFileName = substr( $filename, 0, strrpos( $filename, '.' ) ); $sClassName = substr( $filename, 0, strpos( $filename, '-' ) ); @@ -121,7 +121,7 @@ try { $path = PATH_DOCUMENT . 'input' . PATH_SEP; if (strpos($filename, 'plugins-') !== false) { - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $path . $filename ); $sFileName = substr( $filename, 0, strrpos( $filename, '.' ) ); $sClassName = substr( $filename, 0, strpos( $filename, '-' ) ); @@ -196,7 +196,7 @@ try { ) ) )); } - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $path . $filename ); $sFileName = substr( $filename, 0, strrpos( $filename, '.' ) ); $sClassName = substr( $filename, 0, strpos( $filename, '-' ) ); diff --git a/workflow/engine/methods/setup/setup.php b/workflow/engine/methods/setup/setup.php index 953bea268..7867c3bca 100644 --- a/workflow/engine/methods/setup/setup.php +++ b/workflow/engine/methods/setup/setup.php @@ -29,7 +29,7 @@ * @date Apr 5th, 2010 */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_GET['i18'] = $filter->xssFilterHard($_GET['i18']); $_GET['newSite'] = $filter->xssFilterHard($_GET['newSite']); diff --git a/workflow/engine/methods/setup/skin_Ajax.php b/workflow/engine/methods/setup/skin_Ajax.php index 7c1fd9657..b6c7fbbbc 100644 --- a/workflow/engine/methods/setup/skin_Ajax.php +++ b/workflow/engine/methods/setup/skin_Ajax.php @@ -243,7 +243,7 @@ function importSkin () G::verifyPath( $tempPath, true ); $tempName = $tmp; G::uploadFile( $tempName, $tempPath, $filename ); - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $tempPath . $filename ); $aFiles = $tar->listContent(); $swConfigFile = false; @@ -311,7 +311,7 @@ function importSkin () function exportSkin ($skinToExport = "") { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); try { if (! isset( $_REQUEST['SKIN_FOLDER_ID'] )) { @@ -339,7 +339,7 @@ function exportSkin ($skinToExport = "") } //Try to generate tar file - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $skinTar ); $tar->_compress = false; @@ -362,7 +362,7 @@ function exportSkin ($skinToExport = "") function deleteSkin () { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); try { $_REQUEST['SKIN_FOLDER_ID'] = $filter->xssFilterHard($_REQUEST['SKIN_FOLDER_ID']); diff --git a/workflow/engine/methods/setup/skinsExport.php b/workflow/engine/methods/setup/skinsExport.php index 0706f4da0..51bc0cf53 100644 --- a/workflow/engine/methods/setup/skinsExport.php +++ b/workflow/engine/methods/setup/skinsExport.php @@ -83,7 +83,7 @@ function packPlugin ($pluginName, $version) $pathHome = PATH_DATA . 'skins' . PATH_SEP . $pluginName; $fileTar = PATH_DATA . 'skins' . PATH_SEP . $pluginName . '-' . $version . '.tar'; - G::LoadSystem( 'templatePower' ); + /* $pluginDirectory = PATH_PLUGINS . $pluginName; $pluginOutDirectory = PATH_OUTTRUNK . 'plugins' . PATH_SEP . $pluginName; @@ -96,7 +96,7 @@ function packPlugin ($pluginName, $version) die ; } */ - G::LoadThirdParty( 'pear/Archive', 'Tar' ); + $tar = new Archive_Tar( $fileTar ); $tar->_compress = false; diff --git a/workflow/engine/methods/setup/upgrade_SystemAjax.php b/workflow/engine/methods/setup/upgrade_SystemAjax.php index 9cd90cc97..982ed4be2 100644 --- a/workflow/engine/methods/setup/upgrade_SystemAjax.php +++ b/workflow/engine/methods/setup/upgrade_SystemAjax.php @@ -162,7 +162,7 @@ function processSchemaFile () global $DB_NAME; try { - G::LoadSystem( 'database_' . strtolower( $DB_ADAPTER ) ); + $aOldSchema = array (); $oDataBase = new database( $DB_ADAPTER, $DB_HOST, $DB_USER, $DB_PASS, $DB_NAME ); diff --git a/workflow/engine/methods/tools/dvServices.php b/workflow/engine/methods/tools/dvServices.php index b143d5609..c4e5466e0 100644 --- a/workflow/engine/methods/tools/dvServices.php +++ b/workflow/engine/methods/tools/dvServices.php @@ -26,7 +26,7 @@ * * @author David Callizaya */ -G::LoadSystem( "webResource" ); + class dvServices extends WebResource { diff --git a/workflow/engine/methods/tracker/tracker_Ajax.php b/workflow/engine/methods/tracker/tracker_Ajax.php index c5b237410..f0d5c9f83 100644 --- a/workflow/engine/methods/tracker/tracker_Ajax.php +++ b/workflow/engine/methods/tracker/tracker_Ajax.php @@ -22,7 +22,7 @@ * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ try { - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); diff --git a/workflow/engine/methods/users/usersAjax.php b/workflow/engine/methods/users/usersAjax.php index 67d6a8e7b..4172aea74 100644 --- a/workflow/engine/methods/users/usersAjax.php +++ b/workflow/engine/methods/users/usersAjax.php @@ -1,5 +1,5 @@ xssFilterHard($_POST); if(isset($_SESSION['USER_LOGGED'])) { diff --git a/workflow/engine/methods/users/users_ReassignCases.php b/workflow/engine/methods/users/users_ReassignCases.php index 9056e6e7d..2887f4379 100644 --- a/workflow/engine/methods/users/users_ReassignCases.php +++ b/workflow/engine/methods/users/users_ReassignCases.php @@ -48,7 +48,7 @@ try { */ $sDataBase = 'database_' . strtolower( DB_ADAPTER ); if (G::LoadSystemExist( $sDataBase )) { - G::LoadSystem( $sDataBase ); + $oDataBase = new database(); $usr_completename_col = $oDataBase->concatString( "USR_LASTNAME", "' '", "USR_FIRSTNAME", " '('", "USR_USERNAME", "')'" ); } diff --git a/workflow/engine/methods/users/users_ViewPhoto.php b/workflow/engine/methods/users/users_ViewPhoto.php index 2f2ffd03b..e80658e06 100644 --- a/workflow/engine/methods/users/users_ViewPhoto.php +++ b/workflow/engine/methods/users/users_ViewPhoto.php @@ -91,7 +91,7 @@ function DumpHeaders ($filename) } //$filename = PATH_UPLOAD . "$filename"; - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $filename = $filter->xssFilterHard($filename, 'path'); readfile( $filename ); diff --git a/workflow/engine/plugins/charts/genericCharts.php b/workflow/engine/plugins/charts/genericCharts.php index 855690836..837b46f3a 100644 --- a/workflow/engine/plugins/charts/genericCharts.php +++ b/workflow/engine/plugins/charts/genericCharts.php @@ -27,7 +27,7 @@ require_once ( "class.charts.php" ); - G::LoadThirdParty("libchart/classes", "libchart" ); + header("Content-type: image/png"); //type of chart, pie, vertical bar, horizontal, etc. diff --git a/workflow/engine/plugins/pmosCommunity/class.pmosCommunity.php b/workflow/engine/plugins/pmosCommunity/class.pmosCommunity.php index ea669d27d..f769d6bd6 100644 --- a/workflow/engine/plugins/pmosCommunity/class.pmosCommunity.php +++ b/workflow/engine/plugins/pmosCommunity/class.pmosCommunity.php @@ -147,7 +147,7 @@ } function PostByForum( ) { - G::LoadThirdParty("libchart/classes", "libchart" ); + $chart = new VerticalBarChart(430, 220); $dataSet = $this->getPostByForum(); @@ -223,7 +223,7 @@ } function ForumWeek( ) { - G::LoadThirdParty("libchart/classes", "libchart" ); + $chart = new VerticalBarChart(430, 220); $dataSet = $this->getForumWeek(); @@ -290,7 +290,7 @@ } function PostByUser ( ) { - G::LoadThirdParty("libchart/classes", "libchart" ); + $chart = new VerticalBarChart(430, 220); $dataSet = $this->getPostByUser(); @@ -378,7 +378,7 @@ } function BugsByStatus ( ) { - G::LoadThirdParty("libchart/classes", "libchart" ); + $chart = new VerticalBarChart(430, 220); $dataSet = $this->getBugsByStatus(); @@ -433,7 +433,7 @@ } function BugsOpenByUser ( ) { - G::LoadThirdParty("libchart/classes", "libchart" ); + $chart = new VerticalBarChart(430, 220); $dataSet = $this->getBugsOpenByUser(); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php b/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php index 329452f99..d626595a1 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php @@ -356,8 +356,8 @@ class Consolidated $oCriteria->add($oCriteria->getNewCriterion(\ListInboxPeer::APP_NUMBER, $search, Criteria::LIKE)); } } + - G::LoadSystem('inputfilter'); $filter = new \InputFilter(); if ($sort != "") { diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/DynaForm.php b/workflow/engine/src/ProcessMaker/BusinessModel/DynaForm.php index e7d8ebd52..5aaeb6acb 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/DynaForm.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/DynaForm.php @@ -143,7 +143,7 @@ class DynaForm if ($dataDyna['DYN_TYPE'] == 'grid') { $formsDepend = array(); - \G::LoadSystem( 'dynaformhandler' ); + $oCriteria = new \Criteria( 'workflow' ); $oCriteria->addSelectColumn( \DynaformPeer::DYN_UID ); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Group.php b/workflow/engine/src/ProcessMaker/BusinessModel/Group.php index eaff932f8..95684a4b4 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Group.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Group.php @@ -799,7 +799,7 @@ class Group $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC); if (isset($flagPermission) && $flagPermission) { - \G::LoadSystem('rbac'); + while ($rsCriteria->next()) { $row = $rsCriteria->getRow(); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php index a6aa872de..cad0d75c8 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php @@ -186,7 +186,7 @@ class Light ///-- $c->addAsColumn('USR_NAME', "CONCAT(USR_LASTNAME, ' ', USR_FIRSTNAME)"); $sDataBase = 'database_' . strtolower(DB_ADAPTER); if (G::LoadSystemExist($sDataBase)) { - G::LoadSystem($sDataBase); + $oDataBase = new \database(); $c->addAsColumn('USR_NAME', $oDataBase->concatString("USR_LASTNAME", "' '", "USR_FIRSTNAME")); $c->addAsColumn( diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php index 3c0471834..43792c26f 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Table.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Table.php @@ -762,7 +762,7 @@ class Table */ public function _getDynafields ($pro_uid, $type = 'xmlform', $rep_tab_grid = '') { - G::loadSystem( 'dynaformhandler' ); + $oCriteria = new \Criteria( 'workflow' ); $oCriteria->addSelectColumn( \DynaformPeer::DYN_FILENAME ); @@ -1038,7 +1038,7 @@ class Table throw (new \Exception("The property rep_tab_grid: '$rep_tab_grid' is incorrect.")); } - G::loadSystem('dynaformhandler'); + $grids = array(); $namesGrid = array(); $aFieldsNames = array(); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/User.php b/workflow/engine/src/ProcessMaker/BusinessModel/User.php index 06effa137..3a117fbf0 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/User.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/User.php @@ -524,7 +524,7 @@ class User public function create(array $arrayData) { try { - \G::LoadSystem("rbac"); + //Verify data $validator = new \ProcessMaker\BusinessModel\Validator(); @@ -637,7 +637,7 @@ class User public function update($userUid, array $arrayData, $userUidLogged) { try { - \G::LoadSystem("rbac"); + //Verify data $validator = new \ProcessMaker\BusinessModel\Validator(); diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php index ec34c55a3..ea884ed0a 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php @@ -74,7 +74,7 @@ class Light extends Api */ global $RBAC; if (!isset($RBAC)) { - \Bootstrap::LoadSystem('rbac'); + $RBAC = \RBAC::getSingleton(PATH_DATA, session_id()); $RBAC->sSystem = 'PROCESSMAKER'; $RBAC->initRBAC(); diff --git a/workflow/engine/templates/appFolder/appFolderTree.php b/workflow/engine/templates/appFolder/appFolderTree.php index e16c280bd..639fffdc0 100644 --- a/workflow/engine/templates/appFolder/appFolderTree.php +++ b/workflow/engine/templates/appFolder/appFolderTree.php @@ -56,7 +56,7 @@ $html = ' } return 'Unknown'; } -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_SERVER['HTTP_USER_AGENT'] = $filter->xssFilterHard($_SERVER['HTTP_USER_AGENT']); if((looking_for_browser($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 8')||(looking_for_browser($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 7')||(looking_for_browser($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 6')){ diff --git a/workflow/engine/templates/cases/missRequiredFields.php b/workflow/engine/templates/cases/missRequiredFields.php index e71cd60ed..fec970707 100644 --- a/workflow/engine/templates/cases/missRequiredFields.php +++ b/workflow/engine/templates/cases/missRequiredFields.php @@ -30,7 +30,7 @@ * @LastModification 30/05/2008 */ -G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $_POST = $filter->xssFilterHard($_POST); $ID_ERROR = $filter->xssFilterHard(G::LoadTranslation('ID_ERROR')); diff --git a/workflow/engine/templates/cases/showDebugFrameBreaker.php b/workflow/engine/templates/cases/showDebugFrameBreaker.php index 6e2b35439..c498b7c58 100644 --- a/workflow/engine/templates/cases/showDebugFrameBreaker.php +++ b/workflow/engine/templates/cases/showDebugFrameBreaker.php @@ -1,5 +1,5 @@ xssFilterHard($_POST['NextStep'], "url"); ?> diff --git a/workflow/engine/templates/login/showDBFiles.php b/workflow/engine/templates/login/showDBFiles.php index 89cab1860..0e3427a30 100644 --- a/workflow/engine/templates/login/showDBFiles.php +++ b/workflow/engine/templates/login/showDBFiles.php @@ -1,26 +1,26 @@ . - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * +/** + * showDBFiles.php + * + * ProcessMaker Open Source Edition + * Copyright (C) 2004 - 2008 Colosa Inc.23 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * For more information, contact Colosa Inc, 2566 Le Jeune Rd., + * Coral Gables, FL, 33134, USA, or email info@colosa.com. + * */ $path = PATH_DB; //using the opendir function @@ -30,7 +30,7 @@ die; } - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); echo ""; diff --git a/workflow/engine/templates/oauth2/authorize.php b/workflow/engine/templates/oauth2/authorize.php index a8801b103..454945e4f 100644 --- a/workflow/engine/templates/oauth2/authorize.php +++ b/workflow/engine/templates/oauth2/authorize.php @@ -1,6 +1,6 @@ xssFilterHard($_GET,"url"); $_SERVER["QUERY_STRING"] = $filter->xssFilterHard($_SERVER["QUERY_STRING"],"url"); diff --git a/workflow/public_html/bootstrap.php b/workflow/public_html/bootstrap.php index c04b87137..793e14521 100644 --- a/workflow/public_html/bootstrap.php +++ b/workflow/public_html/bootstrap.php @@ -69,7 +69,7 @@ //$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE; //$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING; - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); $config['display_errors'] = $filter->validateInput($config['display_errors']); $config['error_reporting'] = $filter->validateInput($config['error_reporting']); @@ -249,32 +249,32 @@ } // Call Gulliver Classes - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem('error'); - G::LoadSystem('dbconnection'); - G::LoadSystem('dbsession'); - G::LoadSystem('dbrecordset'); - G::LoadSystem('dbtable'); - G::LoadSystem('rbac' ); - G::LoadSystem('publisher'); - G::LoadSystem('templatePower'); - G::LoadSystem('xmlDocument'); - G::LoadSystem('xmlform'); - G::LoadSystem('xmlformExtension'); - G::LoadSystem('form'); - G::LoadSystem('menu'); - G::LoadSystem("xmlMenu"); - G::LoadSystem('wysiwygEditor'); - G::LoadSystem('controller'); - G::LoadSystem('httpProxyController'); - G::LoadSystem('pmException'); + + + + + + + + + + + + + + + + + + + // Create headPublisher singleton - G::LoadSystem('headPublisher'); + $oHeadPublisher =& headPublisher::getSingleton(); //Load filter class - G::LoadSystem('inputfilter'); + $filter = new InputFilter(); // Installer, redirect to install if we don't have a valid shared data folder diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index cd9741332..1f64a6284 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -281,6 +281,12 @@ define( 'PML_WSDL_URL', PML_SERVER . '/syspmLibrary/en/green/services/wsdl' ); define( 'PML_UPLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/uploadProcess' ); define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download' ); +//Call Gulliver Classes + + +//Loading the autoloader libraries feature +Bootstrap::registerSystemClasses(); + $config = Bootstrap::getSystemConfiguration(); // starting session @@ -507,10 +513,10 @@ if (defined( 'PATH_DATA' ) && file_exists( PATH_DATA )) { $pathFile = PATH_THIRDPARTY . '/pear/PEAR.php'; require_once $pathFile; -//Bootstrap::LoadSystem( 'pmException' ); + // Create headPublisher singleton -//Bootstrap::LoadSystem( 'headPublisher' ); + $oHeadPublisher = & headPublisher::getSingleton(); // Installer, redirect to install if we don't have a valid shared data folder @@ -819,7 +825,7 @@ if (substr( SYS_COLLECTION, 0, 8 ) === 'gulliver') { //erik: verify if it is a Controller Class or httpProxyController Class if (is_file( PATH_CONTROLLERS . SYS_COLLECTION . '.php' )) { - Bootstrap::LoadSystem( 'controller' ); + $pathFile = PATH_CONTROLLERS . SYS_COLLECTION . '.php'; require_once $pathFile; $controllerClass = SYS_COLLECTION; @@ -889,13 +895,13 @@ if (! $avoidChangedWorkspaceValidation && isset( $_SESSION['WORKSPACE'] ) && $_S } // enable rbac -Bootstrap::LoadSystem( 'rbac' ); + $RBAC = &RBAC::getSingleton( PATH_DATA, session_id() ); $RBAC->sSystem = 'PROCESSMAKER'; //Enable Monolog Bootstrap::initVendors(); -Bootstrap::LoadSystem( 'monologProvider' ); + // define and send Headers for all pages if (! defined( 'EXECUTE_BY_CRON' )) { header( "Expires: " . gmdate( "D, d M Y H:i:s", mktime( 0, 0, 0, date( 'm' ), date( 'd' ) - 1, date( 'Y' ) ) ) . " GMT" );