Juanma Barranquero wrote:
On 9/16/05, Jamie Bliss astronouth7303@gmail.com wrote:
Ug. Whoever wrote that extension should remove it.
I don't understand. *I* wrote MyExtension (not the real name, of course). It adds a special page. Before, it just worked. Now, I have to pre-load SpecialPage.php. Why the difference? Did something change in the way modules are loaded, or in the paths used for it?
Basically, it will try to load the file if the class doesn't exist, based on the class name. IMHO, this is fine when you write your own stuff and you control all the classes and file names. But in MediaWiki, file names and class names don't always match.
The way it is done sometimes is to wrap the class definition and other initialization bits in an extension function. (There is an example of this at extensions/BoardVote/BoardVote.php in CVS. http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/BoardVote/BoardVote.php)
-- Jamie ------------------------------------------------------------------- http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB.