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.
This commit is contained in:
Alex Schroeder
2013-09-23 16:44:22 +02:00
parent 0afe03e75c
commit 5da7de59d6

View File

@@ -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);