Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevision.php |
— | — | @@ -616,7 +616,7 @@ |
617 | 617 | * (b) Current template exists and the "version used" was non-existing (created) |
618 | 618 | * (c) Current template doesn't exist and the "version used" existed (deleted) |
619 | 619 | * |
620 | | - * @return array of (template title, rev ID in reviewed version) tuples |
| 620 | + * @return array of (title, rev ID in reviewed version, has stable rev) tuples |
621 | 621 | */ |
622 | 622 | public function findPendingTemplateChanges() { |
623 | 623 | if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
— | — | @@ -667,7 +667,7 @@ |
668 | 668 | } |
669 | 669 | $deleted = ( !$revIdDraft && $revIdStable ); // later deleted |
670 | 670 | if ( $deleted || $updated ) { |
671 | | - $tmpChanges[] = array( $title, $revIdStable ); |
| 671 | + $tmpChanges[] = array( $title, $revIdStable, (bool)$row->fp_stable ); |
672 | 672 | } |
673 | 673 | } |
674 | 674 | return $tmpChanges; |
— | — | @@ -686,7 +686,7 @@ |
687 | 687 | * (c) Current file doesn't exist and the "version used" existed (deleted) |
688 | 688 | * |
689 | 689 | * @param string $noForeign Using 'noForeign' skips foreign file updates (bug 15748) |
690 | | - * @return array of (file title, MW file timestamp in reviewed version) tuples |
| 690 | + * @return array of (title, MW file timestamp in reviewed version, has stable rev) tuples |
691 | 691 | */ |
692 | 692 | public function findPendingFileChanges( $noForeign = false ) { |
693 | 693 | if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
— | — | @@ -747,7 +747,7 @@ |
748 | 748 | $deleted = (bool)$tsStable; // included file deleted after review |
749 | 749 | } |
750 | 750 | if ( $deleted || $updated ) { |
751 | | - $fileChanges[] = array( $title, $tsStable ); |
| 751 | + $fileChanges[] = array( $title, $tsStable, (bool)$row->fr_img_timestamp ); |
752 | 752 | } |
753 | 753 | } |
754 | 754 | return $fileChanges; |
Index: trunk/extensions/FlaggedRevs/presentation/language/RevisionReview.i18n.php |
— | — | @@ -75,7 +75,8 @@ |
76 | 76 | 'revreview-update-edited-prev' => '<span class="flaggedrevs_important">Your changes are not yet in the stable version. There are previous changes pending review.</span> |
77 | 77 | |
78 | 78 | Please review all the changes shown below to make your edits appear in the stable version.', |
79 | | - 'revreview-update-includes' => '\'\'\'Some templates/files were updated:\'\'\'', |
| 79 | + 'revreview-update-includes' => '\'\'\'Templates/files updated (unreviewed pages boldened):\'\'\'', |
| 80 | + 'revreview-update-includes-p' => '\'\'\'Templates or files may have been updated. Please preview the page before accepting.\'\'\'', |
80 | 81 | 'revreview-update-use' => '\'\'\'NOTE:\'\'\' The stable version of each of these templates/files is used in the stable version of this page.', |
81 | 82 | |
82 | 83 | 'revreview-reject-header' => 'Reject changes for $1', |
Index: trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php |
— | — | @@ -1330,7 +1330,7 @@ |
1331 | 1331 | * (ii) List any template/file changes pending review |
1332 | 1332 | */ |
1333 | 1333 | public function addToDiffView( $diff, $oldRev, $newRev ) { |
1334 | | - global $wgRequest, $wgUser, $wgMemc; |
| 1334 | + global $wgRequest, $wgUser, $wgMemc, $wgParserCacheExpireTime; |
1335 | 1335 | $this->load(); |
1336 | 1336 | # Exempt printer-friendly output |
1337 | 1337 | if ( $this->out->isPrintable() ) { |
— | — | @@ -1361,7 +1361,6 @@ |
1362 | 1362 | $changeList = array_merge( $changeList, self::fetchFileChanges( $srev ) ); |
1363 | 1363 | # Correct bad cache which said they were not synced... |
1364 | 1364 | if ( !count( $changeList ) ) { |
1365 | | - global $wgParserCacheExpireTime; |
1366 | 1365 | $key = wfMemcKey( 'flaggedrevs', 'includesSynced', $this->article->getId() ); |
1367 | 1366 | $data = FlaggedRevs::makeMemcObj( "true" ); |
1368 | 1367 | $wgMemc->set( $key, $data, $wgParserCacheExpireTime ); |
— | — | @@ -1395,7 +1394,11 @@ |
1396 | 1395 | $changeDiv .= wfMsgExt( $msg, 'parse' ); |
1397 | 1396 | } |
1398 | 1397 | # Add include change list... |
1399 | | - if ( count( $changeList ) ) { |
| 1398 | + if ( $this->article->revsArePending() ) { // text changes |
| 1399 | + if ( FlaggedRevs::inclusionSetting() != FR_INCLUDES_CURRENT ) { |
| 1400 | + $changeDiv .= wfMsgExt( 'revreview-update-includes-p', 'parse' ); |
| 1401 | + } |
| 1402 | + } elseif ( count( $changeList ) ) { // just inclusion changes |
1400 | 1403 | $changeDiv .= '<p>' . |
1401 | 1404 | wfMsgExt( 'revreview-update-includes', 'parseinline' ) . |
1402 | 1405 | ' ' . implode( ', ', $changeList ) . '</p>'; |
— | — | @@ -1544,10 +1547,14 @@ |
1545 | 1548 | $diffLinks = array(); |
1546 | 1549 | $changes = $frev->findPendingTemplateChanges(); |
1547 | 1550 | foreach ( $changes as $tuple ) { |
1548 | | - list( $title, $revIdStable ) = $tuple; |
1549 | | - $diffLinks[] = $skin->makeLinkObj( $title, |
| 1551 | + list( $title, $revIdStable, $hasStable ) = $tuple; |
| 1552 | + $link = $skin->makeLinkObj( $title, |
1550 | 1553 | htmlspecialchars( $title->getPrefixedText() ), |
1551 | 1554 | 'diff=cur&oldid=' . (int)$revIdStable ); |
| 1555 | + if ( !$hasStable ) { |
| 1556 | + $link = "<strong>$link</strong>"; |
| 1557 | + } |
| 1558 | + $diffLinks[] = $link; |
1552 | 1559 | } |
1553 | 1560 | return $diffLinks; |
1554 | 1561 | } |
— | — | @@ -1560,9 +1567,13 @@ |
1561 | 1568 | $diffLinks = array(); |
1562 | 1569 | $changes = $frev->findPendingFileChanges( 'noForeign' ); |
1563 | 1570 | foreach ( $changes as $tuple ) { |
1564 | | - list( $title, $revIdStable ) = $tuple; |
| 1571 | + list( $title, $revIdStable, $hasStable ) = $tuple; |
1565 | 1572 | // @TODO: change when MW has file diffs |
1566 | | - $diffLinks[] = $skin->makeLinkObj( $title, htmlspecialchars( $title->getPrefixedText() ) ); |
| 1573 | + $link = $skin->makeLinkObj( $title, htmlspecialchars( $title->getPrefixedText() ) ); |
| 1574 | + if ( !$hasStable ) { |
| 1575 | + $link = "<strong>$link</strong>"; |
| 1576 | + } |
| 1577 | + $diffLinks[] = $link; |
1567 | 1578 | } |
1568 | 1579 | return $diffLinks; |
1569 | 1580 | } |