]> git.plutz.net Git - busy/blobdiff - constants.sh
upgraded to fit new shcgi revision, slightly better input validation, switched to...
[busy] / constants.sh
index 2636e0bd0a5cb8d6aaa1ef48d566896143d549d4..76129395f75e1e28e8dc6a59de4f4978d9b7ef99 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/zsh
 
 #!/bin/zsh
 
-# Copyright 2014 Paul Hänsch
+# Copyright 2014,2015 Paul Hänsch
 #
 # This file is part of Confetti.
 # 
 #
 # This file is part of Confetti.
 # 
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
+data_dirs Home Tasks Wiki QRcodes
+
 umask=002
 #alias _wiki="stx2any --no-template --link-abbrevs --quote -T html"
 _wiki(){
 umask=002
 #alias _wiki="stx2any --no-template --link-abbrevs --quote -T html"
 _wiki(){
-  markdown $* |sed -r 's:<(h[1-6])>(.+)</h[1-6]>:<\1><a name="\2">\2</a></\1>:g'
+  #markdown $* |sed -r 's:<(h[1-6])>(.+)</h[1-6]>:<\1><a name="\2">\2</a></\1>:g'
+  pandoc -f markdown -t html "$@" |sed -r 's:<(h[1-6])>(.+)</h[1-6]>:<\1><a name="\2">\2</a></\1>:g'
 }
 
 LOGIN=false
 USER="#NONE#"
 }
 
 LOGIN=false
 USER="#NONE#"
-_GET["p"]=Home
+[ -z "${_GET[p]}" ] && _GET[p]=Home
 
 sessfile="$_DATA/auth/session$(sed -rn 's:^.*session=([a-zA-Z0-9]{32}).*$:\1:p' <<<"$HTTP_COOKIE")"
 if [ -r "$sessfile" ]; then
 
 sessfile="$_DATA/auth/session$(sed -rn 's:^.*session=([a-zA-Z0-9]{32}).*$:\1:p' <<<"$HTTP_COOKIE")"
 if [ -r "$sessfile" ]; then