From 5da7de59d6d4e23a3bd539ea6e1d434f8a61671d Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Mon, 23 Sep 2013 16:44:22 +0200 Subject: [PATCH] Add a summary when showing a diff in RSS output. When looking at an URL like action=rss;full=1;page=0;diff=1;days=1 we expect to see a diff, and with the diff we expect a summary. RssItem calls PageHtml if full is set. PageHtml opens the page and calls PrintPageDiff. If diff is set, it calls PrintHtmlDiff. Since the page is already open, PrintHtmlDiff will use GetCacheDiff and skip the calling of GetTextRevision which would have produced a summary. That's why we use the open page's summary if none has been set. --- wiki.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/wiki.pl b/wiki.pl index 36e9576a..c4183ad8 100755 --- a/wiki.pl +++ b/wiki.pl @@ -2527,6 +2527,7 @@ sub PrintHtmlDiff { $old = $Page{revision} - 1; } } + $summary = $Page{summary} if not $summary and not $new; $summary = $q->p({-class=>'summary'}, T('Summary:') . ' ' . $summary) if $summary; if ($old > 0) { # generate diff if the computed old revision makes sense $diff = GetKeptDiff($text, $old);