Mercurial > hgrepos > hgweb.cgi > s4
changeset 796:8646ec4bd6fc feature-world
Load s4-config.sh earlier
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 14 Jun 2020 10:14:12 +0900 |
parents | 6164d88fbc0e |
children | 56adb6e5ee68 |
files | s4-funcs.sh s4-world.sh |
diffstat | 2 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Sun Jun 14 09:50:30 2020 +0900 +++ b/s4-funcs.sh Sun Jun 14 10:14:12 2020 +0900 @@ -2,6 +2,8 @@ # Here's global variable table. Do not use this names. # $HGid$ +[ -f s4-config.sh ] && . ./s4-config.sh + test -n "$HTTP_HOST" && isCGI=true || isCGI=false if $isCGI; then case "$SCRIPT_NAME" in @@ -15,9 +17,7 @@ worldconf=s4-config.sh ;; esac - echo worldconf=$worldconf >&2 - [ -f s4-config.sh ] && . ./s4-config.sh [ -n "$worldconf" -a -e "$worldconf" ] && . ./$worldconf echo DB=$DB >&2 fi @@ -1865,10 +1865,11 @@ if [ -z "$STOPCLONEMSG" ]; then ## Setup migration menu height="10em" ## Ugly!! - v=`fgrep -v "value=\"$worldconf\"" $worldoptionfile` - err v=$v - if [ -n "$v" ]; then - migrate=$(cat<<-EOF + if [ -n "$S4WORLDLIST" ]; then + v=`fgrep -v "value=\"$worldconf\"" $worldoptionfile` + err v=$v + if [ -n "$v" ]; then + migrate=$(cat<<-EOF `cgi_radio grpaction migrate id="migrate"`<label for="migrate">別Worldへ移住</label> <div style="height: $height;"> @@ -1887,7 +1888,8 @@ </form> </div> EOF - ) + ) + fi fi html div 'class="foldtabs"' <<-EOF `cgi_radio grpaction clone id="clone"`<label
--- a/s4-world.sh Sun Jun 14 09:50:30 2020 +0900 +++ b/s4-world.sh Sun Jun 14 10:14:12 2020 +0900 @@ -13,7 +13,7 @@ then echo S4MASTERURL=$S4MASTERURL >> tmp/debug.out cat <<-EOF > $worldlistfile - ${touchpanel:+ : ▼}<div><table> + ▼<div><table> <tr><th>World List</th></tr> <tr><td title="Base World$nl拠点となるWorldです">⇒ <a href="${S4MASTERURL:-$URL}">Base</a></td></tr>