コード例 #1
0
 /**
  * Function checking if new okovision version is available
  * 
  * @return json 
  */
 public function checkUpdate()
 {
     $r = array();
     $r['newVersion'] = false;
     $r['information'] = '';
     $this->addOkoStat();
     $update = new AutoUpdate();
     $update->setCurrentVersion($this->getCurrentVersion());
     if ($update->checkUpdate() === false) {
         $r['information'] = session::getInstance()->getLabel('lang.error.maj.information');
     } elseif ($update->newVersionAvailable()) {
         $r['newVersion'] = true;
         $r['list'] = $update->getVersionsInformationToUpdate();
     } else {
         $r['information'] = session::getInstance()->getLabel('lang.valid.maj.information');
     }
     return $this->sendResponse($r);
 }