r92425 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92424‎ | r92425 | r92426 >
Date:11:37, 18 July 2011
Author:ashley
Status:ok
Tags:
Comment:
SocialProfile: add new UserProfileRightSideAfterActivity hook to UserProfilePage.php so that we can inject getArticles() from the BlogPage extension instead of having to add getArticles() to UserProfilePage (the principle of extensions being as self-contained as possible)
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -94,6 +94,10 @@
9595
9696 $wgOut->addHTML( $this->getPersonalInfo( $this->user_id, $this->user_name ) );
9797 $wgOut->addHTML( $this->getActivity( $this->user_name ) );
 98+ // Hook for BlogPage
 99+ if ( !wfRunHooks( 'UserProfileRightSideAfterActivity', array( $this ) ) ) {
 100+ wfDebug( __METHOD__ . ": UserProfileRightSideAfterActivity hook messed up profile!\n" );
 101+ }
98102 $wgOut->addHTML( $this->getCasualGames( $this->user_id, $this->user_name ) );
99103 $wgOut->addHTML( $this->getUserBoard( $this->user_id, $this->user_name ) );
100104

Status & tagging log