Example #1
0
 /**
  * handle a process of activation of configuration
  * @return void
  */
 public function handleActivate()
 {
     if (!$this->user->isAllowed("config", "edit")) {
         $this->flashMessage(_("You are not allowed to do this action."), "danger");
         $this->redirect("this");
     }
     $acrNemaPath = $this->pacsAdmin->getConfig()["pacsPath"] . $this->model->getConfig()["configFile"];
     try {
         $this->model->activateConfig($acrNemaPath);
         $result = $this->pacsAdmin->restart();
         $this->flashMessage(_("Configuration was activated.") . " " . $result, "success");
         $this->redirect("this");
     } catch (RemoteNodesException $exc) {
         $this->flashMessage($exc->getMessage(), "danger");
         $this->redirect("this");
     }
     return;
 }