Call Linker methods statically
This commit is contained in:
parent
ae419b58f3
commit
da4edaaf40
10 changed files with 10 additions and 16 deletions
|
|
@ -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'] ) ) {
|
||||
|
|
|
|||
|
|
@ -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'] = '';
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'] ) ) {
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue