X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllRevisions.php;h=17a6e00090b98015af6d8d9450ecfc3029b38461;hb=0d6ef1c0b20093e03e95a6b7f303c7a2de5de3af;hp=58445a1faaf2afcbeea73dbb43c8e4967f1c1ecc;hpb=424515074966148dbe71b82bc1399b243ff61d5a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllRevisions.php b/includes/api/ApiQueryAllRevisions.php index 58445a1faa..17a6e00090 100644 --- a/includes/api/ApiQueryAllRevisions.php +++ b/includes/api/ApiQueryAllRevisions.php @@ -44,7 +44,8 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase { $db = $this->getDB(); $params = $this->extractRequestParams( false ); - $revisionStore = MediaWikiServices::getInstance()->getRevisionStore(); + $services = MediaWikiServices::getInstance(); + $revisionStore = $services->getRevisionStore(); $result = $this->getResult(); @@ -70,7 +71,7 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase { if ( $params['namespace'] !== null ) { $params['namespace'] = array_unique( $params['namespace'] ); sort( $params['namespace'] ); - if ( $params['namespace'] != MWNamespace::getValidNamespaces() ) { + if ( $params['namespace'] != $services->getNamespaceInfo()->getValidNamespaces() ) { $needPageTable = true; if ( $this->getConfig()->get( 'MiserMode' ) ) { $miser_ns = $params['namespace']; @@ -153,7 +154,7 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase { if ( $params['user'] !== null || $params['excludeuser'] !== null ) { // Paranoia: avoid brute force searches (T19342) - if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED;