Merge "jquery.placeholder: Fixup for a8145d6fa2"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 26 Jul 2013 18:13:51 +0000 (18:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Jul 2013 18:13:51 +0000 (18:13 +0000)
includes/SpecialPage.php
includes/actions/RawAction.php
includes/api/ApiMain.php

index ad9618f..d87f910 100644 (file)
@@ -553,8 +553,8 @@ class SpecialPage {
         *   pages?
         */
        public function isRestricted() {
-               // DWIM: If everyone can do something, then it is not restricted
-               return $this->mRestriction != '' && !User::isEveryoneAllowed( $this->mRestriction );
+               // DWIM: If anons can do something, then it is not restricted
+               return $this->mRestriction != '' && !User::groupHasPermission( '*', $this->mRestriction );
        }
 
        /**
index dd14311..32751e4 100644 (file)
@@ -93,7 +93,7 @@ class RawAction extends FormlessAction {
                $response->header( 'Content-type: ' . $contentType . '; charset=UTF-8' );
                # Output may contain user-specific data;
                # vary generated content for open sessions on private wikis
-               $privateCache = !User::groupHasPermission( '*', 'read' ) && ( $smaxage == 0 || session_id() != '' );
+               $privateCache = !User::isEveryoneAllowed( 'read' ) && ( $smaxage == 0 || session_id() != '' );
                # allow the client to cache this for 24 hours
                $mode = $privateCache ? 'private' : 'public';
                $response->header( 'Cache-Control: ' . $mode . ', s-maxage=' . $smaxage . ', max-age=' . $maxage );
index 49a0b3c..6dd6d59 100644 (file)
@@ -274,7 +274,7 @@ class ApiMain extends ApiBase {
                        return;
                }
 
-               if ( !User::groupHasPermission( '*', 'read' ) ) {
+               if ( !User::isEveryoneAllowed( 'read' ) ) {
                        // Private wiki, only private headers
                        if ( $mode !== 'private' ) {
                                wfDebug( __METHOD__ . ": ignoring request for $mode cache mode, private wiki\n" );