Last modified: 2009-08-03 22:32:17 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 15209 - New hook right after initialization
New hook right after initialization
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Chad H.
Depends on:
  Show dependency treegraph
Reported: 2008-08-17 13:29 UTC by Mathias Ertl
Modified: 2009-08-03 22:32 UTC (History)
1 user (show)

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

Create an early hook "BeforeInitialize" in initialize() in Wiki.php. (613 bytes, patch)
2008-08-17 13:29 UTC, Mathias Ertl

Description Mathias Ertl 2008-08-17 13:29:00 UTC
Created attachment 5184 [details]
Create an early hook "BeforeInitialize" in initialize() in Wiki.php.

I did the httpsExtension and ran across Bug #10719 ("SpecialPage hooks are broken"). My goal is to create a "SecurePages"-Extension where the administrator can easily define which pages should be hit via https (a similar extension is available for drupal). The Problem is that there is no good hook that
* Is called on ALL pages (so you can actually check if I should redirect to https)
* Is called relatively soon (so not to much work is done before being redirected to https)

I therefor propose to create a new "BeforeInitialize"-Hook that is called in initialize() in includes/Wiki.php. The attached patch (for 1.13.0) would create such a hook. I tested this on a test-wiki with a modified version of the httpsLogin extension and it works just fine.

I think this would also solve some of the problems in Bug #10719?
Comment 1 Mathias Ertl 2008-12-26 16:09:33 UTC
Hi, Is there any reason there is still no comment on this report? I was hoping to get this into MediaWiki, or get it at least rejected, so I can maintain my own patch. Can somebody with authority give at least a comment?
Comment 2 Chad H. 2009-08-03 22:32:17 UTC
Patch applied in r54318, also added Mediawiki object, figured that'd be helpful.

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