summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af8f0e1)
raw | patch | inline | side by side (parent: af8f0e1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Jun 2007 08:22:57 +0000 (08:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Jun 2007 08:22:57 +0000 (08:22 +0000) |
Keep correct sorting
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6546 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6546 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiPartitionTable.inc | patch | blob | history |
diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index da09b098fdc091c0587c599c8ea5744d908ff938..6540535a97545f51d5da26d2310bfe24757375ed 100644 (file)
*/
$partition['status']="edited";
$this->disks[$name]['partitions'][$partition['FAIpartitionNr']] = $partition;
- }
+ }
+ ksort($this->disks[$name]['partitions']);
}
}
ksort($this->disks);
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty= get_smarty();
if($disk['status']!="delete"){
/* Add all partitions */
- foreach($disk['partitions'] as $key => $partition){
+ foreach($disk['partitions'] as $part_nr => $partition){
/* Create attribute array */
$partition_attrs = array();
}
/* Create partition dn and add necessary attributes */
+ $partition_dn_del = "FAIpartitionNr=".$partition_attrs['FAIpartitionNr'].",".$disk_dn;
+ $partition_attrs['FAIpartitionNr']= $part_nr;
$partition_dn= "FAIpartitionNr=".$partition_attrs['FAIpartitionNr'].",".$disk_dn;
$partition_attrs['objectClass']= array("top","FAIclass","FAIpartitionEntry");
$partition_attrs['cn']= $partition_attrs['FAIpartitionNr'];
/* Collect all operations */
if(($partition['status'] == "delete")&&($disk['status']!="new")){
- $Todo['delete'][$partition_dn] = $partition_attrs;
+ $Todo['delete'][$partition_dn_del] = $partition_attrs;
}elseif($partition['status'] == "new"){
$Todo['rest'][$partition_dn] = $partition_attrs;
}elseif($partition['status'] == "edited"){
/* First of all, delete old entries */
foreach($Todo['delete'] as $partition_dn => $attrs){
$ldap->cd($partition_dn);
- $ldap->rmdir_recursive($partition_dn);
+ $res = $ldap->rmdir_recursive($partition_dn);
show_ldap_error($ldap->get_error(), _("Removing FAI partition table entry failed"));
}