X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=b00cf30941beb00c3f4d904fa65d63ca999782b6;hb=21b7b27f0379cff1b06efa95d27fa88684b65c57;hp=5bc9f06742739c3d26fcf30179e4a8f86b50e6e7;hpb=7141742914cb1554809676d30911416bd2024cf9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 5bc9f06742..b00cf30941 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -1,10 +1,28 @@ mode ) ) { return; @@ -84,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( @@ -94,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 ' @@ -134,7 +157,6 @@ class AjaxDispatcher { } } - $wgOut = null; wfProfileOut( __METHOD__ ); } }