X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_pathNavigator.inc;h=6140e0e0146290e591bf152726ecba82c2dccc21;hb=1069c3be6d2a5b9cf96c8decbc6bb95d42da32cc;hp=d1604a2c60ab70df9458c5c5b9fe12b49ecca16f;hpb=7def203fd2a22b370c6c1625c5e61bcd430e4fd6;p=gosa.git diff --git a/gosa-core/include/class_pathNavigator.inc b/gosa-core/include/class_pathNavigator.inc index d1604a2c6..6140e0e01 100644 --- a/gosa-core/include/class_pathNavigator.inc +++ b/gosa-core/include/class_pathNavigator.inc @@ -61,7 +61,18 @@ class pathNavigator static function getCurrentPath() { + // 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){ @@ -70,6 +81,7 @@ class pathNavigator $sTitle .= " - ".$entry['NAME']; } + // If no path is given then show a simple 'Welcome to GOsa' string. if(empty($path)){ $path = "
  • "._("Welcome to GOsa")."
  • "; } @@ -82,7 +94,6 @@ class pathNavigator static function clear() { session::set('pathNavigator::position', array()); - session::set('pathNavigator::title',''); } }