fix some spacing
[lhc/web/wiklou.git] / includes / Hooks.php
index c9c0679..bf27fde 100644 (file)
@@ -57,7 +57,6 @@ class Hooks {
                unset( self::$handlers[$name] );
        }
 
-
        /**
         * Attach an event handler to a given hook
         *
@@ -138,6 +137,8 @@ class Hooks {
         * @param $event String: event name
         * @param $args  Array: parameters passed to hook functions
         *
+        * @throws MWException
+        * @throws FatalError
         * @return Boolean True if no handler aborted the hook
         */
        public static function run( $event, $args = array() ) {
@@ -148,6 +149,7 @@ class Hooks {
                        return true;
                }
 
+               wfProfileIn( 'hook: ' . $event );
                $hooks = self::getHandlers( $event );
 
                foreach ( $hooks as $hook ) {
@@ -286,10 +288,12 @@ class Hooks {
                                        );
                                }
                        } elseif ( !$retval ) {
+                               wfProfileOut( 'hook: ' . $event );
                                return false;
                        }
                }
 
+               wfProfileOut( 'hook: ' . $event );
                return true;
        }