Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -643,7 +643,7 @@ |
644 | 644 | if ( $this->userCanExecute( $wgUser ) ) { |
645 | 645 | $func = $this->mFunction; |
646 | 646 | // only load file if the function does not exist |
647 | | - if(!function_exists($func) and $this->mFile) { |
| 647 | + if(!is_callable($func) and $this->mFile) { |
648 | 648 | require_once( $this->mFile ); |
649 | 649 | } |
650 | 650 | # FIXME: these hooks are broken for extensions and anything else that subclasses SpecialPage. |
— | — | @@ -651,7 +651,7 @@ |
652 | 652 | $this->outputHeader(); |
653 | 653 | if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) ) |
654 | 654 | return; |
655 | | - $func( $par, $this ); |
| 655 | + call_user_func( $func, $par, $this ); |
656 | 656 | if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) ) |
657 | 657 | return; |
658 | 658 | } else { |