From bc01b8cb75b3cf79faa810a4bd2eedc142755eee Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Tue, 5 Aug 2003 17:48:36 +0000 Subject: [PATCH] Insert - swap order --- ChangeLog | 1 + tbl_change.php3 | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d4b8c5d3..f83188fb2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ $Source$ (Bug #782966) * tbl_change.php3: RFE #772991: Shorten dropdown field using $cfg['LimitChars'] + * tbl_change.php3: RFE #762221: Swap relational insert key order 2003-08-05 Michal Cihar * sql.php3: Fixed regular expression. diff --git a/tbl_change.php3 b/tbl_change.php3 index 415096691..29e088d35 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -438,26 +438,38 @@ for ($i = 0; $i < $fields_cnt; $i++) { array(), 'id-content' => array()); while ($relrow = @PMA_mysql_fetch_array($disp)) { $key = $relrow[$foreign_field]; if (strlen($relrow[$foreign_display]) <= $cfg['LimitChars']) { - $value = (($foreign_display != FALSE) ? ' - ' . htmlspecialchars($relrow[$foreign_display]) : ''); + $value = (($foreign_display != FALSE) ? htmlspecialchars($relrow[$foreign_display]) : ''); $vtitle = ''; } else { $vtitle = htmlspecialchars($relrow[$foreign_display]); - $value = (($foreign_display != FALSE) ? ' - ' . htmlspecialchars(substr($vtitle, 0, $cfg['LimitChars']) . '...') : ''); + $value = (($foreign_display != FALSE) ? htmlspecialchars(substr($vtitle, 0, $cfg['LimitChars']) . '...') : ''); } - echo ' ' . "\n"; + + $reloptions['id-content'][] = $reloption . '>' . $value . ' - ' . htmlspecialchars($key) . '' . "\n"; + $reloptions['content-id'][] = $reloption . '>' . htmlspecialchars($key) . ' - ' . $value . '' . "\n"; } // end while + + if (count($reloptions['content-id']) < 100) { + echo implode('', $reloptions['content-id']); + if (count($reloptions['content-id']) > 0) { + echo ' ' . "\n"; + echo ' ' . "\n"; + } + } + echo implode('', $reloptions['id-content']); echo ' ' . "\n"; echo ' ' . "\n"; unset($disp);