summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8684600)
raw | patch | inline | side by side (parent: 8684600)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Dec 2007 12:28:22 +0000 (12:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Dec 2007 12:28:22 +0000 (12:28 +0000) |
-Natural sorting
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8145 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8145 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/applications/class_applicationManagement.inc b/gosa-core/plugins/admin/applications/class_applicationManagement.inc
index 69a4c0f4845f9d92c0f3fc7a51fcbc505058066b..7736f1963c3ab76b8f278409c6afc46173a0eb63 100644 (file)
}
$res= get_list($Filter, "application", $use_base, array("cn","description","dn","objectClass"), $Flags);
+ $tmp2 = array();
foreach ($res as $val){
$tmp[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']]=$val;
+ $tmp2[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']] = strtolower($val['cn'][0]).$val['cn'][0].$val['dn'];
}
- ksort($tmp);
+ natcasesort($tmp2);
$this->applications=array();
- foreach($tmp as $val){
- $this->applications[]=$val;
+ foreach($tmp2 as $val){
+ $this->applications[]=$tmp[$val];
}
reset ($this->applications);
}
diff --git a/gosa-core/plugins/admin/devices/class_deviceManagement.inc b/gosa-core/plugins/admin/devices/class_deviceManagement.inc
index dbdfc0fb476f769dd8401c6c30a5559bf9978ef7..59e702ff481eb9bb3f66f89168f12fc32168f24c 100644 (file)
/* Get results and create index */
$res= get_list($Filter, "devices", $base, array("cn","description","dn","objectClass"), $Flags);
+ $tmp2 = array();
foreach ($res as $val){
+ $tmp2[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']] = strtolower($val['cn'][0]).$val['cn'][0].$val['dn'];
$tmp[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']]=$val;
}
/* sort entries */
- ksort($tmp);
+ natcasesort($tmp2);
$this->devices=array();
- foreach($tmp as $val){
- $this->devices[]=$val;
+ foreach($tmp2 as $val){
+ $this->devices[]=$tmp[$val];
}
reset ($this->devices);
}
diff --git a/gosa-core/plugins/admin/mimetypes/class_mimetypeManagement.inc b/gosa-core/plugins/admin/mimetypes/class_mimetypeManagement.inc
index 5cd9c15b330af24bdc34ada6466e1f3ca9135176..6511103600da18e892c4a054d999ba7c22aa4515 100755 (executable)
/* Get results and create index */
$res= get_list($Filter, "mimetypes", $use_base, array("cn","description","dn","objectClass"), $Flags);
+ $tmp2 = array();
foreach ($res as $val){
$tmp[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']]=$val;
+ $tmp2[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']] = strtolower($val['cn'][0]).$val['cn'][0].$val['dn'];
}
/* sort entries */
- ksort($tmp);
+ natcasesort($tmp2);
$this->mimetypes=array();
- foreach($tmp as $val){
- $this->mimetypes[]=$val;
+ foreach($tmp2 as $val){
+ $this->mimetypes[]=$tmp[$val];
}
reset ($this->mimetypes);
}
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
index 5740877402040ba9736e3be50994c5d5dd4044e9..1e66866da642e4d1102580ea81cc25852a1a3537 100644 (file)
ksort ($this->ogrouplist);
reset ($this->ogrouplist);
$tmp=array();
+ $tmp2 = array();
foreach($this->ogrouplist as $tkey => $val ){
$tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
+ $tmp2[strtolower($val['cn'][0]).$val['cn'][0]] = strtolower($val['cn'][0]).$val['cn'][0];
}
- ksort($tmp);
+ natcasesort($tmp2);
$this->ogrouplist=array();
- foreach($tmp as $val){
- $this->ogrouplist[]=$val;
+ foreach($tmp2 as $val){
+ $this->ogrouplist[]=$tmp[$val];
}
reset ($this->ogrouplist);
}
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index a031e89d9f783a2cbb19272ea867938b1bde2c65..977a26f6b1db3fdaa98c823b6004bf540be707b9 100644 (file)
$SortTemp[$display] = $display;
}
}
- sort($SortTemp);
+ natcasesort($SortTemp);
reset($SortTemp);
$this->list = array();