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 diff
     1.1 --- a/s4-funcs.sh	Sun Jun 14 09:50:30 2020 +0900
     1.2 +++ b/s4-funcs.sh	Sun Jun 14 10:14:12 2020 +0900
     1.3 @@ -2,6 +2,8 @@
     1.4  # Here's global variable table.  Do not use this names.
     1.5  # $HGid$
     1.6  
     1.7 +[ -f s4-config.sh ] && . ./s4-config.sh
     1.8 +
     1.9  test -n "$HTTP_HOST" && isCGI=true || isCGI=false
    1.10  if $isCGI; then
    1.11    case "$SCRIPT_NAME" in
    1.12 @@ -15,9 +17,7 @@
    1.13        worldconf=s4-config.sh
    1.14        ;;
    1.15    esac
    1.16 -
    1.17    echo worldconf=$worldconf >&2
    1.18 -  [ -f s4-config.sh ] && . ./s4-config.sh
    1.19    [ -n "$worldconf" -a -e "$worldconf" ] && . ./$worldconf
    1.20    echo DB=$DB >&2
    1.21  fi
    1.22 @@ -1865,10 +1865,11 @@
    1.23    if [ -z "$STOPCLONEMSG" ]; then
    1.24      ## Setup migration menu
    1.25      height="10em"		## Ugly!!
    1.26 -    v=`fgrep -v "value=\"$worldconf\"" $worldoptionfile`
    1.27 -    err v=$v
    1.28 -    if [ -n "$v" ]; then
    1.29 -      migrate=$(cat<<-EOF
    1.30 +    if [ -n "$S4WORLDLIST" ]; then
    1.31 +      v=`fgrep -v "value=\"$worldconf\"" $worldoptionfile`
    1.32 +      err v=$v
    1.33 +      if [ -n "$v" ]; then
    1.34 +	migrate=$(cat<<-EOF
    1.35  	`cgi_radio grpaction migrate id="migrate"`<label
    1.36  	 for="migrate">別Worldへ移住</label>
    1.37  	<div style="height: $height;">
    1.38 @@ -1887,7 +1888,8 @@
    1.39  	</form>
    1.40  	</div>
    1.41  	EOF
    1.42 -	      )
    1.43 +	       )
    1.44 +      fi
    1.45      fi
    1.46      html div 'class="foldtabs"' <<-EOF
    1.47  	`cgi_radio grpaction clone id="clone"`<label
     2.1 --- a/s4-world.sh	Sun Jun 14 09:50:30 2020 +0900
     2.2 +++ b/s4-world.sh	Sun Jun 14 10:14:12 2020 +0900
     2.3 @@ -13,7 +13,7 @@
     2.4        then
     2.5  	echo S4MASTERURL=$S4MASTERURL >> tmp/debug.out
     2.6  	cat <<-EOF > $worldlistfile
     2.7 -	${touchpanel:+ : ▼}<div><table>
     2.8 +	 ▼<div><table>
     2.9  	 <tr><th>World List</th></tr>
    2.10  	 <tr><td title="Base World$nl拠点となるWorldです">&rArr;
    2.11  	  <a href="${S4MASTERURL:-$URL}">Base</a></td></tr>