Last modified: 2010-05-15 15:33:02 UTC
To add a special page as an extension, instead of manually editing SpecialPage.php, you're supposed to use SpecialPage::addPage and new SpecialPage(). These functions are in SpecialPage.php, which is not included/required at the point where extension init functions are called. This means you have to require it in the extension function, which again means SpecialPage.php is included on every single page load, not just for special pages. Suggestion: make a $wgSpecialPageFunctions array, similar to $wgExtensionFunctions, but used when including SpecialPage.php (instead of Setup.php).
If you put the require_once() inside your $wgExtensionFunction it will only be required when the function is called and not on every page hit, if there's a problem with specific extensions putting the require_once() outside of a function please open seperate bugs for that. Marking this as INVALID.
(In reply to comment #1) > If you put the require_once() inside your $wgExtensionFunction it will only be > required when the function is called and not on every page hit Except the functions in $wgExtensionFunctions are called on every page hit, meaning SpecialPage.php gets included regardless of whether you do it inside or outside the function.
If including SpecialPage.php on every single page hit is a problem (as I see it) then do something about this bug. If it isn't a problem, make it included by default so we don't have to put require_once() in every single special page we add. It's pointless redundancy.