Index: trunk/phase3/includes/Article.php |
— | — | @@ -1466,8 +1466,9 @@ |
1467 | 1467 | $lastRevision = 0; |
1468 | 1468 | $revisionId = 0; |
1469 | 1469 | |
| 1470 | + $dbw->begin(); |
| 1471 | + |
1470 | 1472 | $changed = ( strcmp( $text, $oldtext ) != 0 ); |
1471 | | - |
1472 | 1473 | if ( $changed ) { |
1473 | 1474 | $this->mGoodAdjustment = (int)$this->isCountable( $text ) |
1474 | 1475 | - (int)$this->isCountable( $oldtext ); |
— | — | @@ -1493,7 +1494,6 @@ |
1494 | 1495 | 'user_text' => $user->getName(), |
1495 | 1496 | ) ); |
1496 | 1497 | |
1497 | | - $dbw->begin(); |
1498 | 1498 | $revisionId = $revision->insertOn( $dbw ); |
1499 | 1499 | |
1500 | 1500 | # Update page |
— | — | @@ -1519,7 +1519,6 @@ |
1520 | 1520 | } |
1521 | 1521 | } |
1522 | 1522 | $user->incEditCount(); |
1523 | | - $dbw->commit(); |
1524 | 1523 | } |
1525 | 1524 | } else { |
1526 | 1525 | $revision = null; |
— | — | @@ -1541,6 +1540,7 @@ |
1542 | 1541 | |
1543 | 1542 | # Update links tables, site stats, etc. |
1544 | 1543 | $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed ); |
| 1544 | + $dbw->commit(); |
1545 | 1545 | } |
1546 | 1546 | } else { |
1547 | 1547 | # Create new article |