/** * Removes an booking * * @throws Exception * @return void */ public function remove() { $cid = JFactory::getApplication()->input->get('cid', array(), 'array'); // Set db status to deleted @since 3.1 MatukioHelperUtilsBooking::deleteBookings($cid); $this->setRedirect('index.php?option=com_matukio&view=bookings'); }
/** * Cancels the booking * * @throws Exception - if access is denied! * @return object */ public function cancelBookingOrganizer() { if (!JFactory::getUser()->authorise('core.edit.own', 'com_matukio')) { throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $eventid = JFactory::getApplication()->input->getInt('cid', 0); $link = JRoute::_("index.php?option=com_matukio&view=participants&cid=" . $eventid . "&art=2"); $msg = JText::_("COM_MATUKIO_CANCEL_BOOKING_SUCCESSFULL"); $booking_ids = JFactory::getApplication()->input->get('uid', array(), 'array'); // Set db status to deleted @since 3.1 MatukioHelperUtilsBooking::deleteBookings($booking_ids); $this->setRedirect($link, $msg); }