From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- includes/FeedUtils.php | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) (limited to 'includes/FeedUtils.php') diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index cf42329b..11b2675d 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -1,4 +1,25 @@ rc_last_oldid, $row->rc_this_oldid, $timestamp, ($row->rc_deleted & Revision::DELETED_COMMENT) - ? wfMsgHtml('rev-deleted-comment') + ? wfMessage('rev-deleted-comment')->escaped() : $row->rc_comment, $actiontext ); @@ -108,21 +129,22 @@ class FeedUtils { if( $oldid ) { wfProfileIn( __METHOD__."-dodiff" ); - #$diffText = $de->getDiff( wfMsg( 'revisionasof', + #$diffText = $de->getDiff( wfMessage( 'revisionasof', # $wgLang->timeanddate( $timestamp ), # $wgLang->date( $timestamp ), - # $wgLang->time( $timestamp ) ), - # wfMsg( 'currentrev' ) ); + # $wgLang->time( $timestamp ) )->text(), + # wfMessage( 'currentrev' )->text() ); + $diffText = ''; // Don't bother generating the diff if we won't be able to show it if ( $wgFeedDiffCutoff > 0 ) { $de = new DifferenceEngine( $title, $oldid, $newid ); $diffText = $de->getDiff( - wfMsg( 'previousrevision' ), // hack - wfMsg( 'revisionasof', + wfMessage( 'previousrevision' )->text(), // hack + wfMessage( 'revisionasof', $wgLang->timeanddate( $timestamp ), $wgLang->date( $timestamp ), - $wgLang->time( $timestamp ) ) ); + $wgLang->time( $timestamp ) )->text() ); } if ( $wgFeedDiffCutoff <= 0 || ( strlen( $diffText ) > $wgFeedDiffCutoff ) ) { @@ -148,7 +170,7 @@ class FeedUtils { // Omit large new page diffs, bug 29110 $diffText = self::getDiffLink( $title, $newid ); } else { - $diffText = '

' . wfMsg( 'newpage' ) . '

' . + $diffText = '

' . wfMessage( 'newpage' )->text() . '

' . '
' . nl2br( htmlspecialchars( $newtext ) ) . '
'; } } @@ -165,6 +187,7 @@ class FeedUtils { * @param $title Title object: used to generate the diff URL * @param $newid Integer newid for this diff * @param $oldid Integer|null oldid for the diff. Null means it is a new article + * @return string */ protected static function getDiffLink( Title $title, $newid, $oldid = null ) { $queryParameters = ($oldid == null) @@ -173,7 +196,7 @@ class FeedUtils { $diffUrl = $title->getFullUrl( $queryParameters ); $diffLink = Html::element( 'a', array( 'href' => $diffUrl ), - wfMsgForContent( 'showdiff' ) ); + wfMessage( 'showdiff' )->inContentLanguage()->text() ); return $diffLink; } -- cgit v1.2.3-54-g00ecf