s4

changeset 231:332092fa437e

Separate cachedir
author HIROSE Yuuji <yuuji@gentei.org>
date Fri, 24 Jun 2016 21:38:07 +0859
parents 67c8b9558572
children 4511cecade55
files s4-funcs.sh
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Fri Jun 24 14:56:02 2016 +0859
     1.2 +++ b/s4-funcs.sh	Fri Jun 24 21:38:07 2016 +0859
     1.3 @@ -30,7 +30,7 @@
     1.4  file_accept='accept="image/*,text/*,audio/*,application/vnd.oasis.*,application/pdf,application/x-*"'
     1.5  
     1.6  tconfs=""
     1.7 -imgcached=imgcache.`date +%Y/%m`
     1.8 +imgcached=cache/img.`date +%Y/%m`
     1.9  conftbl=_tblconf
    1.10  nl="
    1.11  "
    1.12 @@ -518,7 +518,7 @@
    1.13  }
    1.14  getcachedir() {  # $1=maintable
    1.15    if [ -n "$imgcached" ]; then
    1.16 -    echo $tmpdir/$imgcached/$(echo ${1:-hoge}|md5)/$thumbxy
    1.17 +    echo $imgcached/$(echo ${1:-hoge}|md5)/$thumbxy
    1.18    else
    1.19      echo $tmpd/$thumbxy
    1.20    fi
    1.21 @@ -568,6 +568,7 @@
    1.22         return
    1.23       fi
    1.24     done
    1.25 +   rowid=$3
    1.26     pk=`gettblpkey $1`
    1.27     key=`query "select $pk from $1 where rowid=$3;"`
    1.28     getkey="(select $pk from $1 where rowid=$3)"
    1.29 @@ -1690,7 +1691,7 @@
    1.30  err name=$name owner=$ownerp lnk=$lnk
    1.31  err newlnk=$lnk
    1.32      icondir=$dir/$id
    1.33 -    files=`getvalbyid $tbl profimg $id $icondir`
    1.34 +    files=`getvalbyid $tbl profimg $id $dir`
    1.35      # Pick up only first icon
    1.36      echo "<div class=\"iconlist xy$thumbxy\"><p class=\"tag _$tag\">$tag</p>" \
    1.37  	| _m4 $tagconv