diff --git a/Technical-Wiki.md b/Technical-Wiki.md index 87997c3..ecc07e5 100644 --- a/Technical-Wiki.md +++ b/Technical-Wiki.md @@ -76,7 +76,7 @@ $field = Array } ```` -Different number of records in listing and select choices: +* Different number of records in listing and select choices: ```` function selectLimitProcess() { return (isset($_GET["limit"]) ? $_GET["limit"] : "20"); @@ -88,3 +88,67 @@ Different number of records in listing and select choices: echo "\n"; } ```` + +* Enable Record View beside Edit link: +```` +--- adminer/include/functions.inc.php Mon Jan 25 04:02:41 2016 ++++ adminer/include/functions.inc.php Tue Feb 02 12:34:43 2016 +@@ -864,6 +864,7 @@ + } + $functions = (isset($_GET["select"]) || $reset ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field); + $attrs = " name='fields[$name]'"; ++ $attrs .= isset($_GET['viewonly']) ? " disabled='true'" : ""; + if ($field["type"] == "enum") { + echo nbsp($functions[""]) . "" . $adminer->editInput($_GET["edit"], $field, $attrs, $value); + } else { +@@ -1369,20 +1370,22 @@ + echo "\n"; + } + echo "

\n"; +- if ($fields) { +- echo "\n"; +- if (!isset($_GET["select"])) { +- echo "\n"; ++ if (!isset($_GET['viewonly'])) { ++ if ($fields) { ++ echo "\n"; ++ if (!isset($_GET["select"])) { ++ echo "\n"; ++ } ++ } ++ echo ($update ? "\n" ++ : ($_POST || !$fields ? "" : "\n") ++ ); ++ if (isset($_GET["select"])) { ++ hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"])); + } +- } +- echo ($update ? "\n" +- : ($_POST || !$fields ? "" : "\n") +- ); +- if (isset($_GET["select"])) { +- hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"])); + } + ?> + "> +--- adminer/select.inc.php Mon Jan 25 04:02:41 2016 ++++ adminer/select.inc.php Tue Feb 02 14:17:32 2016 +@@ -366,7 +366,10 @@ + } + $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key)); + } +- echo "" . (!$group && $select ? "" : "" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . ($is_group || information_schema(DB) ? "" : " " . lang('edit') . "")); ++ $edit_link_part = " " . lang('edit') . ""; ++ $view_link_part = " | " . lang('view') . ""; ++ ++ echo "" . (!$group && $select ? "" : "" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . ($is_group || information_schema(DB) ? "" : $edit_link_part . $view_link_part)); + + foreach ($row as $key => $val) { + if (isset($names[$key])) { +````