* (bug 15835) Added Content-Style-Type meta tag
* Add class="disambiguationpage" to <body> tag for disambiguations
* (bug 11027) Add parameter to MW:Randompage-nopages so that user can see the namespace.
-* New global function wfInvokeFancyCallback() can be used to dynamically
+* New global function wfInvoke() can be used to dynamically
invoke functions with a flexible interface, like wfRunHooks does.
=== Bug fixes in 1.14 ===
*/
/* Private */
-function _wfInternalFancyCallbackGoop($hook) {
+function _wfInvokeInternalGoop($hook) {
$object = NULL;
$method = NULL;
$func = NULL;
}
/* Return a string describing the hook for debugging purposes. */
-function wfFormatFancyCallback($hook) {
- list($callback, $func, $data) = _wfInternalFancyCallbackGoop($hook, $args);
+function wfFormatInvocation($hook) {
+ list($callback, $func, $data) = _wfInvokeInternalGoop($hook, $args);
if( is_array( $callback ) ) {
if( is_object( $callback[0] ) ) {
* If arguments are provided both as part of the hook itself, and when
* calling wfCallFancyCallback, the two arrays are merged.
*/
-function wfInvokeFancyCallback($hook, $args = array()) {
- list($callback, $func, $data) = _wfInternalFancyCallbackGoop($hook, $args);
+function wfInvoke($hook, $args = array()) {
+ list($callback, $func, $data) = _wfInvokeInternalGoop($hook, $args);
/* We put the first data element on, if needed. */
if ($data) {
foreach ($wgHooks[$event] as $index => $hook) {
- $retval = wfInvokeFancyCallback($hook, $args);
+ $retval = wfInvoke($hook, $args);
/* String return is an error; false return means stop processing. */
$wgOut->showFatalError($retval);
return false;
} elseif( $retval === null ) {
- $prettyFunc = wfFormatFancyCallback($hook);
+ $prettyFunc = wfFormatInvocation($hook);
throw new MWException( "Detected bug in an extension! " .
"Hook $prettyFunc failed to return a value; " .
"should return true to continue hook processing or false to abort." );