Skip to content

Commit

Permalink
Correcting github references
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed Feb 19, 2018
1 parent 24245fc commit 1e40c13
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 11 deletions.
46 changes: 36 additions & 10 deletions component/admin/helpers/localise.php
Original file line number Diff line number Diff line change
Expand Up @@ -1110,23 +1110,49 @@ public static function getReleases()
$undoted = str_replace('.', '', $tag_name);
$excluded = 0;

if ($tag_part[0] == '2' && $allow_25x == '0')
if (version_compare(JVERSION, '2', 'eq'))
{
$excluded = 1;
}
elseif ($tag_part[0] != '3' && $tag_part[0] != '2')
elseif (version_compare(JVERSION, '3', 'eq'))
{
// Exclude platforms or similar stuff.
$excluded = 1;
if ($tag_part[0] != '3')
{
$excluded = 1;
}
}
elseif (version_compare(JVERSION, '4', 'ge'))
{
if ($tag_part[0] == '4' || $tag_part[0] == '3')
{
$excluded = 0;
}
else
{
$excluded = 1;
}
}

// Filtering also by "is_numeric" disable betas or similar releases.
if (!in_array($tag_name, $versions) && is_numeric($undoted) && $excluded == 0)
// Filtering by "is_numeric" disable betas or similar releases.
if ($params->get('pre_stable', '0') == '0')
{
$versions[] = $tag_name;
JFactory::getApplication()->enqueueMessage(
JText::sprintf('COM_LOCALISE_NOTICE_NEW_VERSION_DETECTED', $tag_name),
'notice');
if (!in_array($tag_name, $versions) && is_numeric($undoted) && $excluded == 0)
{
$versions[] = $tag_name;
JFactory::getApplication()->enqueueMessage(
JText::sprintf('COM_LOCALISE_NOTICE_NEW_VERSION_DETECTED', $tag_name),
'notice');
}
}
else
{
if (!in_array($tag_name, $versions) && $excluded == 0)
{
$versions[] = $tag_name;
JFactory::getApplication()->enqueueMessage(
JText::sprintf('COM_LOCALISE_NOTICE_NEW_VERSION_DETECTED', $tag_name),
'notice');
}
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion component/admin/models/fields/releases.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ protected function getOptions()
$undoted = str_replace('.', '', $tag_name);
$excluded = 0;

if (version_compare(JVERSION, '3', 'ge'))
if (version_compare(JVERSION, '2', 'eq'))
{
$excluded = 1;
}
elseif (version_compare(JVERSION, '3', 'eq'))
{
if ($tag_part[0] != '3')
{
Expand Down

0 comments on commit 1e40c13

Please sign in to comment.