Skip to content
Snippets Groups Projects
Commit 4ec75875 authored by Earl Miles's avatar Earl Miles
Browse files

Allow task handlers to bind to tasks by name like they used to.

parent 63ed7110
No related branches found
No related tags found
No related merge requests found
......@@ -630,12 +630,13 @@ function delegator_get_task_handler($id) {
*/
function delegator_get_task_handler_plugins($task) {
$type = isset($task['handler type']) ? $task['handler type'] : $task['name'];
$name = $task['name'];
$handlers = array();
$task_handlers = delegator_get_task_handlers();
foreach ($task_handlers as $id => $handler) {
$task_type = is_array($handler['handler type']) ? $handler['handler type'] : array($handler['handler type']);
if (in_array($type, $task_type)) {
if (in_array($type, $task_type) || in_array($name, $task_type)) {
$handlers[$id] = $handler;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment