Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -951,10 +951,10 @@ |
952 | 952 | $change = RecentChange::newFromConds( |
953 | 953 | array( |
954 | 954 | // Add redundant timestamp condition so we can use the existing index |
955 | | - 'rc_timestamp' => $dbr->timestamp( $diff->mNewRev->getTimestamp() ), |
| 955 | + 'rc_timestamp' => $dbr->timestamp( $diff->mNewRev->getTimestamp() ), |
956 | 956 | 'rc_this_oldid' => $diff->mNewid, |
957 | 957 | 'rc_last_oldid' => $diff->mOldid, |
958 | | - 'rc_patrolled' => 0, |
| 958 | + 'rc_patrolled' => 0, |
959 | 959 | ), |
960 | 960 | __METHOD__ |
961 | 961 | ); |
— | — | @@ -970,9 +970,8 @@ |
971 | 971 | $skin = $wgUser->getSkin(); |
972 | 972 | |
973 | 973 | $reviewtitle = SpecialPage::getTitleFor( 'Revisionreview' ); |
974 | | - $patrol = '[' . $skin->makeKnownLinkObj( $reviewtitle, |
975 | | - wfMsgHtml( 'markaspatrolleddiff' ), |
976 | | - "patrolonly=1&rcid={$rcid}") . ']'; |
| 974 | + $patrol = '[' . $skin->makeKnownLinkObj( $reviewtitle, wfMsgHtml( 'markaspatrolleddiff' ), |
| 975 | + "patrolonly=1&target=" . $NewRev->getTitle()->getPrefixedUrl() . "&rcid={$rcid}" ) . ']'; |
977 | 976 | } else { |
978 | 977 | $patrol = ''; |
979 | 978 | } |
Index: trunk/extensions/FlaggedRevs/Language/FlaggedRevsPage.i18n.en.php |
— | — | @@ -60,6 +60,7 @@ |
61 | 61 | You may want to preview the page before saving.", |
62 | 62 | 'revreview-auto-w-old' => "You are editing an old revision, any changes will '''automatically be reviewed'''. |
63 | 63 | You may want to preview the page before saving.", |
| 64 | + 'revreview-patrolled' => 'The selected revision of [[:$1|$1]] has been marked as patrolled.', |
64 | 65 | |
65 | 66 | 'hist-stable' => '[sighted]', |
66 | 67 | 'hist-quality' => '[quality]', |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -33,28 +33,30 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | $this->setHeaders(); |
| 37 | + // Our target page |
| 38 | + $this->target = $wgRequest->getText( 'target' ); |
| 39 | + $this->page = Title::newFromUrl( $this->target ); |
37 | 40 | // Basic patrolling |
38 | 41 | $this->patrolonly = $wgRequest->getBool( 'patrolonly' ); |
39 | 42 | $this->rcid = $wgRequest->getIntOrNull( 'rcid' ); |
| 43 | + |
| 44 | + if( is_null($this->page) ) { |
| 45 | + $wgOut->showErrorPage('notargettitle', 'notargettext' ); |
| 46 | + return; |
| 47 | + } |
| 48 | + // Patrol the edit if requested |
40 | 49 | if( $this->patrolonly && $this->rcid ) { |
41 | 50 | $this->markPatrolled(); |
42 | 51 | return; |
43 | 52 | } |
44 | 53 | |
45 | 54 | global $wgFlaggedRevTags, $wgFlaggedRevValues; |
46 | | - // Our target page |
47 | | - $this->target = $wgRequest->getText( 'target' ); |
48 | | - $this->page = Title::newFromUrl( $this->target ); |
49 | 55 | // Revision ID |
50 | 56 | $this->oldid = $wgRequest->getIntOrNull( 'oldid' ); |
51 | 57 | if( !$this->target || !$this->oldid || !FlaggedRevs::isPageReviewable( $this->page ) ) { |
52 | 58 | $wgOut->addHTML( wfMsgExt('revreview-main',array('parse')) ); |
53 | 59 | return; |
54 | 60 | } |
55 | | - if( is_null($this->page) || is_null($this->oldid) ) { |
56 | | - $wgOut->showErrorPage('notargettitle', 'notargettext' ); |
57 | | - return; |
58 | | - } |
59 | 61 | // Check if page is protected |
60 | 62 | if( !$this->page->quickUserCan( 'edit' ) ) { |
61 | 63 | $wgOut->permissionRequired( 'badaccess-group0' ); |
— | — | @@ -143,7 +145,7 @@ |
144 | 146 | PatrolLog::record( $this->rcid ); |
145 | 147 | # Inform the user |
146 | 148 | $wgOut->setPageTitle( wfMsg( 'markedaspatrolled' ) ); |
147 | | - $wgOut->addWikiText( wfMsgNoTrans( 'markedaspatrolledtext' ) ); |
| 149 | + $wgOut->addWikiText( wfMsgNoTrans( 'revreview-patrolled', $this->page->getPrefixedText() ) ); |
148 | 150 | $wgOut->returnToMain( false, SpecialPage::getTitleFor( 'Recentchanges' ) ); |
149 | 151 | } |
150 | 152 | |