Index: trunk/phase3/includes/Hooks.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | */ |
25 | 25 | |
26 | 26 | /* Private */ |
27 | | -function _wfInternalFancyCallbackGoop($hook) { |
| 27 | +function _wfInvokeInternalGoop($hook) { |
28 | 28 | $object = NULL; |
29 | 29 | $method = NULL; |
30 | 30 | $func = NULL; |
— | — | @@ -76,8 +76,8 @@ |
77 | 77 | } |
78 | 78 | |
79 | 79 | /* Return a string describing the hook for debugging purposes. */ |
80 | | -function wfFormatFancyCallback($hook) { |
81 | | - list($callback, $func, $data) = _wfInternalFancyCallbackGoop($hook, $args); |
| 80 | +function wfFormatInvocation($hook) { |
| 81 | + list($callback, $func, $data) = _wfInvokeInternalGoop($hook, $args); |
82 | 82 | |
83 | 83 | if( is_array( $callback ) ) { |
84 | 84 | if( is_object( $callback[0] ) ) { |
— | — | @@ -101,8 +101,8 @@ |
102 | 102 | * If arguments are provided both as part of the hook itself, and when |
103 | 103 | * calling wfCallFancyCallback, the two arrays are merged. |
104 | 104 | */ |
105 | | -function wfInvokeFancyCallback($hook, $args = array()) { |
106 | | - list($callback, $func, $data) = _wfInternalFancyCallbackGoop($hook, $args); |
| 105 | +function wfInvoke($hook, $args = array()) { |
| 106 | + list($callback, $func, $data) = _wfInvokeInternalGoop($hook, $args); |
107 | 107 | |
108 | 108 | /* We put the first data element on, if needed. */ |
109 | 109 | if ($data) { |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | |
149 | 149 | foreach ($wgHooks[$event] as $index => $hook) { |
150 | 150 | |
151 | | - $retval = wfInvokeFancyCallback($hook, $args); |
| 151 | + $retval = wfInvoke($hook, $args); |
152 | 152 | |
153 | 153 | /* String return is an error; false return means stop processing. */ |
154 | 154 | |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | $wgOut->showFatalError($retval); |
158 | 158 | return false; |
159 | 159 | } elseif( $retval === null ) { |
160 | | - $prettyFunc = wfFormatFancyCallback($hook); |
| 160 | + $prettyFunc = wfFormatInvocation($hook); |
161 | 161 | throw new MWException( "Detected bug in an extension! " . |
162 | 162 | "Hook $prettyFunc failed to return a value; " . |
163 | 163 | "should return true to continue hook processing or false to abort." ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | * (bug 15835) Added Content-Style-Type meta tag |
204 | 204 | * Add class="disambiguationpage" to <body> tag for disambiguations |
205 | 205 | * (bug 11027) Add parameter to MW:Randompage-nopages so that user can see the namespace. |
206 | | -* New global function wfInvokeFancyCallback() can be used to dynamically |
| 206 | +* New global function wfInvoke() can be used to dynamically |
207 | 207 | invoke functions with a flexible interface, like wfRunHooks does. |
208 | 208 | |
209 | 209 | === Bug fixes in 1.14 === |