]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 12 Jun 2018 13:31:46 +0000 (14:31 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 12 Jun 2018 13:31:46 +0000 (14:31 +0100)
bin/nb-run-parts
www/dbq/dbq.php

index 95e9d29b3d98a394c1f6dc3d40294320c1c96718..8d63549592c1d73e669f4b4084fc01dcf7c24b09 100755 (executable)
@@ -21,6 +21,9 @@ for script in $DIR/*; do
 
   log="$LOG_DIR/$name.log"
 
-  echo $name $script
+  cat <<EOF
+echo $$ > "$lock"
+$name $script > "$log"
+EOF
 
 done
index b8809b371203ade3dbfcb4b6c4fd3c594fd052a0..63f83c4aeec79ff44ac50e7a1f7ae90937a4b713 100644 (file)
@@ -393,10 +393,8 @@ class DbQ extends nb {
 
                        $this->db->__construct($connect);
                        $this->db->connect();
-                       $this->db->html_base = $this->base;
-                       $this->db->base = $this->base.'/'.$this->db->id;
-                       return $this->db;
-               }
+# NB 11.06.18                  return $this->db;
+               } else {
 
                // Re use
                if (!empty($this->db)) return $this->db;
@@ -411,7 +409,12 @@ class DbQ extends nb {
                }
 
                $this->db = new Db(['conf'=>$DB_CONFS]);
+               }
 
+               $this->db->html_base = $this->base;
+               #$this->db->base = ($this->base ? $this->base : '/').$this->db->id;
+               $this->db->base = $this->base . ($this->db->id ? '/' . $this->db->id : '');
+               #debug($this->db->base);
                return $this->db;
        }