added method PMA_getHtmlForBrowserTransformation

This commit is contained in:
Spun Nakandala 2013-08-05 21:32:17 +05:30
parent 90c16952b0
commit 08e3b43e0e
2 changed files with 28 additions and 8 deletions

View File

@ -370,14 +370,9 @@ for ($i = 0; $i < $num_fields; $i++) {
$ci++;
// column comments
$content_cells[$i][$ci] = '<input id="field_' . $i . '_' . ($ci - $ci_offset)
. '"' . ' type="text" name="field_comments[' . $i . ']" size="12"'
. ' value="' . (isset($row['Field'])
&& is_array($comments_map)
&& isset($comments_map[$row['Field']])
? htmlspecialchars($comments_map[$row['Field']])
: '') . '"'
. ' class="textfield" />';
$content_cells[$i][$ci] = PMA_getHtmlForColumnComment(
$i, $ci, $ci_offset, isset($row) ? $row : null, $comments_map
);
$ci++;
// move column

View File

@ -753,4 +753,29 @@ function PMA_getHtmlForMoveColumn($i, $ci, $ci_offset, $move_columns, $row)
return $html;
}
/**
* Function to get html for column comment
*
* @param int $i field number
* @param int $ci cell index
* @param int $ci_offset cell index offset
* @param array $row row
* @param array $comments_map comments map
*
* @return string
*/
function PMA_getHtmlForColumnComment($i, $ci, $ci_offset, $row, $comments_map)
{
$html = '<input id="field_' . $i . '_' . ($ci - $ci_offset)
. '"' . ' type="text" name="field_comments[' . $i . ']" size="12"'
. ' value="' . (isset($row['Field'])
&& is_array($comments_map)
&& isset($comments_map[$row['Field']])
? htmlspecialchars($comments_map[$row['Field']])
: '') . '"'
. ' class="textfield" />';
return $html;
}
?>