[9.2.27] Pb de mise à jour

This commit is contained in:
Fred Tempez 2020-04-02 21:30:54 +02:00
parent ab75b904a4
commit e726f446e4
1 changed files with 2 additions and 2 deletions

View File

@ -2635,11 +2635,11 @@ class layout extends common {
$lastAutoUpdate = mktime(0, 0, 0); $lastAutoUpdate = mktime(0, 0, 0);
if( $this->getData(['config','autoUpdate']) === true && if( $this->getData(['config','autoUpdate']) === true &&
$lastAutoUpdate > $this->getData(['core','lastAutoUpdate']) + 86400 ) { $lastAutoUpdate > $this->getData(['core','lastAutoUpdate']) + 86400 ) {
$this->setData(['core','lastAutoUpdate',$lastAutoUpdate]); $this->setData(['core','lastAutoUpdate',$lastAutoUpdate]);
$this->saveData();
if ( helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL) ) { if ( helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL) ) {
$rightItems .= '<li><a id="barUpdate" href="' . helper::baseUrl() . 'install/update" data-tippy-content="Mettre à jour Zwii '. common::ZWII_VERSION .' vers '. helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) .'">' . template::ico('update colorRed') . '</a></li>'; $rightItems .= '<li><a id="barUpdate" href="' . helper::baseUrl() . 'install/update" data-tippy-content="Mettre à jour Zwii '. common::ZWII_VERSION .' vers '. helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) .'">' . template::ico('update colorRed') . '</a></li>';
} }
$this->saveData();
} }
} }
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Configurer mon compte">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Configurer mon compte">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>';