From 386581bcb68c2754f99f42ee398a897351c6a12a Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 19 Dec 2010 05:42:40 -0500 Subject: [PATCH] This is not a primary key but a row number --- browse_foreigners.php | 18 +++++++++--------- js/tbl_change.js | 4 ++-- tbl_change.php | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/browse_foreigners.php b/browse_foreigners.php index ef7cf2c74..fd9c882fc 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -39,13 +39,13 @@ if (isset($foreign_navig) && $foreign_navig == __('Show all')) { $foreignData = PMA_getForeignData($foreigners, $field, $override_total, isset($foreign_filter) ? $foreign_filter : '', $foreign_limit); -if (isset($pk)) { - $pk_uri = '&pk=' . urlencode($pk); +if (isset($rownumber)) { + $rownumber_param = '&rownumber=' . urlencode($rownumber); ?> - + - var element_name = field + '[multi_edit][][' + fieldmd5 + ']'; + + var element_name = field + '[multi_edit][][' + fieldmd5 + ']'; var element_name = field + '[]'; @@ -141,8 +141,8 @@ if (is_array($foreignData['disp_row'])) { - - + + diff --git a/js/tbl_change.js b/js/tbl_change.js index 90d28fef0..41aecd06b 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -430,10 +430,10 @@ $(document).ready(function() { .find('.foreign_values_anchor') .each(function() { $anchor = $(this); - var new_value = 'pk=' + new_row_index; + var new_value = 'rownumber=' + new_row_index; // needs improvement in case something else inside // the href contains this pattern - var new_href = $anchor.attr('href').replace(/pk=\d+/, new_value); + var new_href = $anchor.attr('href').replace(/rownumber=\d+/, new_value); $anchor.attr('href', new_href ); }); diff --git a/tbl_change.php b/tbl_change.php index 60f3bf552..eff5ead7c 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -285,7 +285,7 @@ foreach ($rows as $row_id => $vrow) { } $jsvkey = $row_id; - $browse_foreigners_uri = '&pk=' . $row_id; + $rownumber_param = '&rownumber=' . $row_id; $vkey = '[multi_edit][' . $jsvkey . ']'; $vresult = (isset($result) && is_array($result) && isset($result[$row_id]) ? $result[$row_id] : $result); @@ -659,7 +659,7 @@ foreach ($rows as $row_id => $vrow) { tabindex="" id="field__3" value="" /> - +