X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_divListSystemService.inc;h=7f86a278bd4881c916530dd20610dd5faabd1663;hb=ecabf2056dc1350d73115d5fa226676be30017d6;hp=426b97b15f7e5f65f6b4736b46c4757009076058;hpb=b7ff5a9b6deb733c5ce1dfb2e2dfd39d33efdaad;p=gosa.git diff --git a/plugins/admin/systems/class_divListSystemService.inc b/plugins/admin/systems/class_divListSystemService.inc index 426b97b15..7f86a278b 100644 --- a/plugins/admin/systems/class_divListSystemService.inc +++ b/plugins/admin/systems/class_divListSystemService.inc @@ -8,7 +8,7 @@ class divListSystemService extends MultiSelectWindow function divListSystemService ($config,$parent) { - MultiSelectWindow::MultiSelectWindow($config,"SystemService"); + MultiSelectWindow::MultiSelectWindow($config,"SystemService", "server"); $this->parent = $parent; $this->ui = get_userinfo(); @@ -47,14 +47,14 @@ class divListSystemService extends MultiSelectWindow } } $listhead = "
". - "  ". "  ". - "  ". - "  ". - "  ". "
"; $this->SetListHeader($listhead); @@ -68,42 +68,60 @@ class divListSystemService extends MultiSelectWindow function setEntries($list) { + $tmp = array(); foreach($list as $name => $entry){ + $tmp[$name] = $entry['Message']; + } + + natcasesort($tmp); + $tmp2 = array(); + foreach($tmp as $name => $value){ + $tmp2[$name] = $list[$name]; + } + + foreach($tmp2 as $name => $entry){ switch($entry['Status']){ - case '' : $str ="";break; + case '' : $str =" ";break; case SERVICE_STOPPED : $str =""; break; case SERVICE_STARTED : $str =""; break; case SERVICE_RESTARTED : $str ="R"; break; default: $str= "".$entry["; } + $WasAccount = $this->parent->plugins[$name] -> initially_was_account; + $field1 = array("string" => $str ,"attach" => "style='width:20px;'"); $field2 = array("string" => $entry['Message'] ); $actions =""; - if($entry['AllowStart']){ - $actions .= " "; + if($entry['AllowStart'] && $WasAccount){ + $actions .= " "; }else{ $actions .= " "; } - if($entry['AllowStart']){ - $actions .= " "; + if($entry['AllowStart'] && $WasAccount){ + $actions .= " "; }else{ $actions .= " "; } - if($entry['AllowStart']){ - $actions .= " "; + if($entry['AllowStart'] && $WasAccount){ + $actions .= " "; }else{ $actions .= " "; } if($entry['AllowEdit']){ - $actions .= " "; + $actions .= " "; }else{ $actions .= " "; } if($entry['AllowRemove']){ - $actions .= " "; + $actions .= " "; }else{ $actions .= " "; }