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 wrap: on
line diff
--- a/s4-funcs.sh	Fri Jun 24 14:56:02 2016 +0859
+++ b/s4-funcs.sh	Fri Jun 24 21:38:07 2016 +0859
@@ -30,7 +30,7 @@
 file_accept='accept="image/*,text/*,audio/*,application/vnd.oasis.*,application/pdf,application/x-*"'
 
 tconfs=""
-imgcached=imgcache.`date +%Y/%m`
+imgcached=cache/img.`date +%Y/%m`
 conftbl=_tblconf
 nl="
 "
@@ -518,7 +518,7 @@
 }
 getcachedir() {  # $1=maintable
   if [ -n "$imgcached" ]; then
-    echo $tmpdir/$imgcached/$(echo ${1:-hoge}|md5)/$thumbxy
+    echo $imgcached/$(echo ${1:-hoge}|md5)/$thumbxy
   else
     echo $tmpd/$thumbxy
   fi
@@ -568,6 +568,7 @@
        return
      fi
    done
+   rowid=$3
    pk=`gettblpkey $1`
    key=`query "select $pk from $1 where rowid=$3;"`
    getkey="(select $pk from $1 where rowid=$3)"
@@ -1690,7 +1691,7 @@
 err name=$name owner=$ownerp lnk=$lnk
 err newlnk=$lnk
     icondir=$dir/$id
-    files=`getvalbyid $tbl profimg $id $icondir`
+    files=`getvalbyid $tbl profimg $id $dir`
     # Pick up only first icon
     echo "<div class=\"iconlist xy$thumbxy\"><p class=\"tag _$tag\">$tag</p>" \
 	| _m4 $tagconv

yatex.org