Index: trunk/extensions/FlaggedRevs/Makevalidate.class.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | # Not a reviewer; show the grant form |
69 | 69 | $wgOut->addHtml( $this->makeGrantForm( MW_MAKEVALIDATE_GRANT_GRANT ) ); |
70 | 70 | } |
71 | | - } elseif( $wgRequest->getCheck( 'grantR' ) ) { |
| 71 | + } elseif( $wgRequest->getCheck( 'grant2' ) ) { |
72 | 72 | # Permission check |
73 | 73 | if( !$wgUser->isAllowed( 'makevalidate' ) ) { |
74 | 74 | $wgOut->permissionRequired( 'makevalidate' ); return; |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | $user->addGroup( 'reviewer' ); |
82 | 82 | $this->addLogItem( 'grant2', $user, trim( $wgRequest->getText( 'comment' ) ) ); |
83 | 83 | $wgOut->addWikiText( wfMsg( 'makevalidate-granted-r', $user->getName() ) ); |
84 | | - } elseif( $wgRequest->getCheck( 'revokeR' ) ) { |
| 84 | + } elseif( $wgRequest->getCheck( 'revoke2' ) ) { |
85 | 85 | # Permission check |
86 | 86 | if( !$wgUser->isAllowed( 'makevalidate' ) ) { |
87 | 87 | $wgOut->permissionRequired( 'makevalidate' ); return; |
— | — | @@ -90,13 +90,13 @@ |
91 | 91 | $user->removeGroup( 'reviewer' ); |
92 | 92 | $this->addLogItem( 'revoke2', $user, trim( $wgRequest->getText( 'comment' ) ) ); |
93 | 93 | $wgOut->addWikiText( wfMsg( 'makevalidate-revoked-r', $user->getName() ) ); |
94 | | - } elseif( $wgRequest->getCheck( 'grantE' ) ) { |
| 94 | + } elseif( $wgRequest->getCheck( 'grant1' ) ) { |
95 | 95 | # Grant the flag |
96 | 96 | if( !in_array( 'editor', $user->mGroups ) ) |
97 | 97 | $user->addGroup( 'editor' ); |
98 | 98 | $this->addLogItem( 'grant1', $user, trim( $wgRequest->getText( 'comment' ) ) ); |
99 | 99 | $wgOut->addWikiText( wfMsg( 'makevalidate-granted-e', $user->getName() ) ); |
100 | | - } elseif( $wgRequest->getCheck( 'revokeE' ) ) { |
| 100 | + } elseif( $wgRequest->getCheck( 'revoke1' ) ) { |
101 | 101 | if( in_array( 'reviewer', $user->mGroups ) ) { |
102 | 102 | # Permission check |
103 | 103 | if( !$wgUser->isAllowed( 'makevalidate' ) ) { |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php |
— | — | @@ -25,9 +25,14 @@ |
26 | 26 | $this->target = $wgRequest->getText( 'target' ); |
27 | 27 | // Revision ID |
28 | 28 | $this->oldid = $wgRequest->getIntOrNull( 'oldid' ); |
29 | | - // Must be a valid page/Id |
| 29 | + |
| 30 | + // Must be a valid content page |
30 | 31 | $this->page = Title::newFromUrl( $this->target ); |
31 | | - if( is_null($this->page) || is_null($this->oldid) || !$this->page->isContentPage() ) { |
| 32 | + if ( !$this->target || !$this->oldid || !$this->page->isContentPage() ) { |
| 33 | + $wgOut->addHTML( wfMsgExt('revreview-main',array('parse')) ); |
| 34 | + return; |
| 35 | + } |
| 36 | + if( is_null($this->page) || is_null($this->oldid) ) { |
32 | 37 | $wgOut->showErrorPage('notargettitle', 'notargettext' ); |
33 | 38 | return; |
34 | 39 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.i18n.php |
— | — | @@ -46,9 +46,13 @@ |
47 | 47 | 'review-logaction' => 'revision $1', |
48 | 48 | |
49 | 49 | |
50 | | - 'revisionreview' => 'Review revisions', |
51 | | - 'revreview-selected' => "Selected revision of '''$1:'''", |
52 | | - 'revreview-text' => "Approved revisions are set as the default content on page view rather than the newest |
| 50 | + 'revisionreview' => 'Review revisions', |
| 51 | + 'revreview-main' => 'You must select a particular revision from a content page in order to review. |
| 52 | + |
| 53 | + See the [[Special:Unreviewedpages]] for a list of |
| 54 | + unreviewed pages.', |
| 55 | + 'revreview-selected' => "Selected revision of '''$1:'''", |
| 56 | + 'revreview-text' => "Approved revisions are set as the default content on page view rather than the newest |
53 | 57 | revision.", |
54 | 58 | 'revreview-toolow' => 'You must at least rate each of the below attributes higher than "unapproved" in order |
55 | 59 | for a revision to be considered reviewed. To depreciate a revision, set all fields to "unapproved".', |