Last modified: 2008-01-14 12:50:38 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 T14624, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12624 - Cleanup for Special:Randompage and Special:Randomredirect after r29725
Cleanup for Special:Randompage and Special:Randomredirect after r29725
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.12.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-14 12:30 UTC by Alexandre Emsenhuber [IAlex]
Modified: 2008-01-14 12:50 UTC (History)
1 user (show)

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


Attachments
proposed patch (5.02 KB, patch)
2008-01-14 12:30 UTC, Alexandre Emsenhuber [IAlex]
Details

Description Alexandre Emsenhuber [IAlex] 2008-01-14 12:30:50 UTC
Created attachment 4545 [details]
proposed patch

When trying to get a random page with Special:Randompage post r29725, i get 2 E_STRICT saying that RandomPage::execute() and RandomPage::getRedirect() definitions don't match to the SpecialPage (the parent class) definition and the headers aren't set.
If the headers aren't set, it's because Special:Randompage doesn't call SpecialPage::setHeaders() (implicitely done when using a special page by wfSpecial*) and the parent doesn't recieve the special page name (there is no specific constructor in RandomPage class). I also don't know if overriding SpecialPage::getRedirect() with an other function is a good idea.
I modified Special:Randomredirect to simply create a class that extends RandomPage and replaced RandomPage::$redirect by a function that is overriden by Randomredirect.
Comment 1 Domas Mituzas 2008-01-14 12:50:38 UTC
resolved

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


Navigation
Links