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

Change subject: So this is always assumed to be static even if not declared as 
such. That's so cute.
......................................................................

So this is always assumed to be static even if not declared as such. That's so 
cute.

Change-Id: I1aae27075dafa6d78345963ade0bdd186e55cd9c
---
M UserWelcome/UserWelcomeClass.php
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/UserWelcome/UserWelcomeClass.php b/UserWelcome/UserWelcomeClass.php
index 2c88ae3..4bf88b0 100644
--- a/UserWelcome/UserWelcomeClass.php
+++ b/UserWelcome/UserWelcomeClass.php
@@ -23,10 +23,14 @@
                return true;
        }
 
-       function getWelcomeUser( $input, $args, $parser ) {
+       public static function getWelcomeUser( $input, $args, $parser ) {
                $parser->disableCache();
                $parser->getOutput()->addModuleStyles( 
'ext.socialprofile.userwelcome.css' );
-               $output = $this->getWelcome();
+               // This is so stupid. The callback to onParserFirstCallInit() is
+               // *always* (assumed to be) static even if you don't declare it 
as such.
+               // So obviously using $this in a static function 
fails...grumble grumble.
+               $uw = new UserWelcome;
+               $output = $uw->getWelcome();
                return $output;
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1aae27075dafa6d78345963ade0bdd186e55cd9c
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