diff options
author | Alexandre Emsenhuber <ialex.wiki@gmail.com> | 2012-07-17 16:28:58 +0200 |
---|---|---|
committer | Alexandre Emsenhuber <ialex.wiki@gmail.com> | 2012-07-17 16:28:58 +0200 |
commit | bc61dc4d96db0ea073d5e0d3cc50078737682df3 (patch) | |
tree | 29028b7dda4f682136e07e911e67456baf439f48 /includes/AjaxDispatcher.php | |
parent | 0c7cbeefa136bdcc32c1ee0428a30876c4cd6d89 (diff) | |
download | mediawikicore-bc61dc4d96db0ea073d5e0d3cc50078737682df3.tar.gz mediawikicore-bc61dc4d96db0ea073d5e0d3cc50078737682df3.zip |
explode()'ing the callback is no longer needed in AjaxDispatcher.
This is only needed in PHP<5.2.3, as we require PHP 5.3.2+,
this is no longer the case.
Change-Id: I6fa210a96f854d12d9713172a31ed5a71d3d4a69
Diffstat (limited to 'includes/AjaxDispatcher.php')
-rw-r--r-- | includes/AjaxDispatcher.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index e3df5207666e..b457ea6eb0ce 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -113,7 +113,7 @@ class AjaxDispatcher { 'Bad Request', "unknown function " . (string) $this->func_name ); - } elseif ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) + } elseif ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) && !$wgUser->isAllowed( 'read' ) ) { wfHttpError( @@ -123,14 +123,8 @@ class AjaxDispatcher { } else { wfDebug( __METHOD__ . ' dispatching ' . $this->func_name . "\n" ); - if ( strpos( $this->func_name, '::' ) !== false ) { - $func = explode( '::', $this->func_name, 2 ); - } else { - $func = $this->func_name; - } - try { - $result = call_user_func_array( $func, $this->args ); + $result = call_user_func_array( $this->func_name, $this->args ); if ( $result === false || $result === null ) { wfDebug( __METHOD__ . ' ERROR while dispatching ' |