r62466 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62465‎ | r62466 | r62467 >
Date:15:19, 14 February 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Followup to r62465, should be in an array
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryCategories.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryWatchlistRaw.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -132,7 +132,7 @@
133133 || ( isset ( $show['redirect'] ) && isset ( $show['!redirect'] ) )
134134 || ( isset ( $show['patrolled'] ) && isset ( $show['!patrolled'] ) ) ) {
135135
136 - $this->dieUsageMsg( 'show' );
 136+ $this->dieUsageMsg( array( 'show' ) );
137137 }
138138
139139 // Check permissions
Index: trunk/phase3/includes/api/ApiQueryWatchlistRaw.php
@@ -59,7 +59,7 @@
6060 $prop = array_flip( (array)$params['prop'] );
6161 $show = array_flip( (array)$params['show'] );
6262 if ( isset( $show['changed'] ) && isset( $show['!changed'] ) )
63 - $this->dieUsageMsg( 'show' );
 63+ $this->dieUsageMsg( array( 'show' ) );
6464
6565 $this->addTables( 'watchlist' );
6666 $this->addFields( array( 'wl_namespace', 'wl_title' ) );
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -151,7 +151,7 @@
152152 || ( isset ( $show['anon'] ) && isset ( $show['!anon'] ) )
153153 || ( isset ( $show['patrolled'] ) && isset ( $show['!patrolled'] ) ) ) {
154154
155 - $this->dieUsageMsg( 'show' );
 155+ $this->dieUsageMsg( array( 'show' ) );
156156 }
157157
158158 // Check permissions. FIXME: should this check $user instead of $wgUser?
Index: trunk/phase3/includes/api/ApiQueryCategories.php
@@ -93,7 +93,7 @@
9494 }
9595
9696 if ( isset( $show['hidden'] ) && isset( $show['!hidden'] ) )
97 - $this->dieUsageMsg( 'show' );
 97+ $this->dieUsageMsg( array( 'show' ) );
9898 if ( isset( $show['hidden'] ) || isset( $show['!hidden'] ) || isset( $prop['hidden'] ) )
9999 {
100100 $this->addOption( 'STRAIGHT_JOIN' );
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -185,7 +185,7 @@
186186 $show = array_flip( $show );
187187 if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
188188 || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) ) )
189 - $this->dieUsageMsg( 'show' );
 189+ $this->dieUsageMsg( array( 'show' ) );
190190
191191 $this->addWhereIf( 'rev_minor_edit = 0', isset( $show['!minor'] ) );
192192 $this->addWhereIf( 'rev_minor_edit != 0', isset( $show['minor'] ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62465Move ( 'code' => 'show', 'info' => 'Incorrect parameter - mutually exclusive ...reedy15:16, 14 February 2010

Comments

#Comment by Bryan (talk | contribs)   11:14, 20 February 2010

dieUsageMsg could easily cast its first parameter to an array, like wfMsgExt and many other functions do for their options parameter. That's just a few bytes less typing for every usage. Or am I now being lazy?

Status & tagging log