in_array to isset on ApiQueryLogEvents as per (most?) rest of the API
authorSam Reed <reedy@users.mediawiki.org>
Sun, 31 Jan 2010 22:28:27 +0000 (22:28 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 31 Jan 2010 22:28:27 +0000 (22:28 +0000)
includes/api/ApiQueryLogEvents.php

index 86d48e6..ea92260 100644 (file)
@@ -44,14 +44,14 @@ class ApiQueryLogEvents extends ApiQueryBase {
                $db = $this->getDB();
 
                $prop = $params['prop'];
-               $this->fld_ids = in_array( 'ids', $prop );
-               $this->fld_title = in_array( 'title', $prop );
-               $this->fld_type = in_array( 'type', $prop );
-               $this->fld_user = in_array( 'user', $prop );
-               $this->fld_timestamp = in_array( 'timestamp', $prop );
-               $this->fld_comment = in_array( 'comment', $prop );
-               $this->fld_details = in_array( 'details', $prop );
-               $this->fld_tags = in_array( 'tags', $prop );
+               $this->fld_ids = isset( $prop['ids' );
+               $this->fld_title = isset( $prop['title' );
+               $this->fld_type = isset( $prop['type' );
+               $this->fld_user = isset( $prop['user' );
+               $this->fld_timestamp = isset( $prop['timestamp' );
+               $this->fld_comment = isset( $prop['comment' );
+               $this->fld_details = isset( $prop['details' );
+               $this->fld_tags = isset( $prop['tags' );
 
                list( $tbl_logging, $tbl_page, $tbl_user ) = $db->tableNamesN( 'logging', 'page', 'user' );