User "Reedy" changed the status of MediaWiki.r79017.

Old Status: new
New Status: ok

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/79017#c0
Commit summary:

Changing the skin loader to load classes using the pattern "Skin{$skinName}" 
instead of `"Skin" . ucfirst($key)` as the current behavior has been causing 
bugs with extension based skins attempting to use the autoloader to load their 
skins.
Under current behavior for "MonoBook" the skin loader will load "SkinMonobook" 
instead of "SkinMonoBook". Because the skin system loads from skins/ when it 
can't find a skin and php's class system is case insensitive by a fluke 
MonoBook has been fine despite the skin loader trying to load SkinMonobook 
despite the class being named SkinMonoBook.
However our autoloader is case-sensitive, and as a result if you try to name 
your extension based skin class something like SkinStereoBook the skin will 
break with a cryptic error message because the skin loader attempts to load 
SkinStereobook, doesn't find it in the autoloader, then throws a php error when 
it tries to load skins/StereoBook.php and can't find the file.
We have also been using the $skinName to generate the name of the file to load 
from skins/ so this value is already expected to be safe for use in this way.

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

Reply via email to