X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMovePage.php;h=bcec0a188d02bf0c1b1d1a0e5f8b84d482cafa0a;hb=7099937b42cdf52948ae0c3c5f761ca573f7e530;hp=7d27a277b4770172a182aa396ba927e7fa9f3ee9;hpb=8c18b95cbe8149544dbf284733ebd6edb4f2f031;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MovePage.php b/includes/MovePage.php index 7d27a277b4..bcec0a188d 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -21,6 +21,7 @@ use MediaWiki\MediaWikiServices; use MediaWiki\Revision\SlotRecord; +use Wikimedia\Rdbms\IDatabase; /** * Handles the backend logic of moving a page from one title @@ -250,7 +251,7 @@ class MovePage { } $dbw = wfGetDB( DB_MASTER ); - $dbw->startAtomic( __METHOD__ ); + $dbw->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE ); Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, $this->newTitle, $user ] ); @@ -425,7 +426,7 @@ class MovePage { * Move a file associated with a page to a new location. * Can also be used to revert after a DB failure. * - * @access private + * @private * @param Title Old location to move the file from. * @param Title New location to move the file to. * @return Status @@ -493,7 +494,8 @@ class MovePage { ); if ( !$status->isGood() ) { - throw new MWException( 'Failed to delete page-move revision: ' . $status ); + throw new MWException( 'Failed to delete page-move revision: ' + . $status->getWikiText( false, false, 'en' ) ); } $nt->resetArticleID( false );