From: Alexandre Emsenhuber Date: Sat, 28 May 2011 16:11:40 +0000 (+0000) Subject: Now that Hooks.php contains a class, moved wfRunHooks() definition to GlobalFunctions... X-Git-Tag: 1.31.0-rc.0~29893 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=6494121882d3edde314fb3a3b1680e81939b5da9;p=lhc%2Fweb%2Fwiklou.git Now that Hooks.php contains a class, moved wfRunHooks() definition to GlobalFunctions.php and removed its inclusion from Setup.php --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0bff1d62a5..a664551109 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3536,3 +3536,13 @@ function wfGetParserCacheStorage() { return ObjectCache::getInstance( $wgParserCacheType ); } +/** + * Call hook functions defined in $wgHooks + * + * @param $event String: event name + * @param $args Array: parameters passed to hook functions + * @return Boolean + */ +function wfRunHooks( $event, $args = array() ) { + return Hooks::run( $event, $args ); +} diff --git a/includes/Hooks.php b/includes/Hooks.php index 9fd5954394..6577bbb6e5 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -23,25 +23,6 @@ * @file */ -/** - * Call hook functions defined in $wgHooks - * - * Because programmers assign to $wgHooks, we need to be very - * careful about its contents. So, there's a lot more error-checking - * in here than would normally be necessary. - * - * @param $event String: event name - * @param $args Array: parameters passed to hook functions - * @return Boolean - */ -function wfRunHooks( $event, $args = array() ) { - return Hooks::run( $event, $args ); -} - -function hookErrorHandler( $errno, $errstr ) { - return Hooks::hookErrorHandler( $errno, $errstr ); -} - class MWHookException extends MWException {} /** diff --git a/includes/Setup.php b/includes/Setup.php index e70868a6ac..1e108d714d 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -334,7 +334,6 @@ if ( !defined( 'MW_COMPILED' ) ) { wfProfileIn( $fname . '-includes' ); require_once( "$IP/includes/normal/UtfNormalUtil.php" ); require_once( "$IP/includes/GlobalFunctions.php" ); - require_once( "$IP/includes/Hooks.php" ); require_once( "$IP/includes/ProxyTools.php" ); require_once( "$IP/includes/ImageFunctions.php" ); require_once( "$IP/includes/normal/UtfNormalDefines.php" );