Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332881 )
Change subject: Fix remaining usage of doEdit in SemanticComments ...................................................................... Fix remaining usage of doEdit in SemanticComments Bug: T145736 Change-Id: Icd897f910bed0ceb51d00f1ca3447bd7f3321f63 --- M specials/Comment/CE_CommentAjaxAccess.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticComments refs/changes/81/332881/1 diff --git a/specials/Comment/CE_CommentAjaxAccess.php b/specials/Comment/CE_CommentAjaxAccess.php index 9027329..18da4e8 100644 --- a/specials/Comment/CE_CommentAjaxAccess.php +++ b/specials/Comment/CE_CommentAjaxAccess.php @@ -81,16 +81,16 @@ $title = Title::makeTitle( CE_COMMENT_NS, $title ); } $article = new Article( $title ); - $articleContent = ContentHandler::getContentText( $article->getPage()->getContent() ); + $articleContentText = ContentHandler::getContentText( $article->getPage()->getContent() ); $date = new Datetime( null, new DateTimeZone( 'UTC' ) ); - $articleContent = preg_replace( '/\|CommentContent.*}}/', + $articleContentText = preg_replace( '/\|CommentContent.*}}/', '|CommentContent=' . $wgUser->getName() . ' ' . wfMessage( 'ce_comment_has_deleted' )->text() . ' ' . $date->format( 'r' ) . '|CommentWasDeleted=true|}}', - $articleContent + $articleContentText ); - $article->doEdit( $articleContent, wfMessage( 'ce_comment_delete_reason' )->text() ); - CEComment::updateRelatedArticle( $articleContent ); + $article->doEditContent( ContentHandler::makeContent( $articleContentText, $title ), wfMessage( 'ce_comment_delete_reason' )->text() ); + CEComment::updateRelatedArticle( $articleContentText ); $result = wfMessage( 'ce_comment_deletion_successful' )->text(); wfProfileOut( __METHOD__ . ' [Semantic Comments]' ); return CECommentUtils::createXMLResponse( $result, '0', $pageName ); @@ -139,4 +139,4 @@ wfProfileOut( __METHOD__ . ' [Semantic Comments]' ); return CECommentUtils::createXMLResponse( 'sth went wrong here', '1', $pageNames ); } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/332881 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd897f910bed0ceb51d00f1ca3447bd7f3321f63 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticComments 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