31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-04 06:30:47 +00:00

Misc bug fixes

This commit is contained in:
Michael Babker 2013-07-11 20:49:58 -05:00
parent 227109ed4b
commit 18738067f1
6 changed files with 14 additions and 11 deletions

View File

@ -25,7 +25,7 @@ class PatchtesterControllerPull extends JControllerLegacy
->apply(JFactory::getApplication()->input->getInt('pull_id'));
$msg = JText::_('COM_PATCHTESTER_APPLY_OK');
$type = 'success';
$type = 'message';
}
catch (Exception $e)
{
@ -44,7 +44,7 @@ class PatchtesterControllerPull extends JControllerLegacy
->revert(JFactory::getApplication()->input->getInt('pull_id'));
$msg = JText::_('COM_PATCHTESTER_REVERT_OK');
$type = 'success';
$type = 'message';
}
catch (Exception $e)
{

View File

@ -4,18 +4,18 @@
* Date: 08.09.12
* Time: 19:08
*
* @property-read PtGithubRepos $repos GitHub API object for repos.
* @property-read PTGithubRepos $repos GitHub API object for repos.
*/
class PtGithub extends JGithub
class PTGithub extends JGithub
{
/**
* @var PtGithubRepos
* @var PTGithubRepos
*/
protected $repos;
public static function getInstance(JRegistry $options = null, JGithubHttp $client = null)
{
return new PtGithub($options, $client);
return new PTGithub($options, $client);
}
public function __get($name)
@ -24,7 +24,7 @@ class PtGithub extends JGithub
{
if ($this->repos == null)
{
$this->repos = new PtGithubRepos($this->options, $this->client);
$this->repos = new PTGithubRepos($this->options, $this->client);
}
return $this->repos;

View File

@ -8,7 +8,7 @@
/**
* A.
*/
class PtGithubRepos extends JGithubObject
class PTGithubRepos extends JGithubObject
{
public function get($user, $repo)
{

View File

@ -91,6 +91,7 @@ class PatchtesterModelPull extends JModelLegacy
public function apply($id)
{
jimport('joomla.filesystem.file');
//@todo Use the JCurl class
// require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/curl.php';
@ -186,6 +187,8 @@ class PatchtesterModelPull extends JModelLegacy
public function revert($id)
{
jimport('joomla.filesystem.file');
$table = JTable::getInstance('tests', 'PatchTesterTable');
$table->load($id);

View File

@ -192,7 +192,7 @@ class PatchtesterModelPulls extends JModelList
//$repo = $g->repos->get('joomla', 'joomla-cms');
return PtGithub::getInstance()
return PTGithub::getInstance()
->repos->get('joomla', 'joomla-cms')
->open_issues_count;

View File

@ -18,8 +18,8 @@ if (!JFactory::getUser()->authorise('core.manage', 'com_patchtester'))
// Include dependencies
//jimport('joomla.application.component.controller');
JLoader::registerPrefix('Pt', __DIR__.'/helpers');
JLoader::registerPrefix('PT', __DIR__.'/helpers');
$controller = JControllerLegacy::getInstance('PatchTester');
$controller->execute(JRequest::getCmd('task'));
$controller->execute(JFactory::getApplication()->input->getCmd('task'));
$controller->redirect();