improve message
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 12 Mar 2006 03:48:50 +0000 (03:48 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 12 Mar 2006 03:48:50 +0000 (03:48 +0000)
ikiwiki
templates/recentchanges.tmpl

diff --git a/ikiwiki b/ikiwiki
index da3dde46d6e0ebcddd8bf595c21aa73502c6af45..0266edfa45d928cf69a1054dc3bfc00939bc71ba 100755 (executable)
--- a/ikiwiki
+++ b/ikiwiki
@@ -407,7 +407,7 @@ sub rcs_recentchanges ($) { #{{{
                my $div=qr/^--------------------+$/;
                my $infoline=qr/^r(\d+)\s+\|\s+([^\s]+)\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/;
                my $state='start';
-               my ($rev, $user, $when, @pages, $message);
+               my ($rev, $user, $when, @pages, @message);
                foreach (`LANG=C svn log -v '$svn_url'`) {
                        chomp;
                        if ($state eq 'start' && /$div/) {
@@ -427,7 +427,7 @@ sub rcs_recentchanges ($) { #{{{
                        }
                        elsif ($state eq 'body' && /$div/) {
                                push @ret, { rev => $rev, user => $user,
-                                       when => $when, message => $message,
+                                       when => $when, message => [@message],
                                        pages => [@pages] } if @pages;
                                return @ret if @ret >= $num;
                                
@@ -436,7 +436,7 @@ sub rcs_recentchanges ($) { #{{{
                                @pages=();
                        }
                        elsif ($state eq 'body') {
-                               $message.="$_<br>\n";
+                               push @message, {line => $_},
                        }
                }
        }
index 8433e3ae0a888cf5817d95f756806d8dca46b331..4637906e280f548d79f18876b801be2f78920206 100644 (file)
 <TMPL_LOOP NAME="CHANGELOG">
        <li> <!-- <TMPL_VAR NAME="REV"> -->
                <TMPL_LOOP NAME="PAGES">
-                       <TMPL_VAR NAME="LINK"></a>
+                       <TMPL_VAR NAME="LINK">
                </TMPL_LOOP>
                <br>
                changed <TMPL_VAR NAME="WHEN"> by <TMPL_VAR NAME="USER">:
-               <i><TMPL_VAR NAME="MESSAGE"></i>
+               <i>
+               <TMPL_LOOP NAME="MESSAGE">
+                       <TMPL_IF NAME="LINE">
+                               <TMPL_VAR NAME="LINE"><br>
+                       </TMPL_IF>
+               </TMPL_LOOP>
+               </i>
        </li>
 </TMPL_LOOP>
 </ul>