From 799ce7055defeef80b459af61797a95d98da408d Mon Sep 17 00:00:00 2001 From: Tpt Date: Tue, 26 Aug 2014 09:22:26 +0200 Subject: [PATCH] Save pages content in the default format of their content type Useful in order to be sure that only the default format is saved in the database (allow to implement optional formats useful for APIs but not used in the storage) Change-Id: Ia703319aefc8d56c377cd7766dc5985c5c3c27c1 --- includes/EditPage.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 87bdf91e8c..f6342c51f2 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1892,8 +1892,14 @@ class EditPage { ( ( $this->minoredit && !$this->isNew ) ? EDIT_MINOR : 0 ) | ( $bot ? EDIT_FORCE_BOT : 0 ); - $doEditStatus = $this->mArticle->doEditContent( $content, $this->summary, $flags, - false, null, $this->contentFormat ); + $doEditStatus = $this->mArticle->doEditContent( + $content, + $this->summary, + $flags, + false, + null, + $content->getDefaultFormat() + ); if ( !$doEditStatus->isOK() ) { // Failure from doEdit() -- 2.20.1