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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6403, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4403 - extensions/CrossNamespaceLinks: uses this->name in constructor
extensions/CrossNamespaceLinks: uses this->name in constructor
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
CrossNamespaceLinks (Other open bugs)
unspecified
All All
: Lowest major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://cvs.sourceforge.net/viewcvs.py...
:
Depends on:
Blocks:
  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: ---


Attachments

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
+++ 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 );
                }
 
                /**
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.

RESOLVING as WONTFIX.
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.


Navigation
Links