From e1f170e62326fc1b1052bd3297b2583d17591a39 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 12 Dec 2005 08:47:24 +0000 Subject: [PATCH] Fixed undefined index git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2286 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_servRepository.inc | 44 +++++++++++++++---- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc index c1fd41eea..c6d54f13a 100644 --- a/plugins/admin/systems/class_servRepository.inc +++ b/plugins/admin/systems/class_servRepository.inc @@ -33,18 +33,36 @@ class servrepository extends plugin $tmp2 = array(); $tmp3 = array(); - $tmp2['ParentServer'] = $tmp[1]; - if(empty($tmp[1])){ + if(isset($tmp[1])){ + $tmp2['ParentServer'] = $tmp[1]; + if(empty($tmp[1])){ + $tmp2['ParentServer'] = "none"; + } + }else{ $tmp2['ParentServer'] = "none"; } - $tmp2['Url'] = $tmp[0]; - $tmp2['Release'] = $tmp[2]; - $tmp3 = split(",",$tmp[3]); + if(isset($tmp[0])){ + $tmp2['Url'] = $tmp[0]; + }else{ + $tmp2['Url'] = ""; + } + + if(isset($tmp[2])){ + $tmp2['Release'] = $tmp[2]; + }else{ + $tmp2['Release'] = ""; + } + + if(isset($tmp[3])){ + $tmp3 = split(",",$tmp[3]); + foreach($tmp3 as $sec){ + $tmp2['Sections'][$sec]=$sec; + } + }else{ + $tmp['Section']=array(); + } - foreach($tmp3 as $sec){ - $tmp2['Sections'][$sec]=$sec; - } $this->repositories[$tmp[2]]=$tmp2; } } @@ -168,7 +186,15 @@ class servrepository extends plugin $link = "%s"; $edit = " "; $delete = ""; - + + if(count($this->repositories)==0){ + $divlist->AddEntry(array( + array("string"=>" ","attach"=>"style='width:80px;'"), + array("string"=>" "), + array("string"=>" ","attach"=>"style='border-right:0px;width:50px;text-align:right;'") + )); + } + foreach($this->repositories as $name => $reps){ $str = " "; -- 2.30.2