User "Awjrichards" posted a comment on MediaWiki.r87381.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/87381#c16570
Commit summary:

Now actually determing only the top and bottom 50 rated pages

Comment:

> Don't use array_merge() , use the plus operator in this case. If there are 
> between 51 and 99 elements in $averages, the left and right side will 
> overlap, and array_merge() will shift the (integral!) keys to avoid key 
> collisions, while the plus operator just lets the left(?) side win.

Oh you are absolutely right, array_merge only overwrites when keys are strings 
- good catch

> That's a really elaborate way of saying !isset( 
> $highest_and_lowest_page_ids[$page_id] ) ;)

Ahh.. yeah :-/  Heh.  Fixes coming up.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to