* @since 1.21
*/
public function doEditContent( Content $content, $summary, $flags = 0, $baseRevId = false,
- User $user = null, $serialisation_format = null ) {
+ User $user = null, $serialisation_format = null
+ ) {
global $wgUser, $wgUseAutomaticEditSummaries, $wgUseRCPatrol, $wgUseNPPatrol;
// Low-level sanity check
$user = is_null( $user ) ? $wgUser : $user;
//XXX: check $user->getId() here???
+ // Use a sane default for $serialization_format, see bug 57026
+ if ( $serialization_format === null ) {
+ $serialization_format = $content->getContentHandler()->getDefaultFormat();
+ }
+
if ( $this->mPreparedEdit
&& $this->mPreparedEdit->newContent
&& $this->mPreparedEdit->newContent->equals( $content )
return Status::newFatal( 'readonlytext', wfReadOnlyReason() );
}
+ $this->loadPageData( 'fromdbmaster' );
$restrictionTypes = $this->mTitle->getRestrictionTypes();
-
$id = $this->getId();
if ( !$cascade ) {