summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a38dac0)
raw | patch | inline | side by side (parent: a38dac0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Sep 2010 11:48:14 +0000 (11:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Sep 2010 11:48:14 +0000 (11:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19869 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc
index afbfc4144fa14ed622f51eb5c5fb1f06bf34430a..68c7828aa27901a82b30228b78b0ce2db7bc83bc 100644 (file)
function addItem($type,$name, $values = array())
{
if(!isset($this->itemConfig[$type])){
- echo "Invalid type {$type}, skipping item!";
+ echo "Invalid type {$type}, skipping item!<br>";
return;
}
}
- // Inject user actions
+ /*! \brief Initiates the removal for the given entries
+ * and displays a confirmation dialog.
+ *
+ * @param String 'action' The name of the action which was the used as trigger.
+ * @param Array 'target' A list of object dns, which should be affected by this method.
+ * @param Array 'all' A combination of both 'action' and 'target'.
+ */
+ protected function removeEntryRequested($action="",$target=array(),$all=array())
+ {
+ foreach($target as $id){
+ $this->removeItem($id);
+ }
+ print_a($this->allConfiguredItems);
+ }
+
+
+ function removeItem($id, &$data = NULL)
+ {
+ if($data === NULL){
+ $data = &$this->allConfiguredItems;
+ }
+
+ // Remove the item and its children
+ if(isset($data[$id])){
+ foreach($data[$id]['children'] as $cid => $item){
+ $this->removeItem($cid, $data);
+ }
+ unset($data[$id]);
+ }
+
+ // Remove to current id from sub entries
+ foreach($data as $key => $item){
+ $this->removeItem($id, $data[$key]['children']);
+ }
+ }
+
+
+ // Inject user actions
function detectPostActions()
{
$action = management::detectPostActions();
if(isset($_POST['saveItemAdd'])) $action['action'] = "saveItemAdd";
if(isset($_POST['cancelItemEdit'])) $action['action'] = "cancelItemEdit";
if(isset($_POST['cancelItemAdd'])) $action['action'] = "cancelItemAdd";
-
- if($action['action'] == 'remove'){
- echo "Löschen geht nicht!";
- $action['action'] = "";
- }
return($action);
}