From 09922e435bb292f369943ce2038fd25436539017 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 31 Dec 2008 17:25:08 +0000 Subject: [PATCH] Reverting r45058 "(bug 15430) Cancel the upload process and rollback database changes in case no article associated with the file can be created" 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 | 2 -- includes/filerepo/LocalFile.php | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d8ca2da67f..a9d34831bf 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 4b0f935dba..6fd6de72d4 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -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... -- 2.20.1