changeset 196:146f12edc26b

Cut too long titles within $dumpcollen chars.
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 24 Apr 2016 16:59:25 +0859
parents 40bef4883664
children d0a5ffc2cabf
files s4-funcs.sh
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/s4-funcs.sh	Sun Apr 24 16:49:15 2016 +0859
+++ b/s4-funcs.sh	Sun Apr 24 16:59:25 2016 +0859
@@ -1450,8 +1450,10 @@
   
   if [ x"$user" = x"$uname" ]; then
     # Display Most Recent Entry
+    shortval=${dumpcollen:+"substr(val, 0, $dumpcollen)"}
+    shortval=${shortval:-val}
     DT_SQL="SELECT b.rowid, ctime,
-       (SELECT val FROM blog_s WHERE key='title' AND id=b.id) title,
+       (SELECT $shortval FROM blog_s WHERE key='title' AND id=b.id) title,
        (SELECT gecos FROM gecoses
         WHERE name=(SELECT val FROM blog_s
                    WHERE key='owner' AND id=b.id)) owner

yatex.org