From 61f21236bcb08c7eb8e8b99df85f5c3dfb7fe066 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Fri, 17 Oct 2014 07:32:48 -0400 Subject: [PATCH] Bug fixes --- .../PatchTester/Controller/FetchController.php | 8 ++++++-- .../PatchTester/View/Pulls/PullsHtmlView.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) 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');