/**
* Function to set a column property
*
* @param Table $pmatable Table instance
* @param string $request_index col_order|col_visib
*
* @return boolean $retval
*/
function PMA_setColumnProperty($pmatable, $request_index)
{
$property_value = explode(',', $_REQUEST[$request_index]);
switch ($request_index) {
case 'col_order':
$property_to_set = Table::PROP_COLUMN_ORDER;
break;
case 'col_visib':
$property_to_set = Table::PROP_COLUMN_VISIB;
break;
default:
$property_to_set = '';
}
$retval = $pmatable->setUiProp($property_to_set, $property_value, $_REQUEST['table_create_time']);
if (gettype($retval) != 'boolean') {
$response = PMA\libraries\Response::getInstance();
$response->setRequestStatus(false);
$response->addJSON('message', $retval->getString());
exit;
}
return $retval;
}