r100239 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100238‎ | r100239 | r100240 >
Date:17:09, 19 October 2011
Author:happy-melon
Status:resolved (Comments)
Tags:
Comment:
Follow-up r82285: we should not apply case conversion to these names, because it's unintuitive and potentially risky when they could theoretically contain weird characters. It was necessary before r86508, but not now there is a prefix meaning the group name is not at the start of the title. Plus the default messages are already at the lowercase titles.
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderUserGroupsModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderUserGroupsModule.php
@@ -39,7 +39,6 @@
4040 if( in_array( $group, array( '*', 'user' ) ) ){
4141 continue;
4242 }
43 - $g = ucfirst( $group );
4443 $pages["MediaWiki:Group-$g.js"] = array( 'type' => 'script' );
4544 $pages["MediaWiki:Group-$g.css"] = array( 'type' => 'style' );
4645 }

Sign-offs

UserFlagDate
He7d3rinspected18:02, 19 October 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r100242* Fixed undefined var $g error...aaron17:30, 19 October 2011
r100750REL1_18 MFT r98997, r99118, r99370, r99700, r100239, r100242, r100347, r10051...reedy21:51, 25 October 2011
r1007591.18wmf1 MFT r93977, r98990, r99349, r100239, r100242reedy22:51, 25 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82285Create a user.groups module in ResourceLoader, which bundles a CSS and JS pag...happy-melon19:54, 16 February 2011
r86508Follow-up r82285: prefix group css and js pages with "Group-", and fix licens...happy-melon17:29, 20 April 2011

Comments

#Comment by Happy-melon (talk | contribs)   17:14, 19 October 2011

Can we get a ping at en:MediaWiki talk:Common.js#Group-specific JS and CSS when this is deployed, please?

#Comment by He7d3r (talk | contribs)   18:02, 19 October 2011

Great! This explains why it didn't work on Portuguese Wikipedia: [1]

#Comment by He7d3r (talk | contribs)   18:05, 19 October 2011

Er... I think this needs a small fix: "$g" is not defined anymore but you are still using it on:

$pages["MediaWiki:Group-$g.js"]
$pages["MediaWiki:Group-$g.css"]

It should be replaced by "$group", I think.

#Comment by Happy-melon (talk | contribs)   18:25, 19 October 2011

Fixed by Aaron; but yes, it was completely broken. :(

Status & tagging log