Last modified: 2011-03-13 18:04:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4403 - extensions/CrossNamespaceLinks: uses this->name in constructor
extensions/CrossNamespaceLinks: uses this->name in constructor
Product: MediaWiki extensions
Classification: Unclassified
CrossNamespaceLinks (Other open bugs)
All All
: Lowest major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-12-27 20:12 UTC by Florian Steinel
Modified: 2011-03-13 18:04 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Florian Steinel 2005-12-27 20:12:33 UTC
use the SpecialPage function, e.g:
--- SpecialCrossNamespaceLinks.php      Tue Dec 27 21:10:32 2005
+++  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, 
+                       //$this->mName( 'CrossNamespaceLinks' );
+                       //$this->mFile( __FILE__ );
+                       //$this->mListed( true );
Comment 1 Ævar Arnfjörð Bjarmason 2005-12-27 20:20:34 UTC
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.

Comment 2 Florian Steinel 2005-12-27 20:26:25 UTC
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
Comment 3 Ævar Arnfjörð Bjarmason 2005-12-28 01:11:22 UTC
(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).

Note You need to log in before you can comment on or make changes to this bug.