X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_pathNavigator.inc;h=6140e0e0146290e591bf152726ecba82c2dccc21;hb=f04b7b95f6468a806353f05cdd3faf97dd744d5c;hp=815a5081b2496db4e38d034cad2fb4024327a3ff;hpb=0a51565cb03f20321a2a181929e0262753aacc70;p=gosa.git
diff --git a/gosa-core/include/class_pathNavigator.inc b/gosa-core/include/class_pathNavigator.inc
index 815a5081b..6140e0e01 100644
--- a/gosa-core/include/class_pathNavigator.inc
+++ b/gosa-core/include/class_pathNavigator.inc
@@ -5,7 +5,6 @@ class pathNavigator
static function registerPlugin($class, $title= "")
{
-
$str = "";
// Display headline of management plugins
@@ -54,26 +53,47 @@ class pathNavigator
if(!empty($str)){
$cur = session::get('pathNavigator::position');
-
- if(!empty($title)) $title = " title='{$title}' ";
-
- $cur.= "\n
{$str}";
+ $entry = array('TITLE' => $title, 'NAME' => $str);
+ $cur[] = $entry;
session::set('pathNavigator::position', $cur);
}
}
static function getCurrentPath()
{
- $path = session::get('pathNavigator::position');
+ // Ensure that we've a position value initialized.
+ if(!session::is_set('pathNavigator::position')) {
+ session::set('pathNavigator::position',array());
+ }
+
+ // Get position and validate its value
+ $list = session::get('pathNavigator::position');
+ if(!is_array($list)){
+ $list = array();
+ }
+
+ // Build up title and path string.
+ $path = "";
+ $sTitle = "";
+ foreach($list as $entry){
+ $title = (!empty($entry['TITLE']))? 'title="'.htmlentities(LDAP::fix($entry['TITLE']),ENT_COMPAT,'UTF-8').'"': '';
+ $path.= "\n{$entry['NAME']}";
+ $sTitle .= " - ".$entry['NAME'];
+ }
+
+ // If no path is given then show a simple 'Welcome to GOsa' string.
if(empty($path)){
$path = ""._("Welcome to GOsa")."";
}
+
+ $smarty = get_smarty();
+ $smarty->assign('title', 'GOsa '.$sTitle);
return($path);
}
static function clear()
{
- session::set('pathNavigator::position','');
+ session::set('pathNavigator::position', array());
}
}