Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1977,9 +1977,10 @@ |
1978 | 1978 | # Show link to page with oldid=x |
1979 | 1979 | if( $type == 'review' && in_array($action,$actionsValid) && is_object($title) && isset($paramArray[0]) ) { |
1980 | 1980 | global $wgUser; |
1981 | | - if( !empty($paramArray[1]) ) { |
| 1981 | + # Don't show diff if param missing or rev IDs are the same |
| 1982 | + if( !empty($paramArray[1]) && $paramArray[0] != $paramArray[1] ) { |
1982 | 1983 | $r = '(' . $wgUser->getSkin()->makeKnownLinkObj( $title, wfMsgHtml('review-logentry-diff'), |
1983 | | - "oldid={$paramArray[1]}&diff={$paramArray[0]}") . ')'; |
| 1984 | + "oldid={$paramArray[1]}&diff={$paramArray[0]}") . ') '; |
1984 | 1985 | } else { |
1985 | 1986 | $r = '(' . wfMsgHtml('review-logentry-diff') . ')'; |
1986 | 1987 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -666,10 +666,6 @@ |
667 | 667 | global $wgUser, $wgParser, $wgRevisionCacheExpiry, $wgMemc; |
668 | 668 | wfProfileIn( __METHOD__ ); |
669 | 669 | |
670 | | - # Get current stable version ID (for logging) |
671 | | - $oldSv = FlaggedRevision::newFromStable( $this->page, false, true ); |
672 | | - $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
673 | | - |
674 | 670 | $dbw = wfGetDB( DB_MASTER ); |
675 | 671 | $dbw->begin(); |
676 | 672 | # Delete from flaggedrevs table |
— | — | @@ -680,6 +676,10 @@ |
681 | 677 | $dbw->delete( 'flaggedimages', array( 'fi_rev_id' => $frev->getRevId() ) ); |
682 | 678 | $dbw->commit(); |
683 | 679 | |
| 680 | + # Get current stable version ID (for logging) |
| 681 | + $oldSv = FlaggedRevision::newFromStable( $this->page, false, true ); |
| 682 | + $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
| 683 | + |
684 | 684 | # Update the article review log |
685 | 685 | $this->updateLog( $this->page, $this->dims, $this->oflags, $this->comment, $this->oldid, $oldSvId, false ); |
686 | 686 | |