Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106934


Change subject: Call Linker methods statically
......................................................................

Call Linker methods statically

Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
---
M NewestPages.page.php
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NewestPages 
refs/changes/34/106934/1

diff --git a/NewestPages.page.php b/NewestPages.page.php
index de77080..a048d98 100644
--- a/NewestPages.page.php
+++ b/NewestPages.page.php
@@ -67,7 +67,7 @@
                if( $count > 0 ) {
                        # Make list
                        if( !$this->mIncluding )
-                               
+
                                $wgOut->addWikiMsg( 'newestpages-showing', 
$wgLang->formatNum($count) );
                        $wgOut->addHTML( "<ol>" );
                        foreach ( $res as $row ) {
@@ -125,13 +125,11 @@
        }
 
        function makeListItem( $row ) {
-               global $wgUser;
                $title = Title::makeTitleSafe( $row->page_namespace, 
$row->page_title );
                if( !is_null( $title ) ) {
-                       $skin = $wgUser->getSkin();
                        $link = $row->page_is_redirect
-                                       ? '<span class="allpagesredirect">' . 
$skin->makeKnownLinkObj( $title ) . '</span>'
-                                       : $skin->makeKnownLinkObj( $title );
+                                       ? '<span class="allpagesredirect">' . 
Linker::makeKnownLinkObj( $title ) . '</span>'
+                                       : Linker::makeKnownLinkObj( $title );
                        return( "<li>{$link}</li>\n" );
                } else {
                        return( "<!-- Invalid title " . htmlspecialchars( 
$row->page_title ) . " in namespace " . htmlspecialchars( $row->page_namespace 
) . " -->\n" );

-- 
To view, visit https://gerrit.wikimedia.org/r/106934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NewestPages
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@wikimedia.org>

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

Reply via email to