public function update() { $vChildren = new Valid_UInt('children'); $vChildren->required(); if ($this->request->validArray($vChildren)) { $this->dao->updateChildren($this->tracker->getId(), $this->request->get('children')); } else { if ($this->request->exist('children')) { $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_hierarchy', 'controller_bad_request')); } else { $this->dao->deleteAllChildren($this->tracker->getId()); } } $this->redirect(array('tracker' => $this->tracker->getId(), 'func' => 'admin-hierarchy')); }