From: Nicolas Boisselier Date: Thu, 22 Dec 2016 01:56:56 +0000 (+0000) Subject: Bed X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=effc4eaeb1554e23dcd7a2b6b43fb14272e535fa;p=nb.git Bed --- diff --git a/etc/profile.d/dbq.sh b/etc/profile.d/dbq.sh index 0463ea24..21d483e9 100644 --- a/etc/profile.d/dbq.sh +++ b/etc/profile.d/dbq.sh @@ -1,4 +1,4 @@ -[ -z "$DBQ_HOST" ] && DBQ_HOST='db.nbdom.net' +which dbq > /dev/null || return 0 dbq2sqlite() { dbq f=txt a=db.dump db.type=sqlite $@ diff --git a/etc/profile.d/envs b/etc/profile.d/envs index 654a26b2..61402b38 100644 --- a/etc/profile.d/envs +++ b/etc/profile.d/envs @@ -4,6 +4,12 @@ # ################################################################################# +# +# APP +# +[ -z "$CLOUD_DIR" ] && [ -e ~nico/Dropbox ] && CLOUD_DIR=~nico/Dropbox +[ -z "$DBQ_HOST" ] && DBQ_HOST='db.nbdom.net' + # # BASE # @@ -12,13 +18,9 @@ [ -z "$UID" ] && UID=`id -u` [ -z "$USER" ] && USER=`whoami` [ -z "$OSTYPE" ] && OSTYPE=`uname|tr [:upper:] [:lower:]` -# NB 25.08.16 [ -z "PWD" ] && PWD=`pwd` - -# NB 10.12.16 [ -z "$CLOUD_DIR" ] && [ -e ~nico/ownCloud ] && CLOUD_DIR=~nico/ownCloud -[ -z "$CLOUD_DIR" ] && [ -e ~nico/Dropbox ] && CLOUD_DIR=~nico/Dropbox # > env_add_path -#We don't want to destroyed variables if function does not exists ! +# We don't want to destroyed variables if function does not exists ! if true || env_add_path 1>/dev/null; then # diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index c901af6b..65d829a1 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -581,6 +581,7 @@ document.addEventListener("DOMContentLoaded", function() { // Then content type if (empty($content_type)) $content_type = Mime::fromExt($format==self::CLI_FORMAT ? 'txt' : $format); + if (empty($content_type)) $content_type = 'text/plain'; if ($content_type) $this->page->content_type($content_type); }