Menu

#453 (ok 3.2) missing code with hashing for relationship-editing

closed-accepted
None
1
2009-06-15
2009-03-01
knittl
No

you missed to add a few lines when adding the possibility to have closing brackets (]) in column names for relation view.

patch is attached:

diff --git a/phpMyAdmin/tbl_relation.php b/phpMyAdmin/tbl_relation.php
index 94f361f..e7743e6 100644
--- a/phpMyAdmin/tbl_relation.php
+++ b/phpMyAdmin/tbl_relation.php
@@ -93,10 +93,19 @@ if ($cfgRelation['displaywork']) {
}

// u p d a t e s f o r I n t e r n a l r e l a t i o n s
+$me_fields_name =
+ isset($_REQUEST['fields_name'])
+ ? $_REQUEST['fields_name']
+ : null;
+
if (isset($destination) && $cfgRelation['relwork']) {

- foreach ($destination as $master_field => $foreign_string) {
+ foreach ($destination as $master_field_md5 => $foreign_string) {
$upd_query = false;
+
+ // Map the fieldname's md5 back to it's real name
+ $master_field = $me_fields_name[$master_field_md5];
+
if (! empty($foreign_string)) {
$foreign_string = trim($foreign_string, '`');
list($foreign_db, $foreign_table, $foreign_field) =
@@ -138,11 +147,6 @@ if (isset($destination) && $cfgRelation['relwork']) {
// I use $sql_query to be able to display directly the query via
// PMA_showMessage()

-$me_fields_name =
- isset($_REQUEST['fields_name'])
- ? $_REQUEST['fields_name']
- : null;
-
if (isset($_REQUEST['destination_foreign'])) {
$display_query = '';
$seen_error = false;

Discussion

  • Marc Delisle

    Marc Delisle - 2009-03-02

    Moved to patches.

     
  • Marc Delisle

    Marc Delisle - 2009-03-02
    • milestone: 284140 -->
    • labels: 509096 -->
     
  • Marc Delisle

    Marc Delisle - 2009-03-03
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-03-03

    Good catch! Merged.

     
  • Marc Delisle

    Marc Delisle - 2009-03-03
    • priority: 5 --> 1
    • summary: missing code with hashing for relationship-editing --> (ok 3.2) missing code with hashing for relationship-editing
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2009-06-15
    • status: open-accepted --> closed-accepted
     
MongoDB Logo MongoDB