diff --git a/adminer/schema.inc.php b/adminer/schema.inc.php index f1c34e63..00252bfd 100644 --- a/adminer/schema.inc.php +++ b/adminer/schema.inc.php @@ -31,8 +31,8 @@ foreach (table_status() as $row) { foreach (foreign_keys($row["Name"]) as $val) { if (!$val["db"]) { $left = $base_left; - if ($table_pos[$row["Name"]][1] || $table_pos[$row["Name"]][1]) { - $left = min($table_pos[$row["Name"]][1], $table_pos[$val["table"]][1]) - 1; + if ($table_pos[$row["Name"]][1] || $table_pos[$val["table"]][1]) { + $left = min(floatval($table_pos[$row["Name"]][1]), floatval($table_pos[$val["table"]][1])) - 1; } else { $base_left -= .1; } diff --git a/adminer/static/editing.js b/adminer/static/editing.js index 1b85ffda..75fc26ab 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -394,6 +394,6 @@ function schemaMouseup(ev) { for (var key in tablePos) { s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000; } - document.cookie = 'adminer_schema=' + encodeURIComponent(s.substr(1)) + '; expires=' + date + '; path=' + location.pathname + location.search; + document.cookie = 'adminer_schema=' + encodeURIComponent(s.substr(1)) + '; expires=' + date + '; path="' + location.pathname + location.search + '"'; } }