r61760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61759‎ | r61760 | r61761 >
Date:22:28, 31 January 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
in_array to isset on ApiQueryLogEvents as per (most?) rest of the API
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -44,14 +44,14 @@
4545 $db = $this->getDB();
4646
4747 $prop = $params['prop'];
48 - $this->fld_ids = in_array( 'ids', $prop );
49 - $this->fld_title = in_array( 'title', $prop );
50 - $this->fld_type = in_array( 'type', $prop );
51 - $this->fld_user = in_array( 'user', $prop );
52 - $this->fld_timestamp = in_array( 'timestamp', $prop );
53 - $this->fld_comment = in_array( 'comment', $prop );
54 - $this->fld_details = in_array( 'details', $prop );
55 - $this->fld_tags = in_array( 'tags', $prop );
 48+ $this->fld_ids = isset( $prop['ids' );
 49+ $this->fld_title = isset( $prop['title' );
 50+ $this->fld_type = isset( $prop['type' );
 51+ $this->fld_user = isset( $prop['user' );
 52+ $this->fld_timestamp = isset( $prop['timestamp' );
 53+ $this->fld_comment = isset( $prop['comment' );
 54+ $this->fld_details = isset( $prop['details' );
 55+ $this->fld_tags = isset( $prop['tags' );
5656
5757 list( $tbl_logging, $tbl_page, $tbl_user ) = $db->tableNamesN( 'logging', 'page', 'user' );
5858

Follow-up revisions

RevisionCommit summaryAuthorDate
r61762Fix r61760reedy23:08, 31 January 2010
r61763Fix r61760/r61762reedy23:09, 31 January 2010
r61983array_flip() as per r61760#c5615 (follow up to r61760)reedy18:12, 4 February 2010

Comments

#Comment by P.Copp (talk | contribs)   12:53, 4 February 2010

Needs an array_flip()

Status & tagging log