"Nikerabbit" posted a comment on MediaWiki.r111272.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111272#c30812

Commit summary for MediaWiki.r111272:

* Move hard coded styles in MessageWebImporter to CSS.
* Break long line.
* Bump version.
* Update an unanswered @todo.
* Add MessageGroups::getAllMessageGroups() as a replacement of 
MessageGroups::getGroups()
* Update MessageGroups::getAllMessageGroups() to reduce code duplication in 
export.php and sync-group.php. Added two optional parameters:
** $groups: Get an array of groups for an array of group IDs.
** $groupPrefix: Get an array of groups with a given prefix.
* Exit export.php if no valid group IDs are given.
* i18n for two hard coded strings.
* Add FIXME for missing i18n.

Nikerabbit's comment:

<pre>
+               if ( count( $groups ) ) {
+                       // Get groups and add groups to array
+                       foreach ( $groupIds as $groupId ) {
</pre>

Count will return 1 for strings, but foreach will throw a warning if it doesn't 
get an array.

<pre>
+       'translate-checks-malformed'          => 
'<nowiki>$traArray[$i]</nowiki> is malformed.',
</pre>

That is not supposed to be literal, is it?

I would split the new getGroups into two methods, getGroupsById and 
getGroupsByPrefix since they don't share common code.



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

Reply via email to