r83023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83022‎ | r83023 | r83024 >
Date:17:54, 1 March 2011
Author:demon
Status:ok
Tags:
Comment:
Kill all other uses of $wgHooks in includeExtensions() other than LoadExtensionSchemaUpdates (which is the *only* one we want). People do stupid stuff in places like ParserFirstCallInit, and we don't want to risk them doing something like opening a DB connection or other things that are gonna fail
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -1215,6 +1215,14 @@
12161216 require( "$path/$e/$e.php" );
12171217 }
12181218
 1219+ $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?
 1220+ $wgHooks['LoadExtensionSchemaUpdates'] : array();
 1221+
 1222+ // Unset everyone else's hooks. Lord knows what someone might be doing
 1223+ // in ParserFirstCallInit (see bug 27171)
 1224+ unset( $wgHooks );
 1225+ $wgHooks = array( 'LoadExtensionSchemaUpdates' => $hooksWeWant );
 1226+
12191227 return Status::newGood();
12201228 }
12211229

Follow-up revisions

RevisionCommit summaryAuthorDate
r84408Fixed <doclink> broken by r83023maxsem17:54, 20 March 2011

Status & tagging log