From: Tpt Date: Tue, 26 Aug 2014 07:22:26 +0000 (+0200) Subject: Save pages content in the default format of their content type X-Git-Tag: 1.31.0-rc.0~13998^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=799ce7055defeef80b459af61797a95d98da408d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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()