diff --git a/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini b/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini index 7791b2e..f762f6a 100644 --- a/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini +++ b/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini @@ -11,3 +11,4 @@ COM_PATCHTESTER_FIELD_ORG_DESC="Github Username" COM_PATCHTESTER_FIELD_ORG_LABEL="Name of account on Github of which to monitor pull requests" COM_PATCHTESTER_FIELD_REPO_DESC="Github Repository" COM_PATCHTESTER_FIELD_REPO_LABEL="Name of repository on Github of which to monitor pull requests" +COM_PATCHTESTER_JOOMLACODE_ISSUE="Joomlacode Issue" diff --git a/administrator/components/com_patchtester/models/pulls.php b/administrator/components/com_patchtester/models/pulls.php index 4d25275..49e1b1f 100644 --- a/administrator/components/com_patchtester/models/pulls.php +++ b/administrator/components/com_patchtester/models/pulls.php @@ -55,8 +55,8 @@ class PatchtesterModelPulls extends JModelList $params = JComponentHelper::getParams('com_patchtester'); $this->setState('params', $params); - $this->setState('github_user', $params->get('org')); - $this->setState('github_repo', $params->get('repo')); + $this->setState('github_user', $params->get('org', 'joomla')); + $this->setState('github_repo', $params->get('repo', 'joomla-cms')); // List state information. parent::populateState('title', 'asc'); } @@ -100,6 +100,13 @@ class PatchtesterModelPulls extends JModelList $github = new JGithub(); $pulls = $github->pulls->getAll($this->getState('github_user'), $this->getState('github_repo')); usort($pulls, array($this, 'sortItems')); + + foreach ($pulls AS &$pull) + { + $matches = array(); + preg_match('#\[\#([0-9]+)\]#', $pull->title, $matches); + $pull->joomlacode_issue = isset($matches[1]) ? $matches[1] : 0; + } return $pulls; } diff --git a/administrator/components/com_patchtester/views/pulls/tmpl/default.php b/administrator/components/com_patchtester/views/pulls/tmpl/default.php index d6bf945..a449399 100644 --- a/administrator/components/com_patchtester/views/pulls/tmpl/default.php +++ b/administrator/components/com_patchtester/views/pulls/tmpl/default.php @@ -9,6 +9,7 @@ defined('_JEXEC') or die; JHtml::_('behavior.tooltip'); +JHtml::_('behavior.modal'); ?>