s4
changeset 332:9dc6f9e60f6a
Quote file names. Select last profimg in listentry.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 21 Oct 2016 22:57:04 +0859 |
parents | 1a60dfc56bb0 |
children | 002cc900200a |
files | s4-funcs.sh |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/s4-funcs.sh Fri Oct 21 18:53:46 2016 +0859 1.2 +++ b/s4-funcs.sh Fri Oct 21 22:57:04 2016 +0859 1.3 @@ -1521,7 +1521,7 @@ 1.4 keycond="$3" 1.5 whos="$keycond AND key='profimg' AND type LIKE 'file:image%' 1.6 ORDER BY rowid DESC LIMIT 1" 1.7 - [ -d "$dir" ] || mkdir "$dir" 1.8 + [ -d "$dir" ] || mkdir -p "$dir" 1.9 case "$4" in 1.10 [Ss]) size=S ;; 1.11 [Oo]) size=O ;; 1.12 @@ -1933,15 +1933,15 @@ 1.13 err newlnk=$lnk regmode=$regmode 1.14 icondir=$dir/$id 1.15 files=`getvalbyid $tbl profimg $id $icondir` 1.16 - # Pick up only first icon 1.17 + # Pick up only last icon 1.18 echo "<div class=\"iconlist xy$thumbxy $type\"> 1.19 <p class=\"tag _$tag\">$tag</p>" \ 1.20 | _m4 $tagconv 1.21 if [ -n "$files" ]; then 1.22 - icon=`echo "$files"|head -1` 1.23 - iconhref2 $icondir/$icon "$hrb+$lnk" "$gecos" 1.24 + icon=`echo "$files"|tail -1` 1.25 + iconhref2 "$icondir/$icon" "$hrb+$lnk" "$gecos" 1.26 else 1.27 - iconhref $dir/$deficon "$hrb+$lnk" "$gecos" 1.28 + iconhref "$dir/$deficon" "$hrb+$lnk" "$gecos" 1.29 fi 1.30 echo "<br>$name${ownerp:+<br>$ownerp}" 1.31 echo "</div>"