r45230 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45229‎ | r45230 | r45231 >
Date:17:25, 31 December 2008
Author:brion
Status:ok
Tags:
Comment:
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...
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -914,11 +914,7 @@
915915 } else {
916916 // New file; create the description page.
917917 // There's already a log entry, so don't make a second RC entry
918 - $result = $article->doEdit( $pageText, $comment, EDIT_NEW | EDIT_SUPPRESS_RC );
919 - if ( !$result->isOK() ) {
920 - $dbw->rollback( __METHOD__ );
921 - return false;
922 - }
 918+ $article->doEdit( $pageText, $comment, EDIT_NEW | EDIT_SUPPRESS_RC );
923919 }
924920
925921 # Hooks, hooks, the magic of hooks...
Index: trunk/phase3/RELEASE-NOTES
@@ -574,8 +574,6 @@
575575 * (bug 16726) siprop=namespacealiases should also list localized aliases
576576 * (bug 16730) Added apprfiltercascade parameter to list=allpages to filter
577577 cascade-protected pages
578 -* (bug 15430) Cancel the upload process and rollback database changes in case
579 - no article associated with the file can be created
580578
581579 === Languages updated in 1.14 ===
582580

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45058(bug 15430) Cancel the upload process and rollback database changes in case n...btongminh19:42, 26 December 2008

Status & tagging log