Skip to content

Commit 1873806

Browse files
author
Michael Babker
committed
Misc bug fixes
1 parent 227109e commit 1873806

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

administrator/components/com_patchtester/controllers/pull.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function apply()
2525
->apply(JFactory::getApplication()->input->getInt('pull_id'));
2626

2727
$msg = JText::_('COM_PATCHTESTER_APPLY_OK');
28-
$type = 'success';
28+
$type = 'message';
2929
}
3030
catch (Exception $e)
3131
{
@@ -44,7 +44,7 @@ public function revert()
4444
->revert(JFactory::getApplication()->input->getInt('pull_id'));
4545

4646
$msg = JText::_('COM_PATCHTESTER_REVERT_OK');
47-
$type = 'success';
47+
$type = 'message';
4848
}
4949
catch (Exception $e)
5050
{

administrator/components/com_patchtester/helpers/github/github.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
* Date: 08.09.12
55
* Time: 19:08
66
*
7-
* @property-read PtGithubRepos $repos GitHub API object for repos.
7+
* @property-read PTGithubRepos $repos GitHub API object for repos.
88
*/
9-
class PtGithub extends JGithub
9+
class PTGithub extends JGithub
1010
{
1111
/**
12-
* @var PtGithubRepos
12+
* @var PTGithubRepos
1313
*/
1414
protected $repos;
1515

1616
public static function getInstance(JRegistry $options = null, JGithubHttp $client = null)
1717
{
18-
return new PtGithub($options, $client);
18+
return new PTGithub($options, $client);
1919
}
2020

2121
public function __get($name)
@@ -24,7 +24,7 @@ public function __get($name)
2424
{
2525
if ($this->repos == null)
2626
{
27-
$this->repos = new PtGithubRepos($this->options, $this->client);
27+
$this->repos = new PTGithubRepos($this->options, $this->client);
2828
}
2929

3030
return $this->repos;

administrator/components/com_patchtester/helpers/github/repos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* A.
1010
*/
11-
class PtGithubRepos extends JGithubObject
11+
class PTGithubRepos extends JGithubObject
1212
{
1313
public function get($user, $repo)
1414
{

administrator/components/com_patchtester/models/pull.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ protected function parsePatch($patch)
9191

9292
public function apply($id)
9393
{
94+
jimport('joomla.filesystem.file');
9495
//@todo Use the JCurl class
9596
// require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/curl.php';
9697

@@ -186,6 +187,8 @@ public function apply($id)
186187

187188
public function revert($id)
188189
{
190+
jimport('joomla.filesystem.file');
191+
189192
$table = JTable::getInstance('tests', 'PatchTesterTable');
190193

191194
$table->load($id);

administrator/components/com_patchtester/models/pulls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function getTotal()
192192

193193
//$repo = $g->repos->get('joomla', 'joomla-cms');
194194

195-
return PtGithub::getInstance()
195+
return PTGithub::getInstance()
196196
->repos->get('joomla', 'joomla-cms')
197197
->open_issues_count;
198198

administrator/components/com_patchtester/patchtester.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
// Include dependencies
1919
//jimport('joomla.application.component.controller');
2020

21-
JLoader::registerPrefix('Pt', __DIR__.'/helpers');
21+
JLoader::registerPrefix('PT', __DIR__.'/helpers');
2222

2323
$controller = JControllerLegacy::getInstance('PatchTester');
24-
$controller->execute(JRequest::getCmd('task'));
24+
$controller->execute(JFactory::getApplication()->input->getCmd('task'));
2525
$controller->redirect();

0 commit comments

Comments
 (0)