public function isSecurityUpdateAvailable() {
$thisVersion = $this->getReleaseInfo($this->localVersion);
$localVersionDate = CRM_Utils_Array::value('date', $thisVersion, 0);
- foreach ($this->versionInfo as $majorVersion) {
+ // If not defined we will get an e-notice. That seems OK....
+ $isLTS = $this->versionInfo[$this->localMajorVersion]['status'] === 'lts' ? TRUE : FALSE;
+
+ foreach ($this->versionInfo as $majorVersionNumber => $majorVersion) {
foreach ($majorVersion['releases'] as $release) {
if (!empty($release['security']) && $release['date'] > $localVersionDate
&& version_compare($this->localVersion, $release['version']) < 0
) {
- if (!$this->ignoreDate || $this->ignoreDate < $release['date']) {
+ if ((!$this->ignoreDate || $this->ignoreDate < $release['date'])
+ && (!$isLTS || $majorVersionNumber === $this->localMajorVersion)
+ ) {
return TRUE;
}
}