tinycm diff plugins/blog/blog.cgi @ rev 65
Small fix to blog and ls
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Feb 16 23:36:43 2014 +0100 (2014-02-16) |
parents | d73353aed02d |
children | c9ab61b3774a |
line diff
1.1 --- a/plugins/blog/blog.cgi Thu Feb 06 19:35:03 2014 +0000 1.2 +++ b/plugins/blog/blog.cgi Sun Feb 16 23:36:43 2014 +0100 1.3 @@ -186,15 +186,16 @@ 1.4 [ -d "$blog/$p" ] || mkdir -p ${blog}/${p} 1.5 # New post ? 1.6 if [ ! -f "${blog}/${p}/post.txt" ]; then 1.7 - cat > ${blog}/${p}/post.conf << EOT 1.8 + echo "New Blog post: <a href='$script?blog=$p'>Read it!</a>" \ 1.9 + | log_activity 1.10 + fi 1.11 + # Write config file 1.12 + cat > ${blog}/${p}/post.conf << EOT 1.13 # TinyCM Blog post configuration 1.14 AUTHOR="$(GET author)" 1.15 DATE="$(GET date)" 1.16 TITLE="$(GET title)" 1.17 EOT 1.18 - echo "New Blog post: <a href='$script?blog=$p'>Read it!</a>" \ 1.19 - | log_activity 1.20 - fi 1.21 # Write content to file 1.22 sed "s/$(echo -en '\r') /\n/g" > ${blog}/${p}/post.txt << EOT 1.23 $(GET content)