diff s4-blog.sh @ 183:b641b5393c40

TEST: Put rowid of article for convenience to reference
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 01 Mar 2016 18:55:57 +0900
parents 45d6954af516
children 6f4fd4fadcfe
line wrap: on
line diff
--- a/s4-blog.sh	Tue Mar 01 11:59:54 2016 +0859
+++ b/s4-blog.sh	Tue Mar 01 18:55:57 2016 +0900
@@ -375,6 +375,7 @@
 	coalesce((SELECT val FROM user_s
 			 WHERE name=author AND key='gecos'),
 			author) uname,
+	a.rowid,
 	s.TIME,
 	hex(s.TEXT),
 	(SELECT group_concat(rowid||':'||length(bin)||':'||hex(val), ' ')
@@ -386,14 +387,14 @@
      a_s s
   ON a.id=s.id;
 EOF
-    while IFS='|' read id edit notify uid uname tm hte imgids; do
+    while IFS='|' read id edit notify uid uname aid tm hte imgids; do
       nt="<label style=\"font-size: 70%;\"><input type=\"checkbox\"
 	 name=\"notifyto\" value=\"$uid\">返信通知送信</label>"
       cat<<EOF |
 <tr id="$id">
 <td>${edit:+<a href="$elink+$edit">編集</a>}
 <a href="$hlink+$uid">$uname</a>
-$tm
+$tm #$aid
 ${notify:+$nt}</td><td>`echo "$hte"|unhexize|htmlescape`
 EOF
       sed -e "s|^href=\([-A-Za-z0-9,.:/~_%#&+?]*\)|<a &>\1</a>|"

yatex.org