mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Link routines from syntax highlighting
This commit is contained in:
@@ -150,13 +150,13 @@ function select_input(string $attrs, array $options, ?string $value = "", string
|
||||
* @param string $key or "" to close the object
|
||||
* @param string|int $val
|
||||
*/
|
||||
function json_row(string $key, $val = null): void {
|
||||
function json_row(string $key, $val = null, bool $escape = true): void {
|
||||
static $first = true;
|
||||
if ($first) {
|
||||
echo "{";
|
||||
}
|
||||
if ($key != "") {
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? ($escape ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : $val) : 'null');
|
||||
$first = false;
|
||||
} else {
|
||||
echo "\n}\n";
|
||||
|
Reference in New Issue
Block a user