From: Nicolas Boisselier Date: Wed, 11 Jan 2023 10:42:19 +0000 (+0100) Subject: default action X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=dff15202590c90a49ec2f63135db82b9565d6654;p=nb.git default action --- diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 84f86adc..7f3dbc9b 100755 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -130,15 +130,8 @@ nb_repos_ls() { } nb_repos_grep() { -# NB 11.09.18 local count=0 -# NB 11.09.18 local lines=100 nb_repos_ls_files | while read i; do -# NB 11.09.18 count=$(($count+1)) -# NB 11.09.18 if [ $count -gt $lines ]; then -# NB 11.09.18 count=0 -# NB 11.09.18 fi -# NB 11.09.18 echo "$count $i" - grep $@ "$i" + grep "$@" -HsI "$i" done } diff --git a/lib/php/db.php b/lib/php/db.php index c1a7b921..7eba7704 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -644,7 +644,8 @@ class Db extends nb { public function action($action,$table=null) { #debug(($this->tables)); # NB 09.12.22: Test is action is defined (eg: from lib/php/db/dbq.php) - $actions = $action ? explode(',',$action) : []; + $actions = $action ? explode(',',$action) : ['']; + # NB 11.01.23 need empty default action: $actions = $action ? explode(',',$action) : []; # NB 02.12.16 $this->pdef('format',($this->php_cli() ? 'csv' : '')); $rows = []; $return = false;