s4

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 diff
     1.1 --- a/s4-funcs.sh	Sun Apr 24 16:49:15 2016 +0859
     1.2 +++ b/s4-funcs.sh	Sun Apr 24 16:59:25 2016 +0859
     1.3 @@ -1450,8 +1450,10 @@
     1.4    
     1.5    if [ x"$user" = x"$uname" ]; then
     1.6      # Display Most Recent Entry
     1.7 +    shortval=${dumpcollen:+"substr(val, 0, $dumpcollen)"}
     1.8 +    shortval=${shortval:-val}
     1.9      DT_SQL="SELECT b.rowid, ctime,
    1.10 -       (SELECT val FROM blog_s WHERE key='title' AND id=b.id) title,
    1.11 +       (SELECT $shortval FROM blog_s WHERE key='title' AND id=b.id) title,
    1.12         (SELECT gecos FROM gecoses
    1.13          WHERE name=(SELECT val FROM blog_s
    1.14                     WHERE key='owner' AND id=b.id)) owner