Note that jquery.json will be removed in 1.25
[lhc/web/wiklou.git] / includes / AjaxDispatcher.php
index e22fe20..c9ca128 100644 (file)
@@ -111,15 +111,13 @@ class AjaxDispatcher {
                        wfHttpError(
                                400,
                                'Bad Request',
-                               "unknown function " . (string) $this->func_name
+                               "unknown function " . $this->func_name
                        );
-               } elseif ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true )
-                       && !$wgUser->isAllowed( 'read' ) )
-               {
+               } elseif ( !User::isEveryoneAllowed( 'read' ) && !$wgUser->isAllowed( 'read' ) ) {
                        wfHttpError(
                                403,
                                'Forbidden',
-                               'You must log in to view pages.' );
+                               'You are not allowed to view pages.' );
                } else {
                        wfDebug( __METHOD__ . ' dispatching ' . $this->func_name . "\n" );