Add User to Title::userCan calls in api
[lhc/web/wiklou.git] / includes / api / ApiQuery.php
index 554aae5..64399b2 100644 (file)
@@ -513,8 +513,9 @@ class ApiQuery extends ApiBase {
                $exportTitles = array();
                $titles = $pageSet->getGoodTitles();
                if ( count( $titles ) ) {
+                       $user = $this->getUser();
                        foreach ( $titles as $title ) {
-                               if ( $title->userCan( 'read' ) ) {
+                               if ( $title->userCan( 'read', $user ) ) {
                                        $exportTitles[] = $title;
                                }
                        }