From: hickert Date: Mon, 16 Jun 2008 13:10:56 +0000 (+0000) Subject: Added sorting to workstation startup. FAI server/release X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d8d2c182e5d6399919d2f162d26aa632c6ce58cf;p=gosa.git Added sorting to workstation startup. FAI server/release git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11341 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 8cc81a1b4..4d2ea8c6f 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -1099,12 +1099,6 @@ class workstartup extends plugin */ if($force || !isset($this->cache['SERVERS'])){ - /* Only add inherit option, if we are part in an object group - */ - if($this->member_of_ogroup){ - $this->cache['SERVERS']['inherited']=array(); - } - $o_queue = new gosaSupportDaemon(); $tmp = $o_queue->FAI_get_server(); if($o_queue->is_error()){ @@ -1117,6 +1111,8 @@ class workstartup extends plugin $rel = $entry['RELEASE']; $this->cache['SERVERS']['auto'][$rel] = $rel; $this->cache['SERVERS'][$entry['SERVER']][$rel] = $rel; + uksort($this->cache['SERVERS']['auto'], 'strnatcasecmp'); + uksort($this->cache['SERVERS'][$entry['SERVER']], 'strnatcasecmp'); } } } @@ -1204,6 +1200,13 @@ class workstartup extends plugin } } } + uksort($this->cache['SERVERS'], 'strnatcasecmp'); + + /* Only add inherit option, if we are part in an object group + */ + if($this->member_of_ogroup){ + $this->cache['SERVERS'] = array_merge(array('inherited' => array()),$this->cache['SERVERS']); + } } /* Get list of available kernel for this release