From: Alexandre Emsenhuber Date: Fri, 16 Sep 2011 19:35:14 +0000 (+0000) Subject: Call Linker methods statically X-Git-Tag: 1.31.0-rc.0~27605 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=da4edaaf40018bf0de6c78a9626957a2cea17c81;p=lhc%2Fweb%2Fwiklou.git Call Linker methods statically --- diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index d963f8c94b..395dd341a2 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -216,7 +216,7 @@ class ApiParse extends ApiBase { if ( !is_null( $params['summary'] ) ) { $result_array['parsedsummary'] = array(); - $result->setContent( $result_array['parsedsummary'], $wgUser->getSkin()->formatComment( $params['summary'], $titleObj ) ); + $result->setContent( $result_array['parsedsummary'], Linker::formatComment( $params['summary'], $titleObj ) ); } if ( isset( $prop['langlinks'] ) ) { diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 98e51504ea..813d98c8a6 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -230,7 +230,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { $title = Title::makeTitle( $row->ar_namespace, $row->ar_title ); if ( $fld_parsedcomment ) { - $rev['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->ar_comment, $title ); + $rev['parsedcomment'] = Linker::formatComment( $row->ar_comment, $title ); } if ( $fld_minor && $row->ar_minor_edit == 1 ) { $rev['minor'] = ''; diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index e7fbee4672..ae386321fe 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -166,7 +166,7 @@ class ApiQueryFilearchive extends ApiQueryBase { if ( $fld_description ) { $file['description'] = $row->fa_description; if ( isset( $prop['parseddescription'] ) ) { - $file['parseddescription'] = $wgUser->getSkin()->formatComment( + $file['parseddescription'] = Linker::formatComment( $row->fa_description, $title ); } } diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 03e11b7c3e..884ec48919 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -318,8 +318,7 @@ class ApiQueryImageInfo extends ApiQueryBase { $vals['commenthidden'] = ''; } else { if ( $pcomment ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( + $vals['parsedcomment'] = Linker::formatComment( $file->getDescription(), $file->getTitle() ); } if ( $comment ) { diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 4ecf3af269..db75c8e726 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -323,8 +323,7 @@ class ApiQueryLogEvents extends ApiQueryBase { } if ( $this->fld_parsedcomment ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->log_comment, $title ); + $vals['parsedcomment'] = Linker::formatComment( $row->log_comment, $title ); } } } diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php index 21ca648a60..9330d18158 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -112,8 +112,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { } if ( isset( $prop['parsedcomment'] ) ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->pt_reason, $title ); + $vals['parsedcomment'] = Linker::formatComment( $row->pt_reason, $title ); } if ( isset( $prop['expiry'] ) ) { diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index bcafb688fd..79012cc6d0 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -410,8 +410,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { } if ( $this->fld_parsedcomment && isset( $row->rc_comment ) ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->rc_comment, $title ); + $vals['parsedcomment'] = Linker::formatComment( $row->rc_comment, $title ); } if ( $this->fld_redirect ) { diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 0031a524ce..5298d39060 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -424,8 +424,7 @@ class ApiQueryRevisions extends ApiQueryBase { } if ( $this->fld_parsedcomment ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $comment, $title ); + $vals['parsedcomment'] = Linker::formatComment( $comment, $title ); } } } diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index a6204215a5..354dc296ac 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -321,8 +321,7 @@ class ApiQueryContributions extends ApiQueryBase { } if ( $this->fld_parsedcomment ) { - global $wgUser; - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->rev_comment, $title ); + $vals['parsedcomment'] = Linker::formatComment( $row->rev_comment, $title ); } } } diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index f2d9f6603a..2e45fdfc7b 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -295,7 +295,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { } if ( $this->fld_parsedcomment && isset( $row->rc_comment ) ) { - $vals['parsedcomment'] = $this->getSkin()->formatComment( $row->rc_comment, $title ); + $vals['parsedcomment'] = Linker::formatComment( $row->rc_comment, $title ); } if ( $this->fld_loginfo && $row->rc_type == RC_LOG ) {