r73523 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73522‎ | r73523 | r73524 >
Date:12:58, 22 September 2010
Author:catrope
Status:deferred
Tags:
Comment:
ArticleAssessment: Per r73257 CR, use the second parameter of getVal() (default value) to eliminate a second call. Also use getCheck() instead of getVal() !== null, merge the two conditions and trigger on &oldid as well.
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.hooks.php
@@ -80,10 +80,9 @@
8181 global $wgRequest;
8282
8383 // Only show for view actions.
84 - if ( $wgRequest->getVal( 'action' ) !== null && $wgRequest->getVal( 'action' ) !== 'view' ) {
 84+ if ( $wgRequest->getVal( 'action', 'view' ) !== 'view' || $wgRequest->getCheck( 'diff' ) ||
 85+ $wgRequest->getCheck( 'oldid' ) ) {
8586 return true;
86 - } else if ( $wgRequest->getVal( 'diff' ) !== null) {
87 - return true;
8887 }
8988
9089 global $wgArticleAssessmentCategory;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73257Only show on view pages.bharris23:08, 17 September 2010

Status & tagging log