https://bugzilla.wikimedia.org/show_bug.cgi?id=15430

--- Comment #31 from Bryan Tong Minh <bryan.tongm...@gmail.com> 2012-09-23 
21:14:30 UTC ---
(In reply to comment #24)
> Created attachment 8136 [details]
> Delete image row on Article::doEdit failure
> 
> Cooked up something simpler: since we know that the only thing that we did
> before editing the article is adding a row to the image table, we can safely
> delete this row.

Getting back to this again, my original reasoning was wrong. There are four
possible cases:

1. File does not exist, page does not exist
2. File does not exist, page does exist
3. File does exist, page does not exist
4. File does exist, page does exist

In cases 3 & 4 we move the image row to oldimage, which is a cumbersome
operation to recover. In case 1 & 3 we call Article::doEdit(), which
potentially fails. If Article::doEdit() fails, and we are in case 3, this patch
leaves a dangling oldimage row with no image row.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to