From: Marius Hoch Date: Wed, 30 Aug 2017 18:32:19 +0000 (+0200) Subject: Only do one query for page ids in PageProps::getGoodIDs X-Git-Tag: 1.31.0-rc.0~2255^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=commitdiff_plain;h=1a49a119e2aafff7d1eccb19923d00e52a04e2fd;p=lhc%2Fweb%2Fwiklou.git Only do one query for page ids in PageProps::getGoodIDs Change-Id: I0d1cff3173d54de0b8fadb5bf9766789ffe030a4 --- diff --git a/includes/PageProps.php b/includes/PageProps.php index dac756ed75..ff8deee373 100644 --- a/includes/PageProps.php +++ b/includes/PageProps.php @@ -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 ) {