X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FFeedUtils.php;h=b1c3ce615a679e6cb24e4a26d6dc6083350c1f5f;hp=3268291b51fc0d6c9946fe3230598fb92576cb79;hb=5fa4cdf860c79b32ab6ef034c6d9420c2727f695;hpb=22806b0a4509e97b56fb52b387e17e3c80fb7eb2 diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 3268291b51..b1c3ce615a 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -72,7 +72,8 @@ class FeedUtils { /** * Format a diff for the newsfeed * - * @param object $row Row from the recentchanges table + * @param object $row Row from the recentchanges table, including fields as + * appropriate for CommentStore * @return string */ public static function formatDiff( $row ) { @@ -88,7 +89,9 @@ class FeedUtils { $timestamp, $row->rc_deleted & Revision::DELETED_COMMENT ? wfMessage( 'rev-deleted-comment' )->escaped() - : $row->rc_comment, + : CommentStore::newKey( 'rc_comment' ) + // Legacy from RecentChange::selectFields() via ChangesListSpecialPage::doMainQuery() + ->getCommentLegacy( wfGetDB( DB_REPLICA ), $row )->text, $actiontext ); } @@ -188,7 +191,6 @@ class FeedUtils { } if ( $html === null ) { - // Omit large new page diffs, T31110 // Also use diff link for non-textual content $diffText = self::getDiffLink( $title, $newid ); @@ -234,18 +236,18 @@ class FeedUtils { */ public static function applyDiffStyle( $text ) { $styles = [ - 'diff' => 'background-color: white; color:black;', - 'diff-otitle' => 'background-color: white; color:black; text-align: center;', - 'diff-ntitle' => 'background-color: white; color:black; text-align: center;', - 'diff-addedline' => 'color:black; font-size: 88%; border-style: solid; ' + 'diff' => 'background-color: #fff; color: #222;', + 'diff-otitle' => 'background-color: #fff; color: #222; text-align: center;', + 'diff-ntitle' => 'background-color: #fff; color: #222; text-align: center;', + 'diff-addedline' => 'color: #222; font-size: 88%; border-style: solid; ' . 'border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; ' . 'vertical-align: top; white-space: pre-wrap;', - 'diff-deletedline' => 'color:black; font-size: 88%; border-style: solid; ' + 'diff-deletedline' => 'color: #222; font-size: 88%; border-style: solid; ' . 'border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; ' . 'vertical-align: top; white-space: pre-wrap;', - 'diff-context' => 'background-color: #f9f9f9; color: #333333; font-size: 88%; ' + 'diff-context' => 'background-color: #f8f9fa; color: #222; font-size: 88%; ' . 'border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; ' - . 'border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;', + . 'border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;', 'diffchange' => 'font-weight: bold; text-decoration: none;', ];