checkUserPrivileges->getPrivileges(); $column = $request->getParsedBodyParam('column'); $currValue = $request->getParsedBodyParam('curr_value'); $values = $this->sql->getValuesForColumn($GLOBALS['db'], $GLOBALS['table'], strval($column)); if ($values === null) { $this->response->addJSON('message', __('Error in processing request')); $this->response->setRequestStatus(false); return; } // Converts characters of $curr_value to HTML entities. $convertedCurrentValue = htmlentities(strval($currValue), ENT_COMPAT, 'UTF-8'); $dropdown = $this->template->render('sql/enum_column_dropdown', [ 'values' => $values, 'selected_values' => [$convertedCurrentValue], ]); $this->response->addJSON('dropdown', $dropdown); } }