Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312099

Change subject: Replace Article::doEdit()
......................................................................

Replace Article::doEdit()

Bug: T145736
Change-Id: I624250803946b9f2e818bf5e8edc2f2dc8f56323
---
M UserProfile/SpecialEditProfile.php
M UserProfile/SpecialToggleUserPageType.php
M UserProfile/SpecialUpdateProfile.php
M UserStats/GenerateTopUsersReport.php
4 files changed, 16 insertions(+), 5 deletions(-)


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

diff --git a/UserProfile/SpecialEditProfile.php 
b/UserProfile/SpecialEditProfile.php
index f366841..4f0b492 100644
--- a/UserProfile/SpecialEditProfile.php
+++ b/UserProfile/SpecialEditProfile.php
@@ -120,7 +120,11 @@
                        $title = Title::makeTitle( NS_USER, $target->getName() 
);
                        $article = new Article( $title );
                        if ( !$article->exists() ) {
-                               $article->doEdit( '', 'create user page', 
EDIT_SUPPRESS_RC );
+                               $article->doEditContent(
+                                       ContentHandler::makeContent( '', $title 
),
+                                       'create user page',
+                                       EDIT_SUPPRESS_RC
+                               );
                        }
                }
 
diff --git a/UserProfile/SpecialToggleUserPageType.php 
b/UserProfile/SpecialToggleUserPageType.php
index ff3e2ed..30917fd 100644
--- a/UserProfile/SpecialToggleUserPageType.php
+++ b/UserProfile/SpecialToggleUserPageType.php
@@ -83,7 +83,10 @@
                        $user_wiki_title = Title::makeTitle( NS_USER_WIKI, 
$user->getName() );
                        $user_wiki = new Article( $user_wiki_title );
                        if ( !$user_wiki->exists() ) {
-                               $user_wiki->doEdit( $user_page_content, 'import 
user wiki' );
+                               $user_wiki->doEditContent(
+                                       ContentHandler::makeContent( 
$user_page_content, $user_wiki_title ),
+                                       'import user wiki'
+                               );
                        }
                }
                $title = Title::makeTitle( NS_USER, $user->getName() );
diff --git a/UserProfile/SpecialUpdateProfile.php 
b/UserProfile/SpecialUpdateProfile.php
index 62854ad..20ef761 100644
--- a/UserProfile/SpecialUpdateProfile.php
+++ b/UserProfile/SpecialUpdateProfile.php
@@ -208,7 +208,11 @@
                        $title = Title::makeTitle( NS_USER, $user->getName() );
                        $article = new Article( $title );
                        if ( !$article->exists() ) {
-                               $article->doEdit( '', 'create user page', 
EDIT_SUPPRESS_RC );
+                               $article->doEditContent(
+                                       ContentHandler::makeContent( '', $title 
),
+                                       'create user page',
+                                       EDIT_SUPPRESS_RC
+                               );
                        }
                }
 
diff --git a/UserStats/GenerateTopUsersReport.php 
b/UserStats/GenerateTopUsersReport.php
index caddf77..d4ed6e4 100644
--- a/UserStats/GenerateTopUsersReport.php
+++ b/UserStats/GenerateTopUsersReport.php
@@ -253,8 +253,8 @@
                // I think not, but...
                if ( !$article->exists() ) {
                        // For grep: user-stats-report-weekly-edit-summary, 
user-stats-report-monthly-edit-summary
-                       $article->doEdit(
-                               $pageContent,
+                       $article->doEditContent(
+                               ContentHandler::makeContent( $pageContent, 
$title ),
                                $this->msg( 
"user-stats-report-{$period}-edit-summary" )->inContentLanguage()->escaped()
                        );
                        $date = date( 'Y-m-d H:i:s' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I624250803946b9f2e818bf5e8edc2f2dc8f56323
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>

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

Reply via email to