From: Nicolas Boisselier Date: Thu, 5 Sep 2024 21:59:14 +0000 (+0200) Subject: bin/dbq.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=550a44d0c3388cbcb8406b44d10836ab05a483d4;p=nb.git bin/dbq.php --- 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;