s4

changeset 402:58c291b6a81f

Allow lshandoutall and gethandout on frozen board
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 30 Jan 2017 19:59:32 +0900
parents 6dc23f0b7279
children 3ea86fe63490
files s4-blog.sh
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/s4-blog.sh	Mon Jan 30 19:57:35 2017 +0900
     1.2 +++ b/s4-blog.sh	Mon Jan 30 19:59:32 2017 +0900
     1.3 @@ -395,7 +395,9 @@
     1.4  }
     1.5  lshandoutall() {
     1.6    # $1=rowid of blog
     1.7 -  if ! blog_writable $1 $user; then
     1.8 +  blog_writable $1 $user
     1.9 +  r=$?		# =0: writable, $BLOG_NOTMEM bit set => not member
    1.10 +  if [ $((rc & $BLOG_NOTMEM)) -gt 0 ] ; then
    1.11      echo "メンバー以外は利用できません。" | html p; return
    1.12    fi
    1.13    rowid=$(($1 + 0))
    1.14 @@ -501,7 +503,9 @@
    1.15  }
    1.16  gethandout() {
    1.17    # $1=rowid of blog
    1.18 -  if ! blog_writable $1 $user; then
    1.19 +  blog_writable $1 $user
    1.20 +  r=$?		# =0: writable, $BLOG_NOTMEM bit set => not member
    1.21 +  if [ $((rc & $BLOG_NOTMEM)) -gt 0 ] ; then
    1.22      echo "メンバー以外は利用できません。" | html p; return
    1.23    fi
    1.24    i=0