public function versionCheck()
{
$cache = \System::getContainer()->get('contao.cache');
if (!$cache->contains('latest-version')) {
return '';
}
$strVersion = $cache->fetch('latest-version');
if ($strVersion && version_compare(VERSION . '.' . BUILD, $strVersion, '<')) {
$this->import('BackendUser', 'User');
if ($this->User->hasAccess('maintenance', 'modules')) {
return '<p class="tl_new"><a href="contao/main.php?do=maintenance">' . sprintf($GLOBALS['TL_LANG']['MSC']['updateVersion'], $strVersion) . '</a></p>';
} else {
return '<p class="tl_new">' . sprintf($GLOBALS['TL_LANG']['MSC']['updateVersion'], $strVersion) . '</p>';
}
}
return '';
}