summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 776c00a)
raw | patch | inline | side by side (parent: 776c00a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Apr 2011 14:08:37 +0000 (14:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Apr 2011 14:08:37 +0000 (14:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20776 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementDataModel.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementDataModel.inc
index 46ccd28862233e95355534c5fb21d8e24dd9939e..d50b3f71b8ce414d8261687a4795588f7fa71ee3 100644 (file)
$parentId = $this->data['linear'][$path]['id'];
$parentDn = $this->data['linear'][$path]['dn'];
}else{
- echo "No parent";
+ trigger_error("Parent item ({$path}) does not exists!");
return(FALSE);
}
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index d3efd96514ed3ab25751d363d74c427c9a06a51d..65172d44d761e3d76c109b3410ebf99d749c0dc4 100644 (file)
$rPath = "/root/{$dist['name']}/$rPath";
$rName = preg_replace("/^.*\//","", $rPath);
$rPath = preg_replace("/\/[^\/]*$/","", $rPath);
-
$values = array('name' => $rName);
- $this->dataModel->addItem('Release',$rPath, $rName, $values);
+
+ if(!$this->dataModel->itemExistsByPath($rPath)){
+ trigger_error("Invalid release name '{$rName}' in path '{$rPath}' received! Skipping entry!");
+ }else{
+ $id = $this->dataModel->addItem('Release',$rPath, $rName, $values);
+ }
}
}
}
$dist = $this->getDistributionPart($item['path']);
$rpc = $this->config->getRpcHandle();
$rpc->removeDistribution($dist, array('recursive' => TRUE));
- echo "Removing distribution '{$dist}'";
if(!$rpc->success()){
msg_dialog::display(_("Error"), sprintf(_("Failed to remove the distribution: %s. Error was: %s"),
$dist, $rpc->get_error()), ERROR_DIALOG);
$release = preg_replace("/^.*\//","", $this->getReleasePart($item['path']));
$rpc = $this->config->getRpcHandle();
$rpc->removeRelease($release, array('recursive' => TRUE));
- echo "Removing release '{$release}'";
if(!$rpc->success()){
msg_dialog::display(_("Error"), sprintf(_("Failed to remove the release: %s. Error was: %s"),
$release, $rpc->get_error()),ERROR_DIALOG);
}
}else{
- echo $item['type']." - are not handled yet!";
+ trigger_error($item['type']." - are not handled yet!");
}
}
}
$this->dataModel->setItemValues($nP, $values);
$this->listing->clearDialogObject();
}
+ }else{
+ $this->listing->clearDialogObject();
}
}else{
// We've successfully added/saved the item, now add it to the tree.
- $this->dataModel->addItem($type, $this->selectedContainer, $values['name'],array(), '-' );
+ $this->dataModel->addItem($type, $this->selectedContainer, $values['name'],$values, '-' );
$this->listing->clearDialogObject();
}
}