--- /dev/null
+#!/usr/bin/env php
+<?php
+/**
+* @copyright (C) 2022 Nicolas Boisselier
+* @author Nicolas Boisselier nicolas.boisselier@gmail.com
+*
+* lib/php/db/dbq.php
+* Fix confusion between nb_api and bin/dbq
+* use instead directly what is used by nginx and do the query localy, otherwise just use curl
+*/
+require(realpath(dirname(__FILE__).'/../www/dbq/dbq.php'));
+?>
} else {
$user = Nb::user_infos('name');
+ return; # NB 09.12.22: Could not authenticate to LDAP server
$password = '';
}
" Command to check files per file types
"
" rows.fields=id,cmd_check
-">SHELL_REPLACE nb_api '/nb/meta/ls/key,val.vim_hash?cat=file.check&preff=%09&name=mimeCheck'
+" NB 10.12.22 ">ZSHELL_REPLACE nb_api '/nb/meta/ls/key,val.vim_hash?cat=file.check&preff=%09&name=mimeCheck'
+">SHELL_REPLACE dbq.php nb meta ls key,val cat=file.check format=vim_hash preff=$'\t' name=mimeCheck
let mimeCheck = {
\ 'awk' : 'awk < /dev/null --lint=no-ext --file'
\,'bash' : 'bash -c'
public function action($action,$table=null) {
#debug(($this->tables));
- $actions = explode(',',$action);
+ # NB 09.12.22: Test is action is defined (eg: from lib/php/db/dbq/php)
+ $actions = $action ? explode(',',$action) : [];
# NB 02.12.16 $this->pdef('format',($this->php_cli() ? 'csv' : ''));
$rows = [];
$return = false;
-<?php
#!/usr/bin/env php
+<?php
/**
* @copyright (C) 2016 Nicolas Boisselier
* @author Nicolas Boisselier nicolas.boisselier@gmail.com