http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97326

Revision: 97326
Author:   ialex
Date:     2011-09-16 19:35:14 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
Call Linker methods statically

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiParse.php
    trunk/phase3/includes/api/ApiQueryDeletedrevs.php
    trunk/phase3/includes/api/ApiQueryFilearchive.php
    trunk/phase3/includes/api/ApiQueryImageInfo.php
    trunk/phase3/includes/api/ApiQueryLogEvents.php
    trunk/phase3/includes/api/ApiQueryProtectedTitles.php
    trunk/phase3/includes/api/ApiQueryRecentChanges.php
    trunk/phase3/includes/api/ApiQueryRevisions.php
    trunk/phase3/includes/api/ApiQueryUserContributions.php
    trunk/phase3/includes/api/ApiQueryWatchlist.php

Modified: trunk/phase3/includes/api/ApiParse.php
===================================================================
--- trunk/phase3/includes/api/ApiParse.php      2011-09-16 19:31:56 UTC (rev 
97325)
+++ trunk/phase3/includes/api/ApiParse.php      2011-09-16 19:35:14 UTC (rev 
97326)
@@ -216,7 +216,7 @@
 
                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'] ) ) {

Modified: trunk/phase3/includes/api/ApiQueryDeletedrevs.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryDeletedrevs.php   2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryDeletedrevs.php   2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -230,7 +230,7 @@
                        $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'] = '';

Modified: trunk/phase3/includes/api/ApiQueryFilearchive.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -166,7 +166,7 @@
                        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 );
                                }
                        }

Modified: trunk/phase3/includes/api/ApiQueryImageInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryImageInfo.php     2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryImageInfo.php     2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -318,8 +318,7 @@
                                $vals['commenthidden'] = '';
                        } else {
                                if ( $pcomment ) {
-                                       global $wgUser;
-                                       $vals['parsedcomment'] = 
$wgUser->getSkin()->formatComment(
+                                       $vals['parsedcomment'] = 
Linker::formatComment(
                                                $file->getDescription(), 
$file->getTitle() );
                                }
                                if ( $comment ) {

Modified: trunk/phase3/includes/api/ApiQueryLogEvents.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryLogEvents.php     2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryLogEvents.php     2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -323,8 +323,7 @@
                                }
 
                                if ( $this->fld_parsedcomment ) {
-                                       global $wgUser;
-                                       $vals['parsedcomment'] = 
$wgUser->getSkin()->formatComment( $row->log_comment, $title );
+                                       $vals['parsedcomment'] = 
Linker::formatComment( $row->log_comment, $title );
                                }
                        }
                }

Modified: trunk/phase3/includes/api/ApiQueryProtectedTitles.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryProtectedTitles.php       2011-09-16 
19:31:56 UTC (rev 97325)
+++ trunk/phase3/includes/api/ApiQueryProtectedTitles.php       2011-09-16 
19:35:14 UTC (rev 97326)
@@ -112,8 +112,7 @@
                                }
 
                                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'] ) ) {

Modified: trunk/phase3/includes/api/ApiQueryRecentChanges.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryRecentChanges.php 2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryRecentChanges.php 2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -410,8 +410,7 @@
                }
 
                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 ) {

Modified: trunk/phase3/includes/api/ApiQueryRevisions.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryRevisions.php     2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryRevisions.php     2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -424,8 +424,7 @@
                                }
 
                                if ( $this->fld_parsedcomment ) {
-                                       global $wgUser;
-                                       $vals['parsedcomment'] = 
$wgUser->getSkin()->formatComment( $comment, $title );
+                                       $vals['parsedcomment'] = 
Linker::formatComment( $comment, $title );
                                }
                        }
                }

Modified: trunk/phase3/includes/api/ApiQueryUserContributions.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryUserContributions.php     2011-09-16 
19:31:56 UTC (rev 97325)
+++ trunk/phase3/includes/api/ApiQueryUserContributions.php     2011-09-16 
19:35:14 UTC (rev 97326)
@@ -321,8 +321,7 @@
                                }
 
                                if ( $this->fld_parsedcomment ) {
-                                       global $wgUser;
-                                       $vals['parsedcomment'] = 
$wgUser->getSkin()->formatComment( $row->rev_comment, $title );
+                                       $vals['parsedcomment'] = 
Linker::formatComment( $row->rev_comment, $title );
                                }
                        }
                }

Modified: trunk/phase3/includes/api/ApiQueryWatchlist.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryWatchlist.php     2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryWatchlist.php     2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -295,7 +295,7 @@
                }
 
                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 ) {


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to