From: hickert Date: Tue, 27 Apr 2010 05:33:19 +0000 (+0000) Subject: Updated pathNavigator X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9eb379c06d71181beb580fe7f42e3a9cef7e48e0;p=gosa.git Updated pathNavigator -Fixed undefined index git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17862 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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',''); } }