]> git.nbdom.net Git - nb.git/commitdiff
bin/nb-update
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 23 Apr 2018 03:17:56 +0000 (04:17 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 23 Apr 2018 03:17:56 +0000 (04:17 +0100)
bin/nb-update
etc/nginx/inc/https-only.conf
lib/php/db.php

index 51034c3e3ad19edc73710ff78aef510c2c19a032..b015bca3662be3b8d6183b9d69fbf39f4627dd0b 100755 (executable)
@@ -118,6 +118,11 @@ for repo in $(nb_repos); do
 
   else
     cmd_root="true"
+    # NB 23.04.18: TODEL 
+    [ "$(git config --get remote.origin.url)" = "git@git.nbdom.net:root.git" ] && git remote set-url origin git.nbdom.net:/home/git/root.git
+    [ "$(git config --get remote.origin.url)" = "git@git.nbdom.net:nbdom.git" ] && git remote set-url origin git.nbdom.net:/home/git/nbdom.git
+    [ "$(git config --get remote.origin.url)" = "git@git.nbdom.net:pi.git" ] && git remote set-url origin git.nbdom.net:/home/git/pi.git
+
     [ -x bin/$name-install ] && cmd_root="$cmd_root && echo '  >$name-install' && bin/$name-install|sed 's/^/    /'"
     if [ "$cmd_root" != "true" ]; then
       eval "$cmd_root"
index 280ca455e93014f3025d34797c0c57a2546f5f65..519d40d76cec0622d55ee2ef05de91383c34e671 100644 (file)
@@ -1,9 +1,11 @@
 set $_https_only 0;
 if ( $scheme = http ) { set $_https_only 1; }
-# Live is behind a load balancer which do only http queries
-if ($http_x_forwarded_proto = "https") { set $_https_only 0; }
 
 if ( $https_only = "") { set $https_only ""; }
 if ( $https_only != "") { set $_https_only $https_only; }
 
+if ( $scheme = https ) { set $_https_only 0; }
+# Live is behind a load balancer which do only http queries
+if ($http_x_forwarded_proto = "https") { set $_https_only 0; }
+
 if ( $_https_only = 1 ) { return 301 https://$host$request_uri; }
index fcd911adfb5cd50d31e989c38e1fc05bea4ff988..48ae1df2d221af077c2a4f71e702182951ebeabb 100644 (file)
@@ -265,7 +265,7 @@ class Db extends nb {
                                #if (isset($this->pdo_error)) $this->conn->setAttribute($this->pdo_error[0], $this->pdo_error[1]);
 
                        } catch (PDOException $e) {
-                               $msg = 'Connection failed:';
+                               $msg = 'Database connection failed:';
 
                                foreach(['name','host','file'] as $p) {
                                        if (!empty($this->$p)) $msg .= " $p=".$this->$p;