The branch, master has been updated via 386581bcb68c2754f99f42ee398a897351c6a12a (commit) from 02b9dc80089d3277f5c96d526d0b9fca8c189cb3 (commit)
- Log ----------------------------------------------------------------- commit 386581bcb68c2754f99f42ee398a897351c6a12a Author: Marc Delisle marc@infomarc.info Date: Sun Dec 19 05:42:40 2010 -0500
This is not a primary key but a row number
-----------------------------------------------------------------------
Summary of changes: 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 ef7cf2c..fd9c882 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); ?> -<input type="hidden" name="pk" value="<?php echo htmlspecialchars($pk); ?>" /> +<input type="hidden" name="rownumber" value="<?php echo htmlspecialchars($rownumber); ?>" /> <?php } else { - $pk_uri = ''; + $rownumber_param = ''; }
$gotopage = ''; @@ -65,7 +65,7 @@ if (is_array($foreignData['disp_row'])) { $gotopage = PMA_pageselector( 'browse_foreigners.php?field=' . urlencode($field) . '&' . PMA_generate_common_url($db, $table) - . $pk_uri . + . $rownumber_param . '&fieldkey=' . (isset($fieldkey) ? urlencode($fieldkey) : '') . '&foreign_filter=' . (isset($foreign_filter) ? urlencode($foreign_filter) : '') . '&', @@ -102,8 +102,8 @@ if (is_array($foreignData['disp_row'])) { if (opener && opener.document && opener.document.insertForm) { var field = 'fields';
- <?php if (isset($pk)) { ?> - var element_name = field + '[multi_edit][<?php echo htmlspecialchars($pk); ?>][' + fieldmd5 + ']'; + <?php if (isset($rownumber)) { ?> + var element_name = field + '[multi_edit][<?php echo htmlspecialchars($rownumber); ?>][' + fieldmd5 + ']'; <?php } else { ?> var element_name = field + '[]'; <?php } ?> @@ -141,8 +141,8 @@ if (is_array($foreignData['disp_row'])) { <input type="hidden" name="field" value="<?php echo htmlspecialchars($field); ?>" /> <input type="hidden" name="fieldkey" value="<?php echo isset($fieldkey) ? htmlspecialchars($fieldkey) : ''; ?>" /> -<?php if (isset($pk)) { ?> -<input type="hidden" name="pk" value="<?php echo htmlspecialchars($pk); ?>" /> +<?php if (isset($rownumber)) { ?> +<input type="hidden" name="rownumber" value="<?php echo htmlspecialchars($rownumber); ?>" /> <?php } ?> <span class="formelement"> <label for="input_foreign_filter"><?php echo __('Search') . ':'; ?></label> diff --git a/js/tbl_change.js b/js/tbl_change.js index 90d28fe..41aecd0 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 60f3bf5..eff5ead 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="<?php echo ($tabindex + $tabindex_for_value); ?>" id="field_<?php echo ($idindex); ?>_3" value="<?php echo htmlspecialchars($data); ?>" /> - <a class="hide foreign_values_anchor" target="_blank" onclick="window.open(this.href, 'foreigners', 'width=640,height=240,scrollbars=yes,resizable=yes'); return false;" href="browse_foreigners.php?<?php echo PMA_generate_common_url($db, $table); ?>&field=<?php echo PMA_escapeJsString(urlencode($field['Field']) . $browse_foreigners_uri); ?>"><?php echo str_replace("'", "\'", $titles['Browse']); ?></a> + <a class="hide foreign_values_anchor" target="_blank" onclick="window.open(this.href, 'foreigners', 'width=640,height=240,scrollbars=yes,resizable=yes'); return false;" href="browse_foreigners.php?<?php echo PMA_generate_common_url($db, $table); ?>&field=<?php echo PMA_escapeJsString(urlencode($field['Field']) . $rownumber_param); ?>"><?php echo str_replace("'", "\'", $titles['Browse']); ?></a> <?php } elseif (is_array($foreignData['disp_row'])) { echo $backup_field . "\n";
hooks/post-receive