/** * Checks against the versions at partkeepr.org. * * If a newer version was found, create a system notice entry. */ public function doVersionCheck() { if ($this->getVersion() === "{V_GIT}") { return; } if (substr($this->getVersion(), 0, 17) === "partkeepr-nightly") { return; } $latestVersion = $this->getLatestVersion(); if ($latestVersion === false) { return; } if (version_compare($this->getVersion(), $latestVersion["version"], '<')) { $this->systemNoticeService->createUniqueSystemNotice("PARTKEEPR_VERSION_" . $latestVersion["version"], $this->translator->trans("New PartKeepr Version %version% available", array("%version%" => $latestVersion["version"])), $this->translator->trans("PartKeepr Version %version% changelog:", array("%version%" => $latestVersion["version"] . "\n\n" . $latestVersion["changelog"]))); } }
/** * Checks against the versions at partkeepr.org. * * If a newer version was found, create a system notice entry. */ public function doVersionCheck() { if ($this->getVersion() === '{V_GIT}') { return; } if (substr($this->getVersion(), 0, 17) === 'partkeepr-nightly') { return; } $latestVersion = $this->getLatestVersion(); if ($latestVersion === false) { return; } if (version_compare($this->getVersion(), $latestVersion['version'], '<')) { $this->systemNoticeService->createUniqueSystemNotice('PARTKEEPR_VERSION_' . $latestVersion['version'], $this->translator->trans('New PartKeepr Version %version% available', ['%version%' => $latestVersion['version']]), $this->translator->trans('PartKeepr Version %version% changelog:', ['%version%' => $latestVersion['version'] . "\n\n" . $latestVersion['changelog']])); } }