]> git.joonet.de Git - adminer.git/commitdiff
Don't link NULL foreign key values
authorJakub Vrana <jakub@vrana.cz>
Sat, 11 Jan 2014 04:42:01 +0000 (20:42 -0800)
committerJakub Vrana <jakub@vrana.cz>
Sat, 11 Jan 2014 04:43:35 +0000 (20:43 -0800)
adminer/select.inc.php
changes.txt

index 1a070e1ad97aab77054354bc1e9eb83d61d82f74..2f1965e4ccec7dc803619a2daca6add9b2801d3a 100644 (file)
@@ -370,7 +370,7 @@ if (!$columns && support("table")) {
                                                if (preg_match('~blob|bytea|raw|file~', $field["type"]) && $val != "") {
                                                        $link = ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf;
                                                }
-                                               if (!$link) { // link related items
+                                               if (!$link && $val !== null) { // link related items
                                                        foreach ((array) $foreign_keys[$key] as $foreign_key) {
                                                                if (count($foreign_keys[$key]) == 1 || end($foreign_key["source"]) == $key) {
                                                                        $link = "";
index 683cc907210d759f49e30b218208319bcde88fbd..cc4f9acbd53165c7b7475fe1e1a8e219159ade2d 100644 (file)
@@ -3,6 +3,7 @@ Fix compiled version of Elasticsearch
 Don't use type=number if a SQL function is used
 Disable highlighting in textareas with long texts
 Don't autofocus SQL textarea in Firefox
+Don't link NULL foreign key values
 MongoDB: Count tables, display ObjectIds, sort, limit, offset, count rows
 Elasticsearch: Create and drop DB, drop table