/** * Remove one or more entries for an event * * @return void */ public function removeTask() { // Check for request forgeries Request::checkToken(); // Incoming $event = Request::getInt('event', 0); $ids = Request::getVar('id', array(0)); // Get the single ID we're working with if (!is_array($ids)) { $ids = array(); } // Do we have any IDs? if (!empty($ids)) { $page = new Page($this->database); // Loop through each ID and delete the necessary items foreach ($ids as $id) { // Remove the profile $page->delete($id); } } // Output messsage and redirect App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&id[]=' . $event, false), Lang::txt('EVENTS_PAGES_REMOVED')); }