mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-23 07:08:33 +00:00
Misc bug fixes
This commit is contained in:
parent
227109ed4b
commit
18738067f1
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -8,7 +8,7 @@
|
||||
/**
|
||||
* A.
|
||||
*/
|
||||
class PtGithubRepos extends JGithubObject
|
||||
class PTGithubRepos extends JGithubObject
|
||||
{
|
||||
public function get($user, $repo)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user