ref: ab0ce13ca975cc147dec86c0f3e89f7fd09329a7
parent: ee424ad4a7b7b395f36f98d904b67857554581cf
author: sl <[email protected]>
date: Wed Feb 25 12:15:00 EST 2009
Fix incorrect recording of author on edits. And write a note on a very minnor bug that adds extra new lines at the end of edited files.
--- a/apps/dirdir/edit.tpl
+++ b/apps/dirdir/edit.tpl
@@ -1,4 +1,4 @@
-% if (~ $"edit_save '') {
+% if(~ $"edit_save '') {
<div>
<h1>Editing %($edit_wiki_page%)</h1>
<br />
@@ -5,11 +5,11 @@
<form action="dirdir_edit" method="post">
<input type="hidden" name="edit_wiki_page" value="%($edit_wiki_page%)">
<textarea name="edit_text" id="edit_text" cols="80" rows="43">%{
-
+# FIXME Extra trailing new lines get added to the content somehow, should avoid it.
if(~ $#edit_text 0 && test -f $edit_file)
cat $edit_file | escape_html
if not
- echo $edit_text | escape_html
+ echo -n $edit_text | escape_html
%}</textarea>
<br />
@@ -37,10 +37,10 @@
dirdir_verdir = $dirdir_dir/`{date -n}^/
mkdir $dirdir_verdir
- echo $loggin_user > $dirdir_verdir/author
+ echo $logged_user > $dirdir_verdir/author
echo $edit_text > $dirdir_verdir/data
echo $edit_text > $edit_file
%}
-<h1>Saved <a href="%($edit_wiki_page%)">%($edit_wiki_page%)!</a></h1>
+<h1>Saved <a href="%($edit_wiki_page%)">%($edit_wiki_page%)</a>!</h1>
% }