Index: trunk/phase3/includes/FeedUtils.php |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | |
133 | 133 | if ( $wgFeedDiffCutoff <= 0 || ( strlen( $diffText ) > $wgFeedDiffCutoff ) ) { |
134 | 134 | // Omit large diffs |
135 | | - $diffText = self::getDiffText( $title, $newid, $oldid); |
| 135 | + $diffText = self::getDiffLink( $title, $newid, $oldid ); |
136 | 136 | } elseif ( $diffText === false ) { |
137 | 137 | // Error in diff engine, probably a missing revision |
138 | 138 | $diffText = "<p>Can't load revision $newid</p>"; |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | } |
152 | 152 | if ( $wgFeedDiffCutoff <= 0 || strlen( $newtext ) > $wgFeedDiffCutoff ) { |
153 | 153 | // Omit large new page diffs, bug 29110 |
154 | | - $diffText = self::getDiffText( $title, $newid ); |
| 154 | + $diffText = self::getDiffLink( $title, $newid ); |
155 | 155 | } else { |
156 | 156 | $diffText = '<p><b>' . wfMsg( 'newpage' ) . '</b></p>' . |
157 | 157 | '<div>' . nl2br( htmlspecialchars( $newtext ) ) . '</div>'; |
— | — | @@ -170,17 +170,16 @@ |
171 | 171 | * @param $newid Integer newid for this diff |
172 | 172 | * @param $oldid Integer|null oldid for the diff. Null means it is a new article |
173 | 173 | */ |
174 | | - protected static function getDiffText( Title $title, $newid, $oldid = null ) { |
| 174 | + protected static function getDiffLink( Title $title, $newid, $oldid = null ) { |
175 | 175 | $queryParameters = ($oldid == null) |
176 | 176 | ? "diff={$newid}" |
177 | 177 | : "diff={$newid}&oldid={$oldid}" ; |
178 | | - $diffLink = $title->escapeFullUrl( $queryParameters ); |
| 178 | + $diffUrl = $title->escapeFullUrl( $queryParameters ); |
179 | 179 | |
180 | | - $diffText = Html::RawElement( 'a', array( 'href' => $diffLink ), |
181 | | - htmlspecialchars( wfMsgForContent( 'showdiff' ) ) |
182 | | - ); |
| 180 | + $diffLink = Html::element( 'a', array( 'href' => $diffUrl ), |
| 181 | + wfMsgForContent( 'showdiff' ) ); |
183 | 182 | |
184 | | - return $diffText; |
| 183 | + return $diffLink; |
185 | 184 | } |
186 | 185 | |
187 | 186 | /** |