Merge "Move callers away from Title::GAID_FOR_UPDATE"
[lhc/web/wiklou.git] / includes / api / ApiQueryBase.php
index 50ca99a..10db848 100644 (file)
@@ -460,7 +460,7 @@ abstract class ApiQueryBase extends ApiBase {
                $this->addJoinConds( $joinConds );
 
                // Don't show hidden names
-               if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
+               if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'hideuser' ) ) {
                        $this->addWhere( 'ipb_deleted = 0 OR ipb_deleted IS NULL' );
                }
        }
@@ -600,7 +600,8 @@ abstract class ApiQueryBase extends ApiBase {
         * @return bool
         */
        public function userCanSeeRevDel() {
-               return $this->getUser()->isAllowedAny(
+               return $this->getPermissionManager()->userHasAnyRight(
+                       $this->getUser(),
                        'deletedhistory',
                        'deletedtext',
                        'suppressrevision',