New hook right after initialization
Closed, ResolvedPublic


Author: mati

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?

Version: 1.14.x
Severity: enhancement

Attached: BeforeInitialize.patch


bzimport set Reference to bz15209.
bzimport created this task.Aug 17 2008, 1:29 PM

mati wrote:

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?

demon added a comment.Aug 3 2009, 10:32 PM

Patch applied in r54318, also added Mediawiki object, figured that'd be helpful.

Add Comment