summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0270e14)
raw | patch | inline | side by side (parent: 0270e14)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Jun 2006 04:13:04 +0000 (04:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Jun 2006 04:13:04 +0000 (04:13 +0000) |
only show action icons if service was saved
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3683 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3683 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_divListSystemService.inc | patch | blob | history | |
plugins/admin/systems/class_serverService.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_divListSystemService.inc b/plugins/admin/systems/class_divListSystemService.inc
index 7ba7bcf447fb5db29ff086e0d895df0cf4a8f670..f50af48dad5462f96c3da124877a1dcd5d9655a0 100644 (file)
function setEntries($list)
{
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 ="<img src='images/status_stopped.png' title='"._("Stopped")."'>"; break;
case SERVICE_STARTED : $str ="<img src='images/status_running.png' title='"._("Started")."'>"; break;
case SERVICE_RESTARTED : $str ="<img src='images/status_restarting.png' title='"._("Restarting")."' alt='R'>"; break;
default: $str= "<img src='images/select_user.png' alt='".$entry['Status']."' title='"._("User status")." : ".$entry['Status']."'>";
}
+ $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']){
+ if($entry['AllowStart'] && $WasAccount){
$actions .= " <input type='image' name='StartSingleService_".$name."' src='images/status_start.png'
title='"._("Start service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
- if($entry['AllowStart']){
+ if($entry['AllowStart'] && $WasAccount){
$actions .= " <input type='image' name='StopSingleService_".$name."' src='images/status_stop.png'
title='"._("Stop service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
- if($entry['AllowStart']){
+ if($entry['AllowStart'] && $WasAccount){
$actions .= " <input type='image' name='RestartSingleService_".$name."' src='images/status_restart.png'
title='"._("Restart service")."'>";
}else{
diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc
index fab65db6903dddd93331b83bab288ca9c389629c..f88ea34861080dcc2ffa32cc64a4817829f9c54a 100644 (file)
if($service == ALL_SERVICES){
foreach($this->plugins as $name => $obj){
- if($this->plugins[$name]->is_account){
+ if($this->plugins[$name]->initially_was_account && $this->plugins[$name]->is_account){
$this->plugins[$name]->setStatus($action);
}
}