11506 optimisation mise à jour en ligne
This commit is contained in:
parent
de9c235275
commit
61c14b4189
|
@ -2078,14 +2078,17 @@ class common {
|
||||||
|
|
||||||
// Mise à jour automatique
|
// Mise à jour automatique
|
||||||
$today = mktime(0, 0, 0);
|
$today = mktime(0, 0, 0);
|
||||||
// Une mise à jour est disponible + recherche auto activée + 1 jour de délais
|
$checkUpdate = (int) $this->getData(['core','lastAutoUpdate']);
|
||||||
if ( $this->getData(['config','autoUpdate']) === true
|
// Recherche d'une mise à jour si active, si une mise à jour n'est pas déjà disponible et le délais journalier est dépassé.
|
||||||
AND $today > $this->getData(['core','lastAutoUpdate']) + 86400 ) {
|
if (
|
||||||
if ( helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL) ) {
|
$this->getData(['config','autoUpdate']) === true
|
||||||
$this->setData(['core','updateAvailable', true]);
|
AND $this->getData(['core','updateAvailable']) === false
|
||||||
|
AND $today > $checkUpdate + 86400
|
||||||
|
) {
|
||||||
|
$this->setData(['core','updateAvailable', helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL)]);
|
||||||
|
}
|
||||||
|
// Dernier auto controle
|
||||||
$this->setData(['core','lastAutoUpdate',$today]);
|
$this->setData(['core','lastAutoUpdate',$today]);
|
||||||
}
|
|
||||||
}
|
|
||||||
// Afficher le bouton : Mise à jour détectée + activée
|
// Afficher le bouton : Mise à jour détectée + activée
|
||||||
if ( $this->getData(['core','updateAvailable']) === true &&
|
if ( $this->getData(['core','updateAvailable']) === true &&
|
||||||
$this->getData(['config','autoUpdate']) === true ) {
|
$this->getData(['config','autoUpdate']) === true ) {
|
||||||
|
|
Loading…
Reference in New Issue