Localisation updates for core and extension messages from translatewiki.net (2010...
[lhc/web/wiklou.git] / includes / Hooks.php
index 0b2dc5f..168f4bd 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
- * Hooks.php -- a tool for running hook functions
+ * A tool for running hook functions.
+ *
  * Copyright 2004, 2005 Evan Prodromou <evan@wikitravel.org>.
  *
  *  This program is free software; you can redistribute it and/or modify
 
 
 /**
+ * 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()) {
 
@@ -39,12 +46,10 @@ function wfRunHooks($event, $args = array()) {
 
        if (!is_array($wgHooks)) {
                throw new MWException("Global hooks array is not an array!\n");
-               return false;
        }
 
        if (!is_array($wgHooks[$event])) {
                throw new MWException("Hooks array for event '$event' is not an array!\n");
-               return false;
        }
 
        foreach ($wgHooks[$event] as $index => $hook) {