r21536 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21535‎ | r21536 | r21537 >
Date:17:42, 24 April 2007
Author:aaron
Status:old
Tags:
Comment:
*Some fixes
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage.i18n.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/Makevalidate.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/Makevalidate.class.php
@@ -67,7 +67,7 @@
6868 # Not a reviewer; show the grant form
6969 $wgOut->addHtml( $this->makeGrantForm( MW_MAKEVALIDATE_GRANT_GRANT ) );
7070 }
71 - } elseif( $wgRequest->getCheck( 'grantR' ) ) {
 71+ } elseif( $wgRequest->getCheck( 'grant2' ) ) {
7272 # Permission check
7373 if( !$wgUser->isAllowed( 'makevalidate' ) ) {
7474 $wgOut->permissionRequired( 'makevalidate' ); return;
@@ -80,7 +80,7 @@
8181 $user->addGroup( 'reviewer' );
8282 $this->addLogItem( 'grant2', $user, trim( $wgRequest->getText( 'comment' ) ) );
8383 $wgOut->addWikiText( wfMsg( 'makevalidate-granted-r', $user->getName() ) );
84 - } elseif( $wgRequest->getCheck( 'revokeR' ) ) {
 84+ } elseif( $wgRequest->getCheck( 'revoke2' ) ) {
8585 # Permission check
8686 if( !$wgUser->isAllowed( 'makevalidate' ) ) {
8787 $wgOut->permissionRequired( 'makevalidate' ); return;
@@ -90,13 +90,13 @@
9191 $user->removeGroup( 'reviewer' );
9292 $this->addLogItem( 'revoke2', $user, trim( $wgRequest->getText( 'comment' ) ) );
9393 $wgOut->addWikiText( wfMsg( 'makevalidate-revoked-r', $user->getName() ) );
94 - } elseif( $wgRequest->getCheck( 'grantE' ) ) {
 94+ } elseif( $wgRequest->getCheck( 'grant1' ) ) {
9595 # Grant the flag
9696 if( !in_array( 'editor', $user->mGroups ) )
9797 $user->addGroup( 'editor' );
9898 $this->addLogItem( 'grant1', $user, trim( $wgRequest->getText( 'comment' ) ) );
9999 $wgOut->addWikiText( wfMsg( 'makevalidate-granted-e', $user->getName() ) );
100 - } elseif( $wgRequest->getCheck( 'revokeE' ) ) {
 100+ } elseif( $wgRequest->getCheck( 'revoke1' ) ) {
101101 if( in_array( 'reviewer', $user->mGroups ) ) {
102102 # Permission check
103103 if( !$wgUser->isAllowed( 'makevalidate' ) ) {
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php
@@ -25,9 +25,14 @@
2626 $this->target = $wgRequest->getText( 'target' );
2727 // Revision ID
2828 $this->oldid = $wgRequest->getIntOrNull( 'oldid' );
29 - // Must be a valid page/Id
 29+
 30+ // Must be a valid content page
3031 $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) ) {
3237 $wgOut->showErrorPage('notargettitle', 'notargettext' );
3338 return;
3439 }
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.i18n.php
@@ -46,9 +46,13 @@
4747 'review-logaction' => 'revision $1',
4848
4949
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
5357 revision.",
5458 'revreview-toolow' => 'You must at least rate each of the below attributes higher than "unapproved" in order
5559 for a revision to be considered reviewed. To depreciate a revision, set all fields to "unapproved".',