]> git.nbdom.net Git - nb.git/commitdiff
dbq
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 11 Dec 2016 02:56:00 +0000 (02:56 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 11 Dec 2016 02:56:00 +0000 (02:56 +0000)
bin/nb-repo-dirs
etc/profile.d/envs
etc/profile.d/functions
www/dbq/dbq.php

index e65bb3dd674c62db32d9b0cddb30b57498f91d7e..570e919984a35d1fc8017b65017debd8d97facc3 100755 (executable)
@@ -1,4 +1,6 @@
 #!/usr/bin/env perl
+# NB 24.11.16: TODEL 
+die 'TODEL';
 #################################################################################
 #
 # List Repositery directories - NB 17.01.16
index 2f3b10950f8ffaa3bd06fc1eedc07e1a88a72997..0bc3d210696d466969d77b3a0d672f571f67b2da 100644 (file)
@@ -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
index 89f52f5b6a4d4cc74a5244c70dd82d2f24c177fe..ca89211341c1e66b6e60e1cc64cc10e24672fd1b 100644 (file)
@@ -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() {
index 8ff3cdf561a7db8f3abf9a93dedd799afde066a5..3b136d438cb92de734ce2b0f11049f86a556e91c 100644 (file)
@@ -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(' ',[
-          '<a class="button select" href="'.$base.'vi/'.$args.'">View</a>'
-        ]) ] + $r;
-
         $rm = $base.'rm/'.$args;
         $r['-'] = ''
           #'<a class="button delete" href="'.$this->table->name.'/rm/'.$args.'">Delete</a>'
           .'<form action="'.$rm.'" method="post">'
           .'<a class="button" href="'.$rm.'" onclick="parentNode.submit();return false;">Delete</a>'
+          .$this->form_hidden($r)
           .'</form>'
         ;
 
+        $r = ['@' => join(' ',[
+          '<a class="button select" href="'.$base.'vi/'.$args.'">View</a>'
+        ]) ] + $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 .= '<input type="hidden" name="'.htmlentities($k).'" value="'.htmlentities($v).'"/>';
+    }
+    return $h;
+  }
+
 
   public function table() {
     if (!in_array($this->params['table'],array_keys($this->db->tables()))) {