From 550a44d0c3388cbcb8406b44d10836ab05a483d4 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 5 Sep 2024 23:59:14 +0200 Subject: [PATCH] bin/dbq.php --- bin/dbq.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/dbq.php b/bin/dbq.php index 81ee0efc..2c1ff7f6 100755 --- a/bin/dbq.php +++ b/bin/dbq.php @@ -22,10 +22,12 @@ if (isset($GLOBALS['argv']) and count($GLOBALS['argv'])>1) { list($k,$v) = explode('=',trim($GLOBALS['argv'][$i])); if ($k == '__YAML__') { - #$str = file_get_contents($GLOBALS['argv'][$i+1]); $str = file_get_contents($v); - #bye($str); - $_GET = nb::yaml_decode($str)[0]; + $_GET = Nb::yaml_decode($str)[0]; + + } elseif ($k == '__JSON__') { + $str = file_get_contents($v); + $_GET = Nb::json_decode($str)[0]; } else { $_GET[$k]= $v; -- 2.47.3