added method PMA_getHtmlForColumnAutoIncrement
This commit is contained in:
parent
1f4373112d
commit
1294d34a01
@ -359,14 +359,9 @@ for ($i = 0; $i < $num_fields; $i++) {
|
||||
} // end if ($action ==...)
|
||||
|
||||
// column auto_increment
|
||||
$content_cells[$i][$ci] = '<input name="field_extra[' . $i . ']"'
|
||||
. ' id="field_' . $i . '_' . ($ci - $ci_offset) . '"';
|
||||
|
||||
if (isset($row['Extra']) && strtolower($row['Extra']) == 'auto_increment') {
|
||||
$content_cells[$i][$ci] .= ' checked="checked"';
|
||||
}
|
||||
|
||||
$content_cells[$i][$ci] .= ' type="checkbox" value="AUTO_INCREMENT" />';
|
||||
$content_cells[$i][$ci] = PMA_getHtmlForColumnAutoIncrement(
|
||||
$i, $ci, $ci_offset, $row
|
||||
);
|
||||
$ci++;
|
||||
|
||||
// column comments
|
||||
|
||||
@ -778,4 +778,27 @@ function PMA_getHtmlForColumnComment($i, $ci, $ci_offset, $row, $comments_map)
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function get html for column auto increment
|
||||
*
|
||||
* @param int $i field number
|
||||
* @param int $ci cell index
|
||||
* @param int $ci_offset cell index offset
|
||||
* @param array $row row
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function PMA_getHtmlForColumnAutoIncrement($i, $ci, $ci_offset, $row)
|
||||
{
|
||||
$html = '<input name="field_extra[' . $i . ']"'
|
||||
. ' id="field_' . $i . '_' . ($ci - $ci_offset) . '"';
|
||||
if (isset($row['Extra']) && strtolower($row['Extra']) == 'auto_increment') {
|
||||
$html .= ' checked="checked"';
|
||||
}
|
||||
|
||||
$html .= ' type="checkbox" value="AUTO_INCREMENT" />';
|
||||
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user