r97326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97325‎ | r97326 | r97327 >
Date:19:35, 16 September 2011
Author:ialex
Status:ok
Tags:
Comment:
Call Linker methods statically
Modified paths:
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryDeletedrevs.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryFilearchive.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryProtectedTitles.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRevisions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -410,8 +410,7 @@
411411 }
412412
413413 if ( $this->fld_parsedcomment && isset( $row->rc_comment ) ) {
414 - global $wgUser;
415 - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->rc_comment, $title );
 414+ $vals['parsedcomment'] = Linker::formatComment( $row->rc_comment, $title );
416415 }
417416
418417 if ( $this->fld_redirect ) {
Index: trunk/phase3/includes/api/ApiParse.php
@@ -216,7 +216,7 @@
217217
218218 if ( !is_null( $params['summary'] ) ) {
219219 $result_array['parsedsummary'] = array();
220 - $result->setContent( $result_array['parsedsummary'], $wgUser->getSkin()->formatComment( $params['summary'], $titleObj ) );
 220+ $result->setContent( $result_array['parsedsummary'], Linker::formatComment( $params['summary'], $titleObj ) );
221221 }
222222
223223 if ( isset( $prop['langlinks'] ) ) {
Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php
@@ -230,7 +230,7 @@
231231 $title = Title::makeTitle( $row->ar_namespace, $row->ar_title );
232232
233233 if ( $fld_parsedcomment ) {
234 - $rev['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->ar_comment, $title );
 234+ $rev['parsedcomment'] = Linker::formatComment( $row->ar_comment, $title );
235235 }
236236 if ( $fld_minor && $row->ar_minor_edit == 1 ) {
237237 $rev['minor'] = '';
Index: trunk/phase3/includes/api/ApiQueryFilearchive.php
@@ -166,7 +166,7 @@
167167 if ( $fld_description ) {
168168 $file['description'] = $row->fa_description;
169169 if ( isset( $prop['parseddescription'] ) ) {
170 - $file['parseddescription'] = $wgUser->getSkin()->formatComment(
 170+ $file['parseddescription'] = Linker::formatComment(
171171 $row->fa_description, $title );
172172 }
173173 }
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -323,8 +323,7 @@
324324 }
325325
326326 if ( $this->fld_parsedcomment ) {
327 - global $wgUser;
328 - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->log_comment, $title );
 327+ $vals['parsedcomment'] = Linker::formatComment( $row->log_comment, $title );
329328 }
330329 }
331330 }
Index: trunk/phase3/includes/api/ApiQueryProtectedTitles.php
@@ -112,8 +112,7 @@
113113 }
114114
115115 if ( isset( $prop['parsedcomment'] ) ) {
116 - global $wgUser;
117 - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->pt_reason, $title );
 116+ $vals['parsedcomment'] = Linker::formatComment( $row->pt_reason, $title );
118117 }
119118
120119 if ( isset( $prop['expiry'] ) ) {
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -318,8 +318,7 @@
319319 $vals['commenthidden'] = '';
320320 } else {
321321 if ( $pcomment ) {
322 - global $wgUser;
323 - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment(
 322+ $vals['parsedcomment'] = Linker::formatComment(
324323 $file->getDescription(), $file->getTitle() );
325324 }
326325 if ( $comment ) {
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -295,7 +295,7 @@
296296 }
297297
298298 if ( $this->fld_parsedcomment && isset( $row->rc_comment ) ) {
299 - $vals['parsedcomment'] = $this->getSkin()->formatComment( $row->rc_comment, $title );
 299+ $vals['parsedcomment'] = Linker::formatComment( $row->rc_comment, $title );
300300 }
301301
302302 if ( $this->fld_loginfo && $row->rc_type == RC_LOG ) {
Index: trunk/phase3/includes/api/ApiQueryRevisions.php
@@ -424,8 +424,7 @@
425425 }
426426
427427 if ( $this->fld_parsedcomment ) {
428 - global $wgUser;
429 - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $comment, $title );
 428+ $vals['parsedcomment'] = Linker::formatComment( $comment, $title );
430429 }
431430 }
432431 }
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -321,8 +321,7 @@
322322 }
323323
324324 if ( $this->fld_parsedcomment ) {
325 - global $wgUser;
326 - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->rev_comment, $title );
 325+ $vals['parsedcomment'] = Linker::formatComment( $row->rev_comment, $title );
327326 }
328327 }
329328 }

Status & tagging log