From 701ecd5629baa6e5c190c8310f13c19c809c4978 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sun, 11 Dec 2016 02:56:00 +0000 Subject: [PATCH] dbq --- bin/nb-repo-dirs | 2 ++ etc/profile.d/envs | 9 ++++++--- etc/profile.d/functions | 6 ------ www/dbq/dbq.php | 17 +++++++++++++---- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/bin/nb-repo-dirs b/bin/nb-repo-dirs index e65bb3dd..570e9199 100755 --- a/bin/nb-repo-dirs +++ b/bin/nb-repo-dirs @@ -1,4 +1,6 @@ #!/usr/bin/env perl +# NB 24.11.16: TODEL +die 'TODEL'; ################################################################################# # # List Repositery directories - NB 17.01.16 diff --git a/etc/profile.d/envs b/etc/profile.d/envs index 2f3b1095..0bc3d210 100644 --- a/etc/profile.d/envs +++ b/etc/profile.d/envs @@ -73,7 +73,7 @@ case "$BASH" in */sh) SHELL_NAME=sh ;; */bash) SHELL_NAME=bash ;; *) - if ls --help 2>&1 | grep -qm1 ^BusyBox; then + if ls --help 2>&1 | /bin/grep -qm1 ^BusyBox; then SHELL_NAME="busybox" elif [ -n "$ZSH_NAME" ]; then SHELL_NAME=zsh @@ -133,7 +133,8 @@ fi ls_opt=' -F' ll_opt=' -alh' -if [ "$SHELL_NAME" != "busybox" ]; then +#if [ "$SHELL_NAME" != "busybox" ]; then +if ! ls --help 2>&1 | grep -qm1 ^BusyBox; then if [ -n "$DARWIN" ]; then [ "$color_prompt" = yes ] && ls_opt="$ls_opt -G" @@ -151,7 +152,9 @@ unset ls_opt ll_opt # # Alias grep # -[ "$SHELL_NAME" = "busybox" ] || alias grep='grep --color=auto' +if ! grep --help 2>&1 | grep -qm1 ^BusyBox; then + alias grep='grep --color=auto' +fi # # bye diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 89f52f5b..ca892113 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -4,11 +4,6 @@ # ################################################################################# nb_repo() { -# NB 24.11.16: TODEL -if false && which perl &> /dev/null; then - nb-repo-dirs $@ -else - [ -z "$FUNCNAME" ] && local FUNCNAME='nb_repo' if [ -z "$*" ]; then # Find repos @@ -61,7 +56,6 @@ else fi -fi } timeout() { diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 8ff3cdf5..3b136d43 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -207,18 +207,19 @@ table.rows th, table.rows td { border-color: '.$this->colors['body-border'].'; } $args = urlencode($args); $base = $this->table->base; - $r = ['@' => join(' ',[ - 'View' - ]) ] + $r; - $rm = $base.'rm/'.$args; $r['-'] = '' #'Delete' .'
' .'Delete' + .$this->form_hidden($r) .'
' ; + $r = ['@' => join(' ',[ + 'View' + ]) ] + $r; + }, ] : []; @@ -226,6 +227,14 @@ table.rows th, table.rows td { border-color: '.$this->colors['body-border'].'; } } + public static function form_hidden($r) { + $h = ''; + foreach ($r as $k => $v) { + $h .= ''; + } + return $h; + } + public function table() { if (!in_array($this->params['table'],array_keys($this->db->tables()))) { -- 2.47.3