Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -675,7 +675,7 @@ |
676 | 676 | * (b) Current file exists and the "version used" was non-existing (created) |
677 | 677 | * (c) Current file doesn't exist and the "version used" existed (deleted) |
678 | 678 | * |
679 | | - * @param string $noForeign Using 'noForeign' skips new non-local file versions (bug 15748) |
| 679 | + * @param string $noForeign Using 'noForeign' skips foreign file updates (bug 15748) |
680 | 680 | * @return Array of (file title, MW file timestamp in reviewed version) tuples |
681 | 681 | */ |
682 | 682 | public function findPendingFileChanges( $noForeign = false ) { |
— | — | @@ -718,18 +718,22 @@ |
719 | 719 | } else { |
720 | 720 | $tsStable = $reviewedTS; |
721 | 721 | } |
722 | | - # Compare to current... |
| 722 | + # Compare this version to the current version and check for things |
| 723 | + # that would make the stable version unsynced with the draft... |
723 | 724 | $file = wfFindFile( $title ); // current file version |
724 | 725 | if ( $file ) { // file exists |
725 | 726 | if ( $noForeign === 'noForeign' && !$file->isLocal() ) { |
| 727 | + # Avoid counting edits to Commons files, which can effect |
| 728 | + # many pages, as there is no expedient way to review them. |
726 | 729 | $updated = !$tsStable; // created (ignore new versions) |
727 | 730 | } else { |
728 | 731 | $updated = ( $file->getTimestamp() > $tsStable ); // edited/created |
729 | 732 | } |
730 | | - $deleted = false; |
| 733 | + $deleted = $tsStable // included file deleted after review |
| 734 | + && !$file->getRepo()->findFile( $title, array( 'time' => $tsStable ) ); |
731 | 735 | } else { // file doesn't exists |
732 | 736 | $updated = false; |
733 | | - $deleted = (bool)$tsStable; // later deleted |
| 737 | + $deleted = (bool)$tsStable; // included file deleted after review |
734 | 738 | } |
735 | 739 | if ( $deleted || $updated ) { |
736 | 740 | $fileChanges[] = array( $title, $tsStable ); |