Exemplo n.º 1
0
 public function renderDefault()
 {
     $this->template->badPath = FALSE;
     try {
         $this->template->avJars = $this->gameUpdater->getAvailableJars($this->path);
         $this->template->maxJars = $this->configModel['update']['number'] <= count($this->template->avJars);
     } catch (UnexpectedValueException $e) {
         $this->flashMessage('Máte špatně nastavenou cestu!', 'error');
         $this->template->badPath = TRUE;
     }
     $exec = $this->serverRepo->getRunParams($this->selectedServerId)->executable;
     $this->template->active = $this->gameUpdater->getVersionFromFileName($exec);
 }
Exemplo n.º 2
0
 public function handleRestoreBackup($file)
 {
     $executable = $this->serverRepo->getRunParams($this->selectedServerId)->executable;
     if ($this->backupModel->restore($this->path, $file, $this->runtimeHash, $executable)) {
         $this->flashMessage('Obnova úspěšná.', 'success');
     } else {
         $this->flashMessage('Něco se nepovedlo :/ ' . $file, 'error');
     }
     if ($this->isAjax()) {
         $this->redrawControl();
     } else {
         $this->redirect('this');
     }
 }