setState($this->initializeState($model)); if ($model->apply($this->getInput()->getUint('pull_id'))) { $msg = Text::_('COM_PATCHTESTER_APPLY_OK'); } else { $msg = Text::_('COM_PATCHTESTER_NO_FILES_TO_PATCH'); } $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)); } }