Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331967 )

Change subject: Optimization
......................................................................

Optimization

Also swapped one wfMessage to $this->msg

Change-Id: I873ce4d15cc4f198af3349f8f05423217ecd19de
---
M UserActivity/UserActivity.body.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/67/331967/1

diff --git a/UserActivity/UserActivity.body.php 
b/UserActivity/UserActivity.body.php
index 8d5e1fb..218b333 100644
--- a/UserActivity/UserActivity.body.php
+++ b/UserActivity/UserActivity.body.php
@@ -91,6 +91,8 @@
                        $network_updates = 1;
                }
 
+               $linkRenderer = $this->getLinkRenderer();
+               $pageTitle = $this->getPageTitle();
                // Filtering feature, if enabled
                // The filter message's format is:
                // *filter name (item_type URL parameter)|Displayed text (can 
be the name of a MediaWiki: message, too)|Type icon name (*not* the image name; 
see UserActivity::getTypeIcon())
@@ -117,20 +119,20 @@
 
                                        // Maybe it's the name of a MediaWiki: 
message? I18n is
                                        // always nice, so at least try it and 
see what happens...
-                                       $linkMsgObj = wfMessage( $link_text );
+                                       $linkMsgObj = $this->msg( $link_text );
                                        if ( !$linkMsgObj->isDisabled() ) {
                                                $link_text = 
$linkMsgObj->parse();
                                        }
 
                                        $link_image = $line[2];
-                                       $output .= '<a href="' . 
htmlspecialchars( $this->getPageTitle()->getFullURL( "item_type={$filter}" ) ) .
+                                       $output .= '<a href="' . 
htmlspecialchars( $pageTitle->getFullURL( "item_type={$filter}" ) ) .
                                                "\"><img 
src=\"{$wgExtensionAssetsPath}/SocialProfile/images/" .
                                                UserActivity::getTypeIcon( 
$link_image ) . "\"/>{$link_text}</a>";
                                }
                        }
 
-                       $output .= $this->getLinkRenderer()->makeLink(
-                               $this->getPageTitle(),
+                       $output .= $linkRenderer->makeLink(
+                               $pageTitle,
                                $this->msg( 'useractivity-all' )->plain()
                        );
                        $output .= '</div>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I873ce4d15cc4f198af3349f8f05423217ecd19de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <j...@countervandalism.net>

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

Reply via email to