jenkins-bot has submitted this change and it was merged.

Change subject: Replace Article::replaceSection usage with 
Article::replaceSectionAtRev
......................................................................


Replace Article::replaceSection usage with Article::replaceSectionAtRev

Bug: T122754
Change-Id: I3d37f7e778d569970ed749c22ba49a63cc4ba0ec
---
M VisualEditor/VisualEditor.class.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor/VisualEditor.class.php 
b/VisualEditor/VisualEditor.class.php
index 383a9d1..899486f 100644
--- a/VisualEditor/VisualEditor.class.php
+++ b/VisualEditor/VisualEditor.class.php
@@ -393,8 +393,8 @@
 
                //PW(25.03.2015) TODO: Use Wikipage
                $oArticle = Article::newFromID( $sArticleId );
+               $oTitle = Title::newFromText( $sPageName );
                if( is_null($oArticle) ) {
-                       $oTitle = Title::newFromText( $sPageName );
                        if( is_null($oTitle) || !$oTitle->exists() ) {
                                $aResult['message'] = wfMessage( 'badtitle' 
)->plain();
                                return FormatJson::encode( $aResult );
@@ -403,7 +403,8 @@
                }
 
                if ($iSection) {
-                       $sText = $oArticle->replaceSection($iSection, $sText);
+                       $sectionContent = ContentHandler::makeContent( $sText, 
$oTitle );
+                       $sText = $oArticle->replaceSectionAtRev($iSection, 
$sectionContent);
                }
 
                //PW(25.03.2015) TODO: Deprecated since MW 1.21 use

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d37f7e778d569970ed749c22ba49a63cc4ba0ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Dvogel hallowelt <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to