ALF-14: Enable plugin triggers build script to include plugin changes
This commit is contained in:
@@ -1791,7 +1791,6 @@ class PMPluginRegistry
|
||||
return $this->_aOpenReassignCallback;
|
||||
}
|
||||
|
||||
|
||||
public function getPluginsData()
|
||||
{
|
||||
return $this->_aPlugins;
|
||||
@@ -1825,7 +1824,7 @@ class PMPluginRegistry
|
||||
*/
|
||||
public function isEnterprisePlugin($pluginName, $path = null)
|
||||
{
|
||||
$path = (!is_null($path) && $path != '')? rtrim($path, '/\\') . PATH_SEP : PATH_PLUGINS;
|
||||
$path = (!is_null($path) && $path != '') ? rtrim($path, '/\\') . PATH_SEP : PATH_PLUGINS;
|
||||
$pluginFile = $pluginName . '.php';
|
||||
|
||||
//Return
|
||||
@@ -1834,5 +1833,20 @@ class PMPluginRegistry
|
||||
str_replace(["\n", "\r", "\t"], ' ', file_get_contents($path . $pluginFile))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this for extensions
|
||||
*
|
||||
* @return array with namespace and plugin folder
|
||||
*/
|
||||
public function getEnabledPlugins()
|
||||
{
|
||||
$enabledPlugins = array();
|
||||
foreach ($this->_aPluginDetails as $row) {
|
||||
if ($row->enabled) {
|
||||
$enabledPlugins[$row->sNamespace] = $row->sPluginFolder;
|
||||
}
|
||||
}
|
||||
return $enabledPlugins;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
include_once (PATH_TRUNK."/class.Build.php");
|
||||
use Build\Utils\ProcessMakerPhpBuilderHelper;
|
||||
|
||||
// lets display the items
|
||||
$pluginFile = $_GET['id'];
|
||||
@@ -86,6 +88,16 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
||||
}
|
||||
}
|
||||
closedir( $handle );
|
||||
/**
|
||||
* Calls PMExtensionClass Builder to include Plugins changes.
|
||||
*/
|
||||
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->enabledExtensions = $oPluginRegistry->getEnabledPlugins();
|
||||
if (!empty($phpBuilder->enabledExtensions)) {
|
||||
$phpBuilder->extension = true;
|
||||
}
|
||||
$phpBuilder->buildAll();
|
||||
}
|
||||
|
||||
//$oPluginRegistry->showArrays();
|
||||
|
||||
Reference in New Issue
Block a user