Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php |
— | — | @@ -344,7 +344,7 @@ |
345 | 345 | * (b) The edit is a self-revert to the stable version (by anyone) |
346 | 346 | * (c) The user can 'autoreview' new pages and this edit is a new page |
347 | 347 | * (d) The user can 'review' and the "review pending edits" checkbox was checked |
348 | | - * |
| 348 | + * |
349 | 349 | * Note: RC items not inserted yet, RecentChange_save hook does rc_patrolled bit... |
350 | 350 | * Note: $article one of Article, ImagePage, Category page as appropriate. |
351 | 351 | */ |
— | — | @@ -386,8 +386,8 @@ |
387 | 387 | # been the current version. If not reflected in wpEdittime, an |
388 | 388 | # edit may have been auto-merged in between, in that case, discard |
389 | 389 | # the baseRevId given from the client. |
390 | | - if ( !$editTimestamp || $prevTimestamp == $editTimestamp ) { |
391 | | - $baseRevId = intval( trim( $wgRequest->getVal( 'baseRevId' ) ) ); |
| 390 | + if ( $editTimestamp && $prevTimestamp === $editTimestamp ) { |
| 391 | + $baseRevId = $wgRequest->getInt( 'baseRevId' ); |
392 | 392 | } |
393 | 393 | # If baseRevId not given, assume the previous revision ID (for bots). |
394 | 394 | # For auto-merges, this also occurs since the given ID is ignored. |
— | — | @@ -401,12 +401,10 @@ |
402 | 402 | # (a) this new revision creates a new page and new page autoreview is enabled |
403 | 403 | # (b) this new revision is based on an old, reviewed, revision |
404 | 404 | if ( $title->getUserPermissionsErrors( 'autoreview', $user ) === array() ) { |
405 | | - // New pages |
406 | | - if ( !$prevRevId ) { |
| 405 | + if ( !$prevRevId ) { // New pages |
407 | 406 | $reviewableNewPage = FlaggedRevs::autoReviewNewPages(); |
408 | 407 | $reviewableChange = false; |
409 | | - // Edits to existing pages |
410 | | - } elseif ( $baseRevId ) { |
| 408 | + } else { // Edits to existing pages |
411 | 409 | $reviewableNewPage = false; // had previous rev |
412 | 410 | # Check if the base revision was reviewed... |
413 | 411 | if ( FlaggedRevs::autoReviewEdits() ) { |