From 9dba0dd0a743e1d9695116068b7b2ceddfda8ae2 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 9 Apr 2002 16:40:28 +0000 Subject: [PATCH] bug 541440 --- ChangeLog | 4 ++++ libraries/display_tbl.lib.php3 | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7ce6bec3b..80492700d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-04-09 Marc Delisle + * libraries/display_tbl.lib.php3, bug 541440 (Relation feature + and blanks in the key), small modif to the patch thanks to Loïc + 2002-04-08 Marc Delisle * tbl_select.php3: to gain vertical space, reduce the size of the select box if the number of fields is < 10 diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index d53cfba50..8d855a884 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -967,6 +967,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ || (function_exists('is_null') && is_null($row[$pointer]))) { $vertical_display['data'][$foo][$i] = ' NULL' . "\n"; } else if ($row[$pointer] != '') { + // loic1: support blanks in the key + $relation_id = $row[$pointer]; + // loic1: Cut text/blob fields even if $cfgShowBlob is true if (eregi('BLOB', $meta->type)) { if (strlen($row[$pointer]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) { @@ -995,7 +998,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ . 'lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&table=' . urlencode($map[$meta->name][0]) . '&pos=0&session_max_rows=' . $session_max_rows . '&dontlimitchars=' . $dontlimitchars - . '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($map[$meta->name][0]) . ' WHERE ' . $map[$meta->name][1] . ' = \'' . $row[$pointer] . '\'') . '">' + . '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($map[$meta->name][0]) . ' WHERE ' . $map[$meta->name][1] . ' = \'' . addslashes($relation_id) . '\'') . '">' . $row[$pointer] . ''; } else { $vertical_display['data'][$foo][$i] .= $row[$pointer];