]> git.joonet.de Git - adminer.git/commitdiff
foreign key link fix - added missing ns
authorJan Kalina <jkalina@redhat.com>
Fri, 15 Jul 2016 22:34:42 +0000 (00:34 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 19 Feb 2017 12:02:55 +0000 (13:02 +0100)
adminer/select.inc.php

index 20a335bcc1db0df7846e6ee9031a08d05c09e588..567f667d973c8aebe193ec11556501a4e6b3348f 100644 (file)
@@ -387,6 +387,9 @@ if (!$columns && support("table")) {
                                                                                $link .= where_link($i, $foreign_key["target"][$i], $rows[$n][$source]);
                                                                        }
                                                                        $link = ($foreign_key["db"] != "" ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), ME) : ME) . 'select=' . urlencode($foreign_key["table"]) . $link; // InnoDB supports non-UNIQUE keys
+                                                                       if ($foreign_key["ns"]) {
+                                                                               $link = preg_replace('~([?&]ns=)[^&]+~', '\\1' . urlencode($foreign_key["ns"]), $link);
+                                                                       }
                                                                        if (count($foreign_key["source"]) == 1) {
                                                                                break;
                                                                        }