User "Bawolff" changed the status of MediaWiki.r86255.

Old Status: resolved
New Status: fixme

User "Bawolff" also posted a comment on MediaWiki.r86255.

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

Refactor the factory/i18n/list/etc static methods from SpecialPage into their 
own class; there's no reason we need to be parsing them in every single 
SpecialPage subclass.  Leave all the methods as stubs in SpecialPage.php; if we 
required PHP 5.3 they could be replaced by a a __callStatic() magic method, but 
that doesn't work on PHP 5.2.

Also make a few changes to the functions available.  
SpecialPageFactory::resolveAlias() now takes an optional subpage and returns 
array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  
There were many examples of (extensions particularly) making dubious 
assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred 
calls.  I'm rather undecided on the best position of getPage()/executePath().  
Although the latter needs cleanup anyway.

Comment:

This causes a very minor regression in 1.18 (noticed by Jack Phoenix on irc). 
If you have a link a line in mediawiki:sidebar like:
<pre>
Special:Code/MediaWiki|Look at MediaWiki codebase
</pre>
before it would link to [[Special:Code/MediaWiki]] where now it links to 
[[Special:Code]]. (Same for all special pages, however subpages are preserved 
for normal links)

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

Reply via email to