function edit() { $response = $this->get_response(); $form = $response->form; if (!$form->get_errors() && $response->submit()) { $errors = array(); $message = array(); $storage_id = $this->response->html->request()->get('storage_id'); $storage_comment = $this->response->html->request()->get('storage_comment'); $storage = new storage(); $storage->get_instance_by_id($storage_id); $storage_comment = $response->html->request()->get('storage_comment'); $fields['storage_comment'] = htmlspecialchars($storage_comment); $storage->update($storage_id, $fields); $response->msg = sprintf($this->lang['msg'], $storage->name); } return $response; }