diff --git a/plugins/admin/systems/class_divListSystemService.inc b/plugins/admin/systems/class_divListSystemService.inc
index 426b97b15f7e5f65f6b4736b46c4757009076058..25e2ed55212717cac9c3a36f69e19be879f9a8d4 100644 (file)
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 ="<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']){
- $actions .= " <input type='image' name='StartSingleService_".$name."' src='images/status_start.png'>";
+ 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']){
- $actions .= " <input type='image' name='StopSingleService_".$name."' src='images/status_stop.png'>";
+ 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']){
- $actions .= " <input type='image' name='RestartSingleService_".$name."' src='images/status_restart.png'>";
+ if($entry['AllowStart'] && $WasAccount){
+ $actions .= " <input type='image' name='RestartSingleService_".$name."' src='images/status_restart.png'
+ title='"._("Restart service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
if($entry['AllowEdit']){
- $actions .= " <input type='image' name='EditSingleService_".$name."' src='images/edit.png'>";
+ $actions .= " <input type='image' name='EditSingleService_".$name."' src='images/edit.png'
+ title='"._("Edit service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
if($entry['AllowRemove']){
- $actions .= " <input type='image' name='RemoveSingleService_".$name."' src='images/edittrash.png'>";
+ $actions .= " <input type='image' name='RemoveSingleService_".$name."' src='images/edittrash.png'
+ title='"._("Remove service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}