Mercurial > hgrepos > hgweb.cgi > s4
comparison s4-funcs.sh @ 1027:f389a311a8d4 draft
Rename function name
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 06 Dec 2023 20:13:42 +0900 |
parents | a3ec2a73dd33 |
children | 6e24f1ecf13e |
comparison
equal
deleted
inserted
replaced
1026:a3ec2a73dd33 | 1027:f389a311a8d4 |
---|---|
4007 </div> <!-- dumptable --> | 4007 </div> <!-- dumptable --> |
4008 </div> <!-- for folding by check button (s4-funcs.sh:dumptable()) --> | 4008 </div> <!-- for folding by check button (s4-funcs.sh:dumptable()) --> |
4009 EOF | 4009 EOF |
4010 } | 4010 } |
4011 | 4011 |
4012 clean-orphaned() { | 4012 clean_orphaned() { |
4013 # This shoud be done by foreign_key rules, but some db lack them | 4013 # This shoud be done by foreign_key rules, but some db lack them |
4014 query<<-EOF | 4014 query<<-EOF |
4015 -- Find blogs that have no parent | 4015 -- Find blogs that have no parent |
4016 WITH orphanedblog AS ( | 4016 WITH orphanedblog AS ( |
4017 SELECT blog.id,val FROM blog JOIN blog_s bs | 4017 SELECT blog.id,val FROM blog JOIN blog_s bs |
4098 if [ x"$rm" = x"yes" ]; then | 4098 if [ x"$rm" = x"yes" ]; then |
4099 if [ x"$rm$cfm" = x"yesyes" ]; then | 4099 if [ x"$rm$cfm" = x"yesyes" ]; then |
4100 query "delete from $tbl where rowid=$rowid;" | 4100 query "delete from $tbl where rowid=$rowid;" |
4101 clearcachedir "$tbl/$rowid" | 4101 clearcachedir "$tbl/$rowid" |
4102 if [ x"$tbl" = x"grp" -o x"$tbl" = x"blog" ]; then | 4102 if [ x"$tbl" = x"grp" -o x"$tbl" = x"blog" ]; then |
4103 clean-orphaned | 4103 clean_orphaned |
4104 fi | 4104 fi |
4105 return 4 | 4105 return 4 |
4106 else | 4106 else |
4107 echo "消去確認のチェックがないので消さなかったの..." | html p | 4107 echo "消去確認のチェックがないので消さなかったの..." | html p |
4108 return 5 | 4108 return 5 |