"Catrope" changed the status of MediaWiki.r110611 to "ok" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/110611#c31533

Old Status: new
New Status: ok

Commit summary for MediaWiki.r110611:

AFT5: Use wgExtensionAssetsPath, which refs r109971, and make the more button 
only display when there're actually more records to load.

Catrope's comment:

<pre>
+ if( count( $ids ) == $limit ) {
</pre>
Instead of counting the number of ids every time, just keep a counter variable. 
If the limit is something like 500 and you're counting the array at every 
iteration, you're counting 1+2+3+...+500 = 125,250 things.

<pre>
+ array_pop( $ids );
</pre>
You could've decided to just not add it in the first place, no use adding an 
element to an array and removing it right after.

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

Reply via email to