r89041 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89040‎ | r89041 | r89042 >
Date:16:11, 28 May 2011
Author:ialex
Status:ok
Tags:
Comment:
Now that Hooks.php contains a class, moved wfRunHooks() definition to GlobalFunctions.php and removed its inclusion from Setup.php
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/Hooks.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -3536,3 +3536,13 @@
35373537 return ObjectCache::getInstance( $wgParserCacheType );
35383538 }
35393539
 3540+/**
 3541+ * Call hook functions defined in $wgHooks
 3542+ *
 3543+ * @param $event String: event name
 3544+ * @param $args Array: parameters passed to hook functions
 3545+ * @return Boolean
 3546+ */
 3547+function wfRunHooks( $event, $args = array() ) {
 3548+ return Hooks::run( $event, $args );
 3549+}
Index: trunk/phase3/includes/Setup.php
@@ -334,7 +334,6 @@
335335 wfProfileIn( $fname . '-includes' );
336336 require_once( "$IP/includes/normal/UtfNormalUtil.php" );
337337 require_once( "$IP/includes/GlobalFunctions.php" );
338 - require_once( "$IP/includes/Hooks.php" );
339338 require_once( "$IP/includes/ProxyTools.php" );
340339 require_once( "$IP/includes/ImageFunctions.php" );
341340 require_once( "$IP/includes/normal/UtfNormalDefines.php" );
Index: trunk/phase3/includes/Hooks.php
@@ -23,25 +23,6 @@
2424 * @file
2525 */
2626
27 -/**
28 - * Call hook functions defined in $wgHooks
29 - *
30 - * Because programmers assign to $wgHooks, we need to be very
31 - * careful about its contents. So, there's a lot more error-checking
32 - * in here than would normally be necessary.
33 - *
34 - * @param $event String: event name
35 - * @param $args Array: parameters passed to hook functions
36 - * @return Boolean
37 - */
38 -function wfRunHooks( $event, $args = array() ) {
39 - return Hooks::run( $event, $args );
40 -}
41 -
42 -function hookErrorHandler( $errno, $errstr ) {
43 - return Hooks::hookErrorHandler( $errno, $errstr );
44 -}
45 -
4627 class MWHookException extends MWException {}
4728
4829 /**

Status & tagging log