(Bug 25138) ApiUndelete begins a transaction, but does not commit.
authorPlatonides <platonides@users.mediawiki.org>
Fri, 10 Sep 2010 20:31:44 +0000 (20:31 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Fri, 10 Sep 2010 20:31:44 +0000 (20:31 +0000)
The UI doesn't use a transaction either, although it seems appropiate.
The begin() should be moved into PageArchive::undelete()

includes/api/ApiUndelete.php

index d081d0d..83c3fbe 100644 (file)
@@ -69,8 +69,6 @@ class ApiUndelete extends ApiBase {
                }
 
                $pa = new PageArchive( $titleObj );
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin();
                $retval = $pa->undelete( ( isset( $params['timestamps'] ) ? $params['timestamps'] : array() ), $params['reason'] );
                if ( !is_array( $retval ) ) {
                        $this->dieUsageMsg( array( 'cannotundelete' ) );