Exemplo n.º 1
0
 /**
  * Editview: Edit the configuration parameters: value, comment, section
  */
 public function edit_configuration_action()
 {
     PageLayout::setTitle(_('Konfigurationsparameter editieren'));
     $field = Request::get('id');
     $value = Request::get('value');
     if (Request::isPost()) {
         CSRFProtection::verifyUnsafeRequest();
         if ($this->validateInput($field, $value)) {
             $section = Request::get('section_new') ?: Request::get('section');
             $comment = Request::get('comment');
             Config::get()->store($field, compact(words('value section comment')));
             $message = sprintf(_('Der Konfigurationseintrag "%s" wurde erfolgreich übernommen!'), $field);
             PageLayout::postMessage(MessageBox::success($message));
             $this->relocate('admin/configuration/configuration/' . $section);
         }
     }
     // set variables for view
     $this->config = ConfigurationModel::getConfigInfo($field);
     $this->allconfigs = ConfigurationModel::getConfig();
 }