s4

changeset 731:33df7d50532e

Empty-repost workaround in EDIT mode added
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 01 Jun 2020 20:25:02 +0900
parents 2c0c25fc9f68
children 98702a1251cd
files s4-funcs.sh
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Mon Jun 01 19:31:36 2020 +0900
     1.2 +++ b/s4-funcs.sh	Mon Jun 01 20:25:02 2020 +0900
     1.3 @@ -3741,7 +3741,7 @@
     1.4  	書き込み直後のリロードなので上書きを回避します。
     1.5  	最新記事は末尾の「再読み込み」ボタンから見てください。
     1.6  	EOF
     1.7 -	err "Repost aid=$aid Browser=[$HTTP_USER_AGENT]"
     1.8 +	err "Repost aid=$aid Browser=[$HTTP_USER_AGENT] user=$user"
     1.9  	return 9			# STOP Duplicated posting
    1.10        fi
    1.11      fi
    1.12 @@ -3800,6 +3800,10 @@
    1.13  	      case `gettbl_coltype $tbl/$origcol` in
    1.14  		image|document|binary)
    1.15  		  file=$tmpd/`getparfilename $v`
    1.16 +		  if [ ! -s "$file" ]; then	# Maybe stupid REPOST
    1.17 +		    err "Empty REPOST by [$HTTP_USER_AGENT] user=$user"
    1.18 +		    continue
    1.19 +		  fi
    1.20  		  ## err type=file=$file
    1.21  		  [ -z "$file" ] && continue
    1.22  		  bn=`sqlquotestr "${file##*/}"`