public function updateConfiguration() { if (!$this->request->exist('kanban-title-admin')) { $this->response->missingKanbanTitle(); return; } $kanban_is_activated = $this->getActivatedKanban(); $this->config_manager->updateConfiguration($this->project_id, $this->config_manager->scrumIsActivatedForProject($this->project_id), $kanban_is_activated, $this->config_manager->getScrumTitle($this->project_id), $this->getKanbanTitle()); if ($kanban_is_activated) { $this->first_kanban_creator->createFirstKanban(); } $this->response->kanbanConfigurationUpdated(); }
public function updateConfiguration() { $this->checkIfRequestIsValid(); if (!$this->request->getCurrentUser()->isAdmin($this->group_id)) { $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('global', 'perm_denied')); return; } switch ($this->request->get('activate-ad-component')) { case 'activate-scrum': $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_agiledashboard', 'scrum_activated')); $scrum_is_activated = 1; $kanban_is_activated = 0; break; case 'activate-kanban': $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_activated')); $scrum_is_activated = 0; $kanban_is_activated = 1; break; case 'activate-all': $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_agiledashboard', 'all_activated')); $scrum_is_activated = 1; $kanban_is_activated = 1; break; default: $this->notifyErrorAndRedirectToAdmin(); return; } $this->config_manager->updateConfiguration($this->group_id, $scrum_is_activated, $kanban_is_activated, $this->getScrumTitle(), $this->getKanbanTitle()); $this->redirectToAdmin(); }