bug #3442028 [edit] Inline editing enum fields with null shows no dropdown
This commit is contained in:
@@ -2,6 +2,7 @@ phpMyAdmin - ChangeLog
|
|||||||
======================
|
======================
|
||||||
|
|
||||||
3.4.9.0 (not yet released)
|
3.4.9.0 (not yet released)
|
||||||
|
- bug #3442028 [edit] Inline editing enum fields with null shows no dropdown
|
||||||
|
|
||||||
3.4.8.0 (not yet released)
|
3.4.8.0 (not yet released)
|
||||||
- bug #3425230 [interface] enum data split at space char (more space to edit)
|
- bug #3425230 [interface] enum data split at space char (more space to edit)
|
||||||
|
@@ -996,14 +996,16 @@ function PMA_buildValueDisplay($class, $condition_field, $value) {
|
|||||||
/**
|
/**
|
||||||
* Prepares the display for a null value
|
* Prepares the display for a null value
|
||||||
*
|
*
|
||||||
* @param string $class
|
* @param string $class class of table cell
|
||||||
* @param string $condition_field
|
* @param bool $condition_field whether to add CSS class condition
|
||||||
|
* @param object $meta the meta-information about this field
|
||||||
|
* @param string $align cell allignment
|
||||||
*
|
*
|
||||||
* @return string the td
|
* @return string the td
|
||||||
*/
|
*/
|
||||||
function PMA_buildNullDisplay($class, $condition_field) {
|
function PMA_buildNullDisplay($class, $condition_field, $meta, $align = '') {
|
||||||
// the null class is needed for inline editing
|
// the null class is needed for inline editing
|
||||||
return '<td align="right"' . ' class="' . $class . ($condition_field ? ' condition' : '') . ' null"><i>NULL</i></td>';
|
return '<td ' . $align . ' class="' . PMA_addClass($class, $condition_field, $meta, '') . ' null"><i>NULL</i></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1359,7 +1361,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
// so use the $pointer
|
// so use the $pointer
|
||||||
|
|
||||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field, $meta, 'align="right"');
|
||||||
} elseif ($row[$i] != '') {
|
} elseif ($row[$i] != '') {
|
||||||
|
|
||||||
$nowrap = ' nowrap';
|
$nowrap = ' nowrap';
|
||||||
@@ -1382,7 +1384,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
|
|
||||||
if (stristr($field_flags, 'BINARY')) {
|
if (stristr($field_flags, 'BINARY')) {
|
||||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field, $meta);
|
||||||
} else {
|
} else {
|
||||||
// for blobstreaming
|
// for blobstreaming
|
||||||
// if valid BS reference exists
|
// if valid BS reference exists
|
||||||
@@ -1398,7 +1400,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
// not binary:
|
// not binary:
|
||||||
} else {
|
} else {
|
||||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field, $meta);
|
||||||
} elseif ($row[$i] != '') {
|
} elseif ($row[$i] != '') {
|
||||||
// if a transform function for blob is set, none of these replacements will be made
|
// if a transform function for blob is set, none of these replacements will be made
|
||||||
if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['tmp_user_values']['display_text'] == 'P') {
|
if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['tmp_user_values']['display_text'] == 'P') {
|
||||||
@@ -1426,7 +1428,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
// n o t n u m e r i c a n d n o t B L O B
|
// n o t n u m e r i c a n d n o t B L O B
|
||||||
} else {
|
} else {
|
||||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||||
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field);
|
$vertical_display['data'][$row_no][$i] = PMA_buildNullDisplay($class, $condition_field, $meta);
|
||||||
} elseif ($row[$i] != '') {
|
} elseif ($row[$i] != '') {
|
||||||
// support blanks in the key
|
// support blanks in the key
|
||||||
$relation_id = $row[$i];
|
$relation_id = $row[$i];
|
||||||
|
Reference in New Issue
Block a user