jenkins-bot has submitted this change and it was merged.
Change subject: Call Linker methods statically
..
Call Linker methods statically
Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
---
M NewestPages.page.php
1 file changed, 4 insertions(+), 8 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/NewestPages.page.php b/NewestPages.page.php
index de77080..e8fc000 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 );
@@ -158,8 +156,6 @@
}
function makeSelfLink( $label, $oname = false, $oval = false ) {
- global $wgUser;
- $skin = $wgUser-getSkin();
$self = $this-getTitle();
$attr['limit'] = $this-limit;
$attr['namespace'] = $this-namespace;
@@ -169,7 +165,7 @@
$attr[$oname] = $oval;
foreach( $attr as $aname = $aval )
$attribs[] = {$aname}={$aval};
- return $skin-makeKnownLinkObj( $self, $label, implode( '',
$attribs ) );
+ return Linker::makeKnownLinkObj( $self, $label, implode( '',
$attribs ) );
}
function makeNamespaceForm() {
--
To view, visit https://gerrit.wikimedia.org/r/106934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/NewestPages
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits