From b727f6567ee01164e89ea70682e3a8ed556fb725 Mon Sep 17 00:00:00 2001 From: Ronald Quenta Date: Thu, 10 Aug 2017 15:45:07 -0400 Subject: [PATCH] add use in files --- gulliver/methods/defaultAjax.php | 5 ++++- gulliver/methods/propelTableAjax.php | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gulliver/methods/defaultAjax.php b/gulliver/methods/defaultAjax.php index e7dfda21c..1daa72eea 100644 --- a/gulliver/methods/defaultAjax.php +++ b/gulliver/methods/defaultAjax.php @@ -23,6 +23,9 @@ */ /*NEXT LINE: Runs any configuration defined to be executed before dependent fields recalc*/ + +use ProcessMaker\Plugins\PluginRegistry; + if (isset( $_SESSION['CURRENT_PAGE_INITILIZATION'] )) eval( $_SESSION['CURRENT_PAGE_INITILIZATION'] ); @@ -44,7 +47,7 @@ if (! is_file( XMLFORM_AJAX_PATH . $xmlFile )) { $aux = explode( PATH_SEP, $xmlFile ); //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment if (count( $aux ) == 2 && defined( 'G_PLUGIN_CLASS' )) { - $oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton(); + $oPluginRegistry = PluginRegistry::loadSingleton(); if ($oPluginRegistry->isRegisteredFolder( $aux[0] )) { $sPath = PATH_PLUGINS; } diff --git a/gulliver/methods/propelTableAjax.php b/gulliver/methods/propelTableAjax.php index 36a002dd7..93205fe77 100644 --- a/gulliver/methods/propelTableAjax.php +++ b/gulliver/methods/propelTableAjax.php @@ -24,6 +24,8 @@ */ /* Includes */ +use ProcessMaker\Plugins\PluginRegistry; + G::LoadAllPluginModelClasses(); $id = get_ajax_value('ptID'); $ntable = unserialize(base64_decode($_SESSION['pagedTable[' . $id . ']'])); @@ -39,7 +41,7 @@ if (isset($ntable->filterForm_Id) && ($ntable->filterForm_Id!=='')) { $aux = explode ( PATH_SEP, G::getUIDName( $ntable->filterForm_Id ) ); //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment if ( count($aux) == 2 && defined ( 'G_PLUGIN_CLASS' ) ) { - $oPluginRegistry = \ProcessMaker\Plugins\PluginRegistry::loadSingleton(); + $oPluginRegistry = PluginRegistry::loadSingleton(); if ( $oPluginRegistry->isRegisteredFolder($aux[0]) ) { $sPath = PATH_PLUGINS; }