Reverting r45058 "(bug 15430) Cancel the upload process and rollback database changes...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 31 Dec 2008 17:25:08 +0000 (17:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 31 Dec 2008 17:25:08 +0000 (17:25 +0000)
Article::doEdit() opens and commits transactions of its own, so the transaction we started earlier will already be committed and cannot be rolled back at this point unless one of two particular failure modes hits (ArticleSave hook aborts or mLatest isn't set). A more general fix needs to be devised...

RELEASE-NOTES
includes/filerepo/LocalFile.php

index d8ca2da..a9d3483 100644 (file)
@@ -574,8 +574,6 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 16726) siprop=namespacealiases should also list localized aliases
 * (bug 16730) Added apprfiltercascade parameter to list=allpages to filter
   cascade-protected pages
-* (bug 15430) Cancel the upload process and rollback database changes in case 
-  no article associated with the file can be created 
 
 === Languages updated in 1.14 ===
 
index 4b0f935..6fd6de7 100644 (file)
@@ -914,11 +914,7 @@ class LocalFile extends File
                } else {
                        // New file; create the description page.
                        // There's already a log entry, so don't make a second RC entry
-                       $result = $article->doEdit( $pageText, $comment, EDIT_NEW | EDIT_SUPPRESS_RC );
-                       if ( !$result->isOK() ) {
-                               $dbw->rollback( __METHOD__ );
-                               return false;
-                       }
+                       $article->doEdit( $pageText, $comment, EDIT_NEW | EDIT_SUPPRESS_RC );
                }
 
                # Hooks, hooks, the magic of hooks...