r77427 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77426‎ | r77427 | r77428 >
Date:19:04, 29 November 2010
Author:catrope
Status:ok
Tags:
Comment:
Fix regression from r77091 causing checkboxes for batch status/tag changes to be hidden. $batchForm needs to be public because it's accessed from the pager class, but this wasn't noticed before because this usage was wrapped in empty() (Tim's right, it's evil); fixed that too.
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -667,7 +667,6 @@
668668 * @param $revs array of revision IDs
669669 */
670670 public function addReferencesTo( $revs ) {
671 - // TODO: Refactor common bits out
672671 $dbw = wfGetDB( DB_MASTER );
673672 $data = array();
674673 foreach ( array_unique( (array)$revs ) as $rev ) {
@@ -688,7 +687,6 @@
689688 * @param $revs array of revision IDs
690689 */
691690 public function removeReferencesFrom( $revs ) {
692 - // TODO: Introduce removeReferencesTo() and refactor common bits out
693691 $dbw = wfGetDB( DB_MASTER );
694692 $dbw->delete( 'code_relations', array(
695693 'cf_repo_id' => $this->getRepoId(),
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -2,10 +2,8 @@
33
44 // Special:Code/MediaWiki
55 class CodeRevisionListView extends CodeView {
6 - public $mRepo, $mPath;
 6+ public $mRepo, $mPath, $batchForm;
77
8 - private $batchForm;
9 -
108 function __construct( $repoName ) {
119 global $wgRequest;
1210 parent::__construct();
@@ -298,7 +296,7 @@
299297 'cr_timestamp' => wfMsg( 'code-field-timestamp' ),
300298 );
301299 # Only show checkboxen as needed
302 - if ( !empty( $this->mView->batchForm ) ) {
 300+ if ( $this->mView->batchForm ) {
303301 $fields = array( 'selectforchange' => wfMsg( 'code-field-select' ) ) + $fields;
304302 }
305303 return $fields;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77091Explicitally declare variable, remove unused variable/call...reedy23:24, 21 November 2010

Status & tagging log