From 5cbd46b6e3af285aae554814639d67786c7e1d63 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 27 Jan 2017 15:01:48 +0100 Subject: [PATCH] Node: return myself in every path fixes #96 --- application/controllers/NodeController.php | 1 + library/Businessprocess/Node.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/NodeController.php b/application/controllers/NodeController.php index 724c178..ff9b972 100644 --- a/application/controllers/NodeController.php +++ b/application/controllers/NodeController.php @@ -42,6 +42,7 @@ class NodeController extends Controller $config->applySimulation($simulation); foreach ($config->getNode($name)->getPaths() as $path) { + array_pop($path); $node = array_pop($path); $renderer = new TileRenderer($config, $config->getNode($node)); $renderer->setUrl( diff --git a/library/Businessprocess/Node.php b/library/Businessprocess/Node.php index bc751d3..b46046d 100644 --- a/library/Businessprocess/Node.php +++ b/library/Businessprocess/Node.php @@ -331,11 +331,11 @@ abstract class Node $paths = array(); foreach ($this->parents as $parent) { foreach ($parent->getPaths() as $path) { - // $path[] = $this->getName(); + $path[] = $this->getName(); $paths[] = $path; } } - // TODO! -> for delete etc + return $paths; }