Now that Hooks.php contains a class, moved wfRunHooks() definition to GlobalFunctions...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 28 May 2011 16:11:40 +0000 (16:11 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 28 May 2011 16:11:40 +0000 (16:11 +0000)
includes/GlobalFunctions.php
includes/Hooks.php
includes/Setup.php

index 0bff1d6..a664551 100644 (file)
@@ -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 );
+}
index 9fd5954..6577bbb 100644 (file)
  * @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 {}
 
 /**
index e70868a..1e108d7 100644 (file)
@@ -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" );