diff --git a/ChangeLog b/ChangeLog index 60e1839ec..b94e96289 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + rfe #854911 [interface] Grey out non applicable actions in structure + [interface] Allow to create new table from navigation frame (in light mode). + rfe #1025696 [browse] Add direct download of binary fields. +- [browse] Properly display NULL value for BLOB. 3.3.0.0 (not yet released) + rfe #2308632 [edit] Use hex for (var)binary fields, diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index e3bbfc3d7..4bc719f4f 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1276,55 +1276,59 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // TEXT fields type so we have to ensure it's really a BLOB $field_flags = PMA_DBI_field_flags($dt_result, $i); if (stristr($field_flags, 'BINARY')) { - // rajk - for blobstreaming + if (!isset($row[$i]) || is_null($row[$i])) { + $vertical_display['data'][$row_no][$i] = ' NULL' . "\n"; + } else { + // rajk - for blobstreaming - $bs_reference_exists = $allBSTablesExist = FALSE; + $bs_reference_exists = $allBSTablesExist = FALSE; - // load PMA configuration - $PMA_Config = $GLOBALS['PMA_Config']; + // load PMA configuration + $PMA_Config = $GLOBALS['PMA_Config']; - // if PMA configuration exists - if ($PMA_Config) { - // load BS variables - $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + // if PMA configuration exists + if ($PMA_Config) { + // load BS variables + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); - // if BS plugins exist - if ($pluginsExist) { - // load BS databases - $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + // if BS plugins exist + if ($pluginsExist) { + // load BS databases + $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); - // if BS db array and specified db string not empty and valid - if (!empty($bs_tables) && strlen($db) > 0) { - $bs_tables = $bs_tables[$db]; + // if BS db array and specified db string not empty and valid + if (!empty($bs_tables) && strlen($db) > 0) { + $bs_tables = $bs_tables[$db]; - if (isset($bs_tables)) { - $allBSTablesExist = TRUE; + if (isset($bs_tables)) { + $allBSTablesExist = TRUE; - // check if BS tables exist for given database - foreach ($bs_tables as $table_key=>$bs_tbl) - if (!$bs_tables[$table_key]['Exists']) { - $allBSTablesExist = FALSE; - break; - } + // check if BS tables exist for given database + foreach ($bs_tables as $table_key=>$bs_tbl) + if (!$bs_tables[$table_key]['Exists']) { + $allBSTablesExist = FALSE; + break; + } + } } } } - } - // if necessary BS tables exist - if ($allBSTablesExist) { - $bs_reference_exists = PMA_BS_ReferenceExists($row[$i], $db); - } + // if necessary BS tables exist + if ($allBSTablesExist) { + $bs_reference_exists = PMA_BS_ReferenceExists($row[$i], $db); + } - // if valid BS reference exists - if ($bs_reference_exists) { - $blobtext = PMA_BS_CreateReferenceLink($row[$i], $db); - } else { - $blobtext = PMA_handle_non_printable_contents('BLOB', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta, $_url_params); - } + // if valid BS reference exists + if ($bs_reference_exists) { + $blobtext = PMA_BS_CreateReferenceLink($row[$i], $db); + } else { + $blobtext = PMA_handle_non_printable_contents('BLOB', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta, $_url_params); + } - $vertical_display['data'][$row_no][$i] = ' ' . $blobtext . ''; - unset($blobtext); + $vertical_display['data'][$row_no][$i] = ' ' . $blobtext . ''; + unset($blobtext); + } // not binary: } else { if (!isset($row[$i]) || is_null($row[$i])) {