* @return bool
*/
public function importRevision( $revision ) {
- $dbw = wfGetDB( DB_MASTER );
- return $dbw->deadlockLoop( array( $revision, 'importOldRevision' ) );
+ try {
+ $dbw = wfGetDB( DB_MASTER );
+ return $dbw->deadlockLoop( array( $revision, 'importOldRevision' ) );
+ } catch ( MWContentSerializationException $ex ) {
+ $this->notice( 'import-error-unserialize',
+ $revision->getTitle()->getPrefixedText(),
+ $revision->getID(),
+ $revision->getModel(),
+ $revision->getFormat() );
+ }
}
/**
# @todo FIXME: Use original rev_id optionally (better for backups)
# Insert the row
$revision = new Revision( array(
+ 'title' => $this->title,
'page' => $pageId,
'content_model' => $this->getModel(),
'content_format' => $this->getFormat(),