r104057 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104056‎ | r104057 | r104058 >
Date:18:02, 23 November 2011
Author:jeroendedauw
Status:reverted
Tags:
Comment:
rename review right to postreview to avoid conflict with flagged revs and added action message docs
Modified paths:
  • /trunk/extensions/Reviews/Reviews.hooks.php (modified) (history)
  • /trunk/extensions/Reviews/Reviews.i18n.php (modified) (history)
  • /trunk/extensions/Reviews/Reviews.php (modified) (history)
  • /trunk/extensions/Reviews/api/ApiSubmitReview.php (modified) (history)
  • /trunk/extensions/Reviews/specials/SpecialMyReviews.php (modified) (history)
  • /trunk/extensions/Reviews/specials/SpecialReviews.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Reviews/specials/SpecialMyReviews.php
@@ -21,7 +21,7 @@
2222 * @since 0.1
2323 */
2424 public function __construct() {
25 - parent::__construct( 'MyReviews', 'review' );
 25+ parent::__construct( 'MyReviews', 'postreview' );
2626 }
2727
2828 /**
Index: trunk/extensions/Reviews/specials/SpecialReviews.php
@@ -21,7 +21,7 @@
2222 * @since 0.1
2323 */
2424 public function __construct() {
25 - parent::__construct( 'Reviews', 'review' );
 25+ parent::__construct( 'Reviews', 'postreview' );
2626 }
2727
2828 /**
Index: trunk/extensions/Reviews/Reviews.i18n.php
@@ -28,7 +28,7 @@
2929 'right-review' => 'Post reviews',
3030
3131 'action-reviewsadmin' => 'manage reviews',
32 - 'action-reviewer' => 'post reviews',
 32+ 'action-postreview' => 'post reviews',
3333
3434 // Groups
3535 'group-reviewsadmin' => 'Review admins',
@@ -80,6 +80,9 @@
8181 $messages['qqq'] = array(
8282 'reviews-toplink' => 'Text of top link linking to Special:MyReviews',
8383
 84+ 'action-postreview' => '{{doc-action|postreview}}',
 85+ 'action-reviewsadmin' => '{{doc-action|reviewsadmin}}',
 86+
8487 'reviews-state-new' => 'A state a review can be in',
8588 'reviews-state-flagged' => 'A state a review can be in',
8689 'reviews-state-reviewed' => 'A state a review can be in',
Index: trunk/extensions/Reviews/api/ApiSubmitReview.php
@@ -15,7 +15,7 @@
1616 class ApiSubmitReview extends ApiBase {
1717
1818 public function execute() {
19 - if ( !$this->getUser()->isAllowed( 'review' ) || $this->getUser()->isBlocked() ) {
 19+ if ( !$this->getUser()->isAllowed( 'postreview' ) || $this->getUser()->isBlocked() ) {
2020 $this->dieUsageMsg( array( 'badaccess-groups' ) );
2121 }
2222
Index: trunk/extensions/Reviews/Reviews.php
@@ -84,7 +84,7 @@
8585
8686 // Rights
8787 $wgAvailableRights[] = 'reviewsadmin';
88 -$wgAvailableRights[] = 'review';
 88+$wgAvailableRights[] = 'postreview';
8989
9090 # Users that can manage the reviews.
9191 $wgGroupPermissions['*' ]['reviewsadmin'] = false;
@@ -95,12 +95,12 @@
9696 $wgGroupPermissions['reviewsadmin' ]['reviewsadmin'] = true;
9797
9898 # Users that can post reviews.
99 -$wgGroupPermissions['*' ]['review'] = false;
100 -$wgGroupPermissions['user' ]['review'] = true;
101 -//$wgGroupPermissions['autoconfirmed']['review'] = true;
102 -//$wgGroupPermissions['bot' ]['review'] = false;
103 -$wgGroupPermissions['sysop' ]['review'] = true;
104 -$wgGroupPermissions['reviewer']['review'] = true;
 99+$wgGroupPermissions['*' ]['postreview'] = false;
 100+$wgGroupPermissions['user' ]['postreview'] = true;
 101+//$wgGroupPermissions['autoconfirmed']['postreview'] = true;
 102+//$wgGroupPermissions['bot' ]['postreview'] = false;
 103+$wgGroupPermissions['sysop' ]['postreview'] = true;
 104+$wgGroupPermissions['reviewer']['postreview'] = true;
105105
106106
107107 // Resource loader modules
Index: trunk/extensions/Reviews/Reviews.hooks.php
@@ -134,7 +134,7 @@
135135 public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) {
136136 /* User */ $user = $skin->getUser();
137137
138 - if ( $user->isLoggedIn() && $user->isAllowed( 'review' ) && $user->getOption( 'reviews_showcontrol' )
 138+ if ( $user->isLoggedIn() && $user->isAllowed( 'postreview' ) && $user->getOption( 'reviews_showcontrol' )
139139 && $out->isArticle()
140140 && $skin->getRequest()->getText( 'action' ) !== 'edit' ) {
141141

Follow-up revisions

RevisionCommit summaryAuthorDate
r104058Follow up to r104057;jeroendedauw18:02, 23 November 2011

Status & tagging log