Page MenuHomePhabricator

Avoid evil global hacks in installer with extension registration lookups
Closed, ResolvedPublic

Description

In Installer::includeExtensions():

		require "$IP/includes/DefaultSettings.php";

		foreach ( $exts as $e ) {
			require_once "$IP/extensions/$e/$e.php";
		}

		$hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?
			$wgHooks['LoadExtensionSchemaUpdates'] : array();

		// Unset everyone else's hooks. Lord knows what someone might be doing
		// in ParserFirstCallInit (see bug 27171)
		$GLOBALS['wgHooks'] = array( 'LoadExtensionSchemaUpdates' => $hooksWeWant );

We can avoid most of the evilness of this code by reading extension.json files.

Event Timeline

Legoktm created this task.Apr 1 2015, 7:12 AM
Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm added a subscriber: Legoktm.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 1 2015, 7:12 AM

Change 201417 had a related patch set uploaded (by Legoktm):
installer: Read from extension.json if possible

https://gerrit.wikimedia.org/r/201417

Legoktm renamed this task from Replace evil global hacks in installer with extension registration lookups to Avoid evil global hacks in installer with extension registration lookups.Apr 2 2015, 5:52 AM
Legoktm updated the task description. (Show Details)
Legoktm set Security to None.

Change 201417 merged by jenkins-bot:
installer: Read from extension.json if possible

https://gerrit.wikimedia.org/r/201417

Legoktm closed this task as Resolved.Apr 7 2015, 4:15 PM
Legoktm claimed this task.