diff --git a/pmd/scripts/move.js b/pmd/scripts/move.js index 3f18f445c..b0e493057 100644 --- a/pmd/scripts/move.js +++ b/pmd/scripts/move.js @@ -483,7 +483,7 @@ function Start_relation() } if (!ON_relation) { - document.getElementById('InnoDB_relation').style.display = ''; + document.getElementById('foreign_relation').style.display = ''; ON_relation = 1; document.getElementById('hint').innerHTML = LangSelectReferencedKey; document.getElementById('hint').style.visibility = "visible"; @@ -506,16 +506,16 @@ function Click_field(T, f, PK) // table field alert(LangPleaseSelectPrimaryOrUniqueKey); return;// 0; }//PK - if (j_tabs[db + '.' + T] != 'INNODB') { - document.getElementById('InnoDB_relation').style.display = 'none'; + if (j_tabs[db + '.' + T] != '1') { + document.getElementById('foreign_relation').style.display = 'none'; } click_field = 1; link_relation = "T1=" + T + "&F1=" + f; document.getElementById('hint').innerHTML = LangSelectForeignKey; } else { Start_relation(); // hidden hint... - if (j_tabs[db + '.' + T] != 'INNODB' || !PK) { - document.getElementById('InnoDB_relation').style.display = 'none'; + if (j_tabs[db + '.' + T] != '1' || !PK) { + document.getElementById('foreign_relation').style.display = 'none'; } var left = Glob_X - (document.getElementById('layer_new_relation').offsetWidth>>1); document.getElementById('layer_new_relation').style.left = left + 'px'; diff --git a/pmd_common.php b/pmd_common.php index a95d2e06d..d52ee67ca 100644 --- a/pmd_common.php +++ b/pmd_common.php @@ -242,7 +242,7 @@ function get_script_tabs() 'var j_tabs = new Array();' . "\n"; for ($i = 0; $i < count($GLOBALS['PMD']['TABLE_NAME']); $i++) { $script_tabs .= "j_tabs['" . $GLOBALS['PMD_URL']['TABLE_NAME'][$i] . "'] = '" - . $GLOBALS['PMD']['TABLE_TYPE'][$i] . "';\n"; + . (PMA_foreignkey_supported($GLOBALS['PMD']['TABLE_TYPE'][$i]) ? '1' : '0') . "';\n"; } $script_tabs .= '// ]]>' . "\n" . diff --git a/pmd_general.php b/pmd_general.php index 5e6c4fe1c..35524e808 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -314,7 +314,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {