Last modified: 2011-03-13 18:04:55 UTC
use the SpecialPage function, e.g: --- SpecialCrossNamespaceLinks.php Tue Dec 27 21:10:32 2005 +++ SpecialCrossNamespaceLinks.php.new Tue Dec 27 13:19:56 2005 @@ -38,9 +41,10 @@ * Constructor */ function CrossNamespaceLinks() { - $this->name( 'CrossNamespaceLinks' ); - $this->file( __FILE__ ); - $this->listed( true ); + $this->SpecialPage('CrossNamespaceLinks', '', true, false, __FILE__); + //$this->mName( 'CrossNamespaceLinks' ); + //$this->mFile( __FILE__ ); + //$this->mListed( true ); } /**
There's a good reason for why I did that instead of using the constructor function. 1. I want to override & set ->mName 2. I want to override & set ->mFile 3. I want to override & set ->mListed By using your version I'd be doing that, but I'd also be: 1. Overriding & setting ->mRestrictions 2. Overriding & setting ->mFunction Due to the way the PHP syntax works you can't choose to skip certain paramaters when you call a function, you could in some other languages (like Perl 6) but PHP doesn't have that, and its developers have refused to add a feature like that. RESOLVING as WONTFIX.
ok, but these var don't exist when running this script with php 4.1.3 . The actual error message with SpecialCrossNamespaceLinks.php Version 1.5: Fatal error: Call to undefined function: name() in /path/to/mediawiki/extensions/SpecialCrossNamespaceLinks.php on line 41
(In reply to comment #2) > Fatal error: Call to undefined function: name() > in /path/to/mediawiki/extensions/SpecialCrossNamespaceLinks.php on line 41 Ah, that accessor/mutator was introduced in version 1.75 of SpecialPage.php which hasn't made it into a release version. It only exists in HEAD (and some other non-release stuff).