X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=c9ca1283020bc0e585bdb6c3a2d1da4b23dafe76;hb=d8545438bfdd2cb4fb5c62c90078d9bd9e8b4c12;hp=b00cf30941beb00c3f4d904fa65d63ca999782b6;hpb=cf69bb176b9fb39502454614e67750bba07d3d4c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index b00cf30941..c9ca128302 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -63,7 +63,7 @@ class AjaxDispatcher { $this->mode = "post"; } - switch( $this->mode ) { + switch ( $this->mode ) { case 'get': $this->func_name = isset( $_GET["rs"] ) ? $_GET["rs"] : ''; if ( ! empty( $_GET["rsargs"] ) ) { @@ -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" );