s4

changeset 339:47d83939666b

Add extension to icon cache file if it has no one
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 23 Oct 2016 23:31:46 +0859
parents 291a3eeed05e
children a06cd57df83a
files s4-funcs.sh
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Sun Oct 23 23:11:56 2016 +0859
     1.2 +++ b/s4-funcs.sh	Sun Oct 23 23:31:46 2016 +0859
     1.3 @@ -1535,6 +1535,12 @@
     1.4    valtype=`query "$sql0"`
     1.5    filename=${valtype%%//*}
     1.6    filetype=${valtype##*//file:}
     1.7 +  if [ x"$filename" = x"${filename%.*}" ]; then
     1.8 +    # If nor filename extension found, set it to image type
     1.9 +    case "$filetype" in
    1.10 +      image/*) filename=$filename.${filetype#image/} ;;
    1.11 +    esac
    1.12 +  fi
    1.13    cacheimg_S=$dir/S_$filename
    1.14    cacheimg_M=$dir/M_$filename
    1.15    cacheimg_O=$dir/$filename
    1.16 @@ -1575,11 +1581,6 @@
    1.17  	VALUES($pval, '$iconcachekey', 'string', `sqlquote "$cacheimg_S"`);
    1.18  	EOF
    1.19  )
    1.20 -imgsrc_cache_clear() {
    1.21 -  # $1=table
    1.22 -  # $2=keycond
    1.23 -  query "DELETE FROM $1 WHERE $2 AND key='$iconcachekey';"
    1.24 -}    
    1.25  
    1.26  showhome() {
    1.27    # $1=userRowIdToShow