diff s4-funcs.sh @ 392:be955399aec9

Owner should be taken via getvalbyid
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 05 Dec 2016 10:19:54 +0859
parents 554dc6669027
children cee8ffb43ae2
line wrap: on
line diff
--- a/s4-funcs.sh	Tue Nov 29 13:18:47 2016 +0859
+++ b/s4-funcs.sh	Mon Dec 05 10:19:54 2016 +0859
@@ -1515,7 +1515,7 @@
 		  	 	   WHERE user='$user'
 				    AND tblrowid=$blogreadflagrowid),
 				  "0");"`
-  cat<<EOF # | tee tmp/sql.out
+  cat<<EOF
 `sql4interestblogs`
 WITH article_ctime as (
  SELECT id,blogid,author,val ctime
@@ -1649,12 +1649,12 @@
     ## b is much smaller than a
     cat $tmpf | unhexize \
 	| tee $fifo \
-	| convert -define ${fmt}:size=${iconxy_M}x${iconxy_M} \
-		  -resize ${iconxy_M}x${iconxy_M}'>' - ${fmt}:- \
+	| convert -define ${fmt}:size=${iconxy_M} \
+		  -resize ${iconxy_M}'>' - ${fmt}:- \
 	| tee $fifo2 \
 	| convert - "$cacheimg_M" &
-    cat $fifo | convert -define ${fmt}:size=${iconxy_S}x${iconxy_S} \
-			-resize ${iconxy_S}x${iconxy_S}'>' - ${fmt}:- \
+    cat $fifo | convert -define ${fmt}:size=${iconxy_S} \
+			-resize ${iconxy_S}'>' - ${fmt}:- \
 	| convert - "$cacheimg_S" &
     printf '%s' "<img src=\"data:${filetype},"
     hexize "$fifo2" |sed 's/\(..\)/%\1/g' # Use medium as pre-cached image
@@ -2981,7 +2981,7 @@
       ##err p2t:grp:q $sql
       isgrpowner $user "`query $sql`" && rowowner=$user
     else
-      rowowner=`query "select owner from $tbl where rowid=$rowid;"`
+      rowowner=`getvalbyid $tbl owner "$rowid"`
       rowowner=${rowowner:-`query "select author from $tbl
 	 where rowid=$rowid;"`}
     fi

yatex.org