forked from github/kensanata.oddmuse
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:
1
wiki.pl
1
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);
|
||||
|
||||
Reference in New Issue
Block a user