r111291 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111290‎ | r111291 | r111292 >
Date:13:52, 12 February 2012
Author:jeroendedauw
Status:ok
Tags:
Comment:
use array_diff instead of self written equivalent
Modified paths:
  • /trunk/phase3/includes/DBDataObject.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DBDataObject.php
@@ -211,10 +211,7 @@
212212 }
213213
214214 if ( $skipLoaded ) {
215 - $loadedFields = array_keys( $this->fields );
216 - $fields = array_filter( $fields, function( $field ) use ( $loadedFields ) {
217 - return !in_array( $field, $loadedFields );
218 - } );
 215+ $fields = array_diff( $fields, array_keys( $this->fields ) );
219216 }
220217
221218 if ( count( $fields ) > 0 ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111264adding DBDataObject class after having some people review it and posting on t...jeroendedauw21:34, 11 February 2012

Status & tagging log