Only do one query for page ids in PageProps::getGoodIDs
authorMarius Hoch <hoo@online.de>
Wed, 30 Aug 2017 18:32:19 +0000 (20:32 +0200)
committerMarius Hoch <hoo@online.de>
Wed, 30 Aug 2017 18:32:19 +0000 (20:32 +0200)
Change-Id: I0d1cff3173d54de0b8fadb5bf9766789ffe030a4

includes/PageProps.php

index dac756e..ff8deee 100644 (file)
@@ -242,6 +242,8 @@ class PageProps {
        private function getGoodIDs( $titles ) {
                $result = [];
                if ( is_array( $titles ) ) {
+                       ( new LinkBatch( $titles ) )->execute();
+
                        foreach ( $titles as $title ) {
                                $pageID = $title->getArticleID();
                                if ( $pageID > 0 ) {