From: Umherirrender Date: Sat, 22 Sep 2018 14:03:35 +0000 (+0200) Subject: Pass title to Revision constructor in Title::getFirstRevision X-Git-Tag: 1.34.0-rc.0~4015^2 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=07910fa3b4395287ca767540f1c227f1712a612e;p=lhc%2Fweb%2Fwiklou.git Pass title to Revision constructor in Title::getFirstRevision The information for a title already in the select result. Give it to Revision class to avoid extra Title::newFromId in Revision::ensureTitle for each row Change-Id: I6f1a936ce2ed1834feb29850e65a497dafe35238 --- diff --git a/includes/Title.php b/includes/Title.php index bbc1d63145..6bf8907875 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4427,7 +4427,7 @@ class Title implements LinkTarget { $revQuery['joins'] ); if ( $row ) { - return new Revision( $row ); + return new Revision( $row, 0, $this ); } } return null;