# HG changeset patch # User Christophe Lincoln # Date 1392590203 -3600 # Node ID 007a950f9808b8cfd23a4a0e776e85743ec6402f # Parent d73353aed02d132fa4ad1944e60871d3f912ac53 Small fix to blog and ls diff -r d73353aed02d -r 007a950f9808 index.cgi --- a/index.cgi Thu Feb 06 19:35:03 2014 +0000 +++ b/index.cgi Sun Feb 16 23:36:43 2014 +0100 @@ -571,11 +571,15 @@ cd ${wiki} for d in $(find . -type f | sed s'/.\///') do - echo "${d%.txt}" - [ "$auth" ] && cat << EOT - : $(gettext "Remove") || \ -$(gettext "Edit") + echo -n "${d%.txt}" + if [ "$auth" ]; then + cat << EOT + : $(gettext "Edit") || \ +$(gettext "Remove") EOT + else + echo "" + fi done && unset auth echo '' html_footer ;; diff -r d73353aed02d -r 007a950f9808 plugins/blog/blog.cgi --- a/plugins/blog/blog.cgi Thu Feb 06 19:35:03 2014 +0000 +++ b/plugins/blog/blog.cgi Sun Feb 16 23:36:43 2014 +0100 @@ -186,15 +186,16 @@ [ -d "$blog/$p" ] || mkdir -p ${blog}/${p} # New post ? if [ ! -f "${blog}/${p}/post.txt" ]; then - cat > ${blog}/${p}/post.conf << EOT + echo "New Blog post: Read it!" \ + | log_activity + fi + # Write config file + cat > ${blog}/${p}/post.conf << EOT # TinyCM Blog post configuration AUTHOR="$(GET author)" DATE="$(GET date)" TITLE="$(GET title)" EOT - echo "New Blog post: Read it!" \ - | log_activity - fi # Write content to file sed "s/$(echo -en '\r') /\n/g" > ${blog}/${p}/post.txt << EOT $(GET content)