setState($this->initializeState($model)); $model->revert($this->getInput()->getUint('pull_id')); $msg = Text::_('COM_PATCHTESTER_REVERT_OK'); $type = 'message'; } catch (\Exception $e) { $msg = $e->getMessage(); $type = 'error'; } $this->getApplication()->enqueueMessage($msg, $type); $this->getApplication()->redirect(Route::_('index.php?option=com_patchtester', false)); } }