Index: trunk/phase3/includes/Article.php |
— | — | @@ -1475,9 +1475,8 @@ |
1476 | 1476 | $lastRevision = 0; |
1477 | 1477 | $revisionId = 0; |
1478 | 1478 | |
1479 | | - $dbw->begin(); |
| 1479 | + $changed = ( strcmp( $text, $oldtext ) != 0 ); |
1480 | 1480 | |
1481 | | - $changed = ( strcmp( $text, $oldtext ) != 0 ); |
1482 | 1481 | if ( $changed ) { |
1483 | 1482 | $this->mGoodAdjustment = (int)$this->isCountable( $text ) |
1484 | 1483 | - (int)$this->isCountable( $oldtext ); |
— | — | @@ -1503,6 +1502,7 @@ |
1504 | 1503 | 'user_text' => $user->getName(), |
1505 | 1504 | ) ); |
1506 | 1505 | |
| 1506 | + $dbw->begin(); |
1507 | 1507 | $revisionId = $revision->insertOn( $dbw ); |
1508 | 1508 | |
1509 | 1509 | # Update page |
— | — | @@ -1527,6 +1527,7 @@ |
1528 | 1528 | } |
1529 | 1529 | } |
1530 | 1530 | $user->incEditCount(); |
| 1531 | + $dbw->commit(); |
1531 | 1532 | } |
1532 | 1533 | } else { |
1533 | 1534 | $revision = null; |
— | — | @@ -1547,7 +1548,6 @@ |
1548 | 1549 | Article::onArticleEdit( $this->mTitle, false ); // leave templatelinks for editUpdates() |
1549 | 1550 | # Update links tables, site stats, etc. |
1550 | 1551 | $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed ); |
1551 | | - $dbw->commit(); |
1552 | 1552 | } |
1553 | 1553 | } else { |
1554 | 1554 | # Create new article |