getModel('pull') ->apply(JFactory::getApplication()->input->getInt('pull_id')); $msg = JText::_('COM_PATCHTESTER_APPLY_OK'); $type = 'message'; } catch (Exception $e) { $msg = $e->getMessage(); $type = 'error'; } $this->setRedirect(JRoute::_('index.php?option=com_patchtester&view=pulls', false), $msg, $type); } public function revert() { try { $this->getModel('pull') ->revert(JFactory::getApplication()->input->getInt('pull_id')); $msg = JText::_('COM_PATCHTESTER_REVERT_OK'); $type = 'message'; } catch (Exception $e) { $msg = $e->getMessage(); $type = 'error'; } $this->setRedirect(JRoute::_('index.php?option=com_patchtester&view=pulls', false), $msg, $type); } }