diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php
index 83f5d21b4c..538969e6ef 100755
--- a/pandora_console/godmode/wizards/HostDevices.class.php
+++ b/pandora_console/godmode/wizards/HostDevices.class.php
@@ -1126,26 +1126,4 @@ $(function() {
}
- /**
- * Builder for breadcrum
- *
- * @param array $urls Array of urls to be stored in breadcrum.
- *
- * @return void
- */
- public function prepareBreadcrum(array $urls)
- {
- $bc = [];
- $i = 0;
- foreach ($urls as $url) {
- $bc[$i] = '';
- $bc[$i] .= ''.$url['label'].'
';
- $bc[$i++] .= '';
- }
-
- $this->setBreadcrum($bc);
-
- }
-
-
}
diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php
index c0ae95504c..de6ed6b525 100644
--- a/pandora_console/godmode/wizards/Wizard.main.php
+++ b/pandora_console/godmode/wizards/Wizard.main.php
@@ -83,17 +83,17 @@ class Wizard
/**
* Add an element to breadcrum array.
*
- * @param string $string Element to add to breadcrum.
+ * @param string $breads Elements to add to breadcrum.
*
* @return void
*/
- protected function addBreadcrum($string)
+ protected function addBreadcrum($breads)
{
- if (empty($string)) {
+ if (empty($breads)) {
return;
}
- array_push($this->breadcrum, $string);
+ $this->breadcrum = array_merge($this->breadcrum, $breads);
}
@@ -124,21 +124,28 @@ class Wizard
/**
* Builder for breadcrum
*
- * @param array $urls Array of urls to be stored in breadcrum.
+ * @param array $urls Array of urls to be stored in breadcrum.
+ * @param boolean $add True if breadcrum should be added instead of
+ * overwrite it.
*
* @return void
*/
- public function prepareBreadcrum(array $urls)
+ public function prepareBreadcrum(array $urls, bool $add=false)
{
$bc = [];
$i = 0;
foreach ($urls as $url) {
- $bc[$i] = '';
+ $href = (isset($url['link']) === true) ? 'href="'.$url['link'].'"' : '';
+ $bc[$i] = '';
$bc[$i] .= ''.$url['label'].'
';
$bc[$i++] .= '';
}
- $this->setBreadcrum($bc);
+ if ($add === true) {
+ $this->addBreadcrum($bc);
+ } else {
+ $this->setBreadcrum($bc);
+ }
}