summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4c7883)
raw | patch | inline | side by side (parent: c4c7883)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Apr 2010 05:33:19 +0000 (05:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Apr 2010 05:33:19 +0000 (05:33 +0000) |
-Fixed undefined index
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17862 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17862 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_pathNavigator.inc | patch | blob | history |
index d1604a2c60ab70df9458c5c5b9fe12b49ecca16f..6140e0e0146290e591bf152726ecba82c2dccc21 100644 (file)
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){
$sTitle .= " - ".$entry['NAME'];
}
+ // If no path is given then show a simple 'Welcome to GOsa' string.
if(empty($path)){
$path = "<li class='left path-element'>"._("Welcome to GOsa")."</li>";
}
static function clear()
{
session::set('pathNavigator::position', array());
- session::set('pathNavigator::title','');
}
}