From af1c62bbb12810af54a5c695cb5f27945ac54b1e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 20 May 2010 06:59:21 +0000 Subject: [PATCH] Updated server service -Sorted menu entries. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18564 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_serverService.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_serverService.inc b/gosa-plugins/systems/admin/systems/class_serverService.inc index 7cb9b9683..1256d1be8 100644 --- a/gosa-plugins/systems/admin/systems/class_serverService.inc +++ b/gosa-plugins/systems/admin/systems/class_serverService.inc @@ -104,11 +104,21 @@ class ServerService extends management "; $serviceList = ""; - foreach($this->getAllUnusedServices() as $name => $desc){ + + // Sort entries by alphabet + $list = array(); + $services = $this->getAllUnusedServices(); + foreach($services as $name => $desc){ + $list[_($desc).$name] = $name; + } + ksort($list); + + // Create menu entries -> create -> services[] + foreach($list as $name){ + $desc = $services[$name]; $serviceList.= sprintf($template, $name,_($desc)); } $contents = preg_replace("/%SERVICES%/",$serviceList, $contents); - $headpage = new listing($contents,TRUE); $headpage->registerElementFilter("filterServiceStatus", "ServerService::filterServiceStatus"); $headpage->setFilter($filter); -- 2.30.2