diff --git a/administrator/components/com_patchtester/PatchTester/Controller/FetchController.php b/administrator/components/com_patchtester/PatchTester/Controller/FetchController.php index 8e335a0..ad77579 100644 --- a/administrator/components/com_patchtester/PatchTester/Controller/FetchController.php +++ b/administrator/components/com_patchtester/PatchTester/Controller/FetchController.php @@ -15,7 +15,7 @@ use PatchTester\Model\PullsModel; * * @since 2.0 */ -class FetchController extends \JControllerBase +class FetchController extends DisplayController { /** * Execute the controller. @@ -29,7 +29,11 @@ class FetchController extends \JControllerBase try { // TODO - Decouple the model and context? - $model = new PullsModel('com_patchtester.fetch', null, \JFactory::getDbo()); + $model = new PullsModel('com_patchtester.fetch', $state, \JFactory::getDbo()); + + // Initialize the state for the model + $model->setState($this->initializeState($model)); + $model->requestFromGithub(); $msg = \JText::_('COM_PATCHTESTER_FETCH_SUCCESSFUL'); diff --git a/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php b/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php index beea8c2..d098ef3 100644 --- a/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php +++ b/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php @@ -102,7 +102,7 @@ class PullsHtmlView extends DefaultHtmlView if (!count($this->envErrors)) { - \JToolbarHelper::custom('pulls.fetch', 'refresh.png', 'refresh_f2.png', 'COM_PATCHTESTER_TOOLBAR_FETCH_DATA', false); + \JToolbarHelper::custom('fetch', 'refresh.png', 'refresh_f2.png', 'COM_PATCHTESTER_TOOLBAR_FETCH_DATA', false); } \JToolBarHelper::preferences('com_patchtester');