comparison s4.cgi @ 451:8965bdad3172

Add convenient link pattern [[#ArticleId]] for direct link to articles.
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 14 Aug 2017 12:32:36 +0859
parents 7b1c44bf12e8
children e8bde2d9cb0b
comparison
equal deleted inserted replaced
450:8023dbe45826 451:8965bdad3172
1 #!/bin/sh 1 #!/bin/sh
2 #!/bin/ksh 2 #!/bin/ksh
3 # 愛 3 # 愛
4 mydir=`dirname $0` 4 mydir=`dirname $0`
5 echo "1=[$1]" >> tmp/debug.out
5 . $mydir/s4-funcs.sh 6 . $mydir/s4-funcs.sh
6 7
7 cgiinit 8 cgiinit
8 if [ -z "$guestonlymode" ]; then 9 if [ -z "$guestonlymode" ]; then
9 if [ x"$1" = x"reg" ]; then 10 if [ x"$1" = x"reg" ]; then
21 # two or more arguments. 22 # two or more arguments.
22 set -- `echo "$@"|(IFS=+ read a b c d e f g; echo $a $b $c $d $e $f $g)` 23 set -- `echo "$@"|(IFS=+ read a b c d e f g; echo $a $b $c $d $e $f $g)`
23 ;; 24 ;;
24 esac 25 esac
25 26
26 # err 1=$1 2=$2 3=$3 4=$4 27 err "1=$1 2=$2 3=$3 4=$4"
27 stage=`getpar stage` 28 stage=`getpar stage`
28 stage=${stage:-$1} 29 stage=${stage:-$1}
29 case ${stage} in 30 case ${stage} in
30 home|"") 31 home|"")
31 contenttype; echo 32 contenttype; echo
64 ## err ROWid=$rowid, '$2'=$2 65 ## err ROWid=$rowid, '$2'=$2
65 . ./s4-blog.sh 66 . ./s4-blog.sh
66 err blog_reply2 $rowid 67 err blog_reply2 $rowid
67 blog_reply $rowid 68 blog_reply $rowid
68 ;; 69 ;;
70 aid[1-9]*)
71 arid=${1#aid}
72 arid=${arid%%[!0-9]*}
73 . ./s4-blog.sh
74 err b_r_a "$arid"
75 blog_reply_article "$arid"
76 ;;
69 reload*) # Dirty workaround for reloading page just after submit 77 reload*) # Dirty workaround for reloading page just after submit
70 newurl="$urlbase?replyblog+${stage#*/}#bottom" 78 newurl="$urlbase?replyblog+${stage#*/}#bottom"
71 echo "Refresh: 0; $newurl"; echo 79 echo "Refresh: 0; $newurl"; echo
72 exit 0 80 exit 0
73 ;; 81 ;;

yatex.org