getModel('pull'); if ($model->apply(JRequest::getVar('pull_id'))) { $msg = 'Patch successfully applied'; } else { $msg = 'Patch did not apply'; } $this->setRedirect(JRoute::_('index.php?option=com_patchtester&view=pulls', false), $msg); } public function revert() { $model = $this->getModel('pull'); if ($model->revert(JRequest::getVar('pull_id'))) { $msg = 'Patch successfully reverted'; } else { $msg = 'Patch did not revert'; } $this->setRedirect(JRoute::_('index.php?option=com_patchtester&view=pulls', false), $msg); } }