Jack Phoenix has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/338149 )

Change subject: Fix fatal on Special:ToggleUserPage
......................................................................


Fix fatal on Special:ToggleUserPage

This was caused by rESPR35b0a0520a35eb16d995dd7e902de82204695059 /
Change-Id I0969712ddae9341d6ba88e9aa88f6f1a84b90064, because
Article#getContentObject is protected. Meanwhile WikiPage#getContent is
public and should be functionally equivalent to the old Article#getContent
method, so let's just use that instead.

Bug: T158318
Change-Id: I5ce09964eaa4586cadfbd9af7e092ea70c0c62f1
---
M UserProfile/SpecialToggleUserPageType.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/UserProfile/SpecialToggleUserPageType.php 
b/UserProfile/SpecialToggleUserPageType.php
index 7288f61..f840e2e 100644
--- a/UserProfile/SpecialToggleUserPageType.php
+++ b/UserProfile/SpecialToggleUserPageType.php
@@ -77,8 +77,8 @@
 
                if ( $user_page_type == 1 && !$user->isBlocked() ) {
                        $user_page = Title::makeTitle( NS_USER, 
$user->getName() );
-                       $article = new Article( $user_page );
-                       $contentObject = $article->getContentObject();
+                       $article = new WikiPage( $user_page );
+                       $contentObject = $article->getContent();
                        $user_page_content = ContentHandler::getContentText( 
$contentObject );
 
                        $user_wiki_title = Title::makeTitle( NS_USER_WIKI, 
$user->getName() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ce09964eaa4586cadfbd9af7e092ea70c0c62f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to