@@ 1104-1129 (lines=26) @@ | ||
1101 | // Configured to 0 the 2.5.x series are not allowed. Configured to 1 it is allowed. |
|
1102 | $allow_25x = 1; |
|
1103 | ||
1104 | foreach ($releases as $release) |
|
1105 | { |
|
1106 | $tag_name = $release->tag_name; |
|
1107 | $tag_part = explode(".", $tag_name); |
|
1108 | $undoted = str_replace('.', '', $tag_name); |
|
1109 | $excluded = 0; |
|
1110 | ||
1111 | if ($tag_part[0] == '2' && $allow_25x == '0') |
|
1112 | { |
|
1113 | $excluded = 1; |
|
1114 | } |
|
1115 | elseif ($tag_part[0] != '3' && $tag_part[0] != '2') |
|
1116 | { |
|
1117 | // Exclude platforms or similar stuff. |
|
1118 | $excluded = 1; |
|
1119 | } |
|
1120 | ||
1121 | // Filtering also by "is_numeric" disable betas or similar releases. |
|
1122 | if (!in_array($tag_name, $versions) && is_numeric($undoted) && $excluded == 0) |
|
1123 | { |
|
1124 | $versions[] = $tag_name; |
|
1125 | JFactory::getApplication()->enqueueMessage( |
|
1126 | JText::sprintf('COM_LOCALISE_NOTICE_NEW_VERSION_DETECTED', $tag_name), |
|
1127 | 'notice'); |
|
1128 | } |
|
1129 | } |
|
1130 | } |
|
1131 | catch (Exception $e) |
|
1132 | { |
@@ 79-104 (lines=26) @@ | ||
76 | // Configured to 0 the 2.5.x series are not allowed. Configured to 1 it is allowed. |
|
77 | $allow_25x = 1; |
|
78 | ||
79 | foreach ($releases as $release) |
|
80 | { |
|
81 | $tag_name = $release->tag_name; |
|
82 | $tag_part = explode(".", $tag_name); |
|
83 | $undoted = str_replace('.', '', $tag_name); |
|
84 | $excluded = 0; |
|
85 | ||
86 | if ($tag_part[0] == '2' && $allow_25x == '0') |
|
87 | { |
|
88 | $excluded = 1; |
|
89 | } |
|
90 | elseif ($tag_part[0] != '3' && $tag_part[0] != '2') |
|
91 | { |
|
92 | // Exclude platforms or similar stuff. |
|
93 | $excluded = 1; |
|
94 | } |
|
95 | ||
96 | // Filtering also by "is_numeric" disable betas or similar releases. |
|
97 | if (!in_array($tag_name, $versions) && is_numeric($undoted) && $excluded == 0) |
|
98 | { |
|
99 | $versions[] = $tag_name; |
|
100 | JFactory::getApplication()->enqueueMessage( |
|
101 | JText::sprintf('COM_LOCALISE_NOTICE_NEW_VERSION_DETECTED', $tag_name), |
|
102 | 'notice'); |
|
103 | } |
|
104 | } |
|
105 | } |
|
106 | catch (Exception $e) |
|
107 | { |