function action_remove($input) { $trackerId = $input->trackerId->int(); $confirm = $input->confirm->int(); $perms = Perms::get('tracker', $trackerId); if (!$perms->admin_trackers) { throw new Services_Exception_Denied(tr('Reserved for tracker administrators')); } $definition = Tracker_Definition::get($trackerId); if (!$definition) { throw new Services_Exception_NotFound(); } if ($confirm) { $this->utilities->removeTracker($trackerId); return array('trackerId' => 0); } return array('trackerId' => $trackerId, 'name' => $definition->getConfiguration('name')); }