Diff of /adminer/select.inc.php [40ad84] .. [6591d4]  Maximize  Restore

  Switch to unified view

a/adminer/select.inc.php b/adminer/select.inc.php
...
...
284
            echo ($backward_keys ? "<th>" . lang('Relations') : "") . "</thead>\n";
284
            echo ($backward_keys ? "<th>" . lang('Relations') : "") . "</thead>\n";
285
            foreach ($adminer->rowDescriptions($rows, $foreign_keys) as $n => $row) {
285
            foreach ($adminer->rowDescriptions($rows, $foreign_keys) as $n => $row) {
286
                $unique_array = unique_array($rows[$n], $indexes);
286
                $unique_array = unique_array($rows[$n], $indexes);
287
                $unique_idf = "";
287
                $unique_idf = "";
288
                foreach ($unique_array as $key => $val) {
288
                foreach ($unique_array as $key => $val) {
289
                    $unique_idf .= "&" . (isset($val) ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
289
                    $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
290
                }
290
                }
291
                echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . (count($group) < count($select) || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "'>" . lang('edit') . "</a>"));
291
                echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . (count($group) < count($select) || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "'>" . lang('edit') . "</a>"));
292
                foreach ($row as $key => $val) {
292
                foreach ($row as $key => $val) {
293
                    if (isset($names[$key])) {
293
                    if (isset($names[$key])) {
294
                        $field = $fields[$key];
294
                        $field = $fields[$key];
...
...
349
                                );
349
                                );
350
                            }
350
                            }
351
                        }
351
                        }
352
                        $id = h("val[$unique_idf][" . bracket_escape($key) . "]");
352
                        $id = h("val[$unique_idf][" . bracket_escape($key) . "]");
353
                        $value = $_POST["val"][$unique_idf][bracket_escape($key)];
353
                        $value = $_POST["val"][$unique_idf][bracket_escape($key)];
354
                        $h_value = h(isset($value) ? $value : $row[$key]);
354
                        $h_value = h($value !== null ? $value : $row[$key]);
355
                        $long = strpos($val, "<i>...</i>");
355
                        $long = strpos($val, "<i>...</i>");
356
                        $editable = is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
356
                        $editable = is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
357
                        $text = ereg('text|lob', $field["type"]);
357
                        $text = ereg('text|lob', $field["type"]);
358
                        echo (($_GET["modify"] && $editable) || isset($value)
358
                        echo (($_GET["modify"] && $editable) || $value !== null
359
                            ? "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>")
359
                            ? "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>")
360
                            : "<td id='$id' ondblclick=\"" . ($editable ? "selectDblClick(this, event" . ($long ? ", 2" : ($text ? ", 1" : "")) . ")" : "alert('" . h(lang('Use edit link to modify this value.')) . "')") . ";\">" . $adminer->selectVal($val, $link, $field)
360
                            : "<td id='$id' ondblclick=\"" . ($editable ? "selectDblClick(this, event" . ($long ? ", 2" : ($text ? ", 1" : "")) . ")" : "alert('" . h(lang('Use edit link to modify this value.')) . "')") . ";\">" . $adminer->selectVal($val, $link, $field)
361
                        );
361
                        );
362
                    }
362
                    }
363
                }
363
                }