SECURITY: rate-limit and prevent blocked users from changing email
[lhc/web/wiklou.git] / includes / api / ApiQuery.php
index ae6b1a1..eeb0cf7 100644 (file)
@@ -115,6 +115,7 @@ class ApiQuery extends ApiBase {
                'userinfo' => ApiQueryUserInfo::class,
                'filerepoinfo' => ApiQueryFileRepoInfo::class,
                'tokens' => ApiQueryTokens::class,
+               'languageinfo' => ApiQueryLanguageinfo::class,
        ];
 
        /**
@@ -429,10 +430,9 @@ class ApiQuery extends ApiBase {
                $exportTitles = [];
                $titles = $pageSet->getGoodTitles();
                if ( count( $titles ) ) {
-                       $user = $this->getUser();
                        /** @var Title $title */
                        foreach ( $titles as $title ) {
-                               if ( $title->userCan( 'read', $user ) ) {
+                               if ( $this->getPermissionManager()->userCan( 'read', $this->getUser(), $title ) ) {
                                        $exportTitles[] = $title;
                                }
                        }