BUG 5978 Allow plugins to set tasks for the CLI

Plugins with a bin/tasks directory will be included
in the list of tasks of processmaker CLI.
This commit is contained in:
Alexandre Rosenfeld
2011-03-28 18:22:27 -04:00
parent 34a0a5d5e8
commit cbc69e7cc5
2 changed files with 8 additions and 1 deletions

View File

@@ -61,6 +61,13 @@
// register tasks
//TODO: include plugins
$directories = array(PATH_HOME . 'engine/bin/tasks');
$pluginsDirectories = glob(PATH_PLUGINS . "*");
foreach ($pluginsDirectories as $dir) {
if (!is_dir($dir))
continue;
if (is_dir("$dir/bin/tasks"))
$directories[] = "$dir/bin/tasks";
}
foreach ($directories as $dir) {
foreach (glob("$dir/*.php") as $filename) {