From: Alexandre Emsenhuber Date: Sun, 18 Jul 2010 09:36:56 +0000 (+0000) Subject: Let Title::newFromIDs() select all fields and use Title::newFromRow() since we alread... X-Git-Tag: 1.31.0-rc.0~36109 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=58f045ebba1ff80a1fb6f3cc85a4edb9da0257b7;p=lhc%2Fweb%2Fwiklou.git Let Title::newFromIDs() select all fields and use Title::newFromRow() since we already are in the "page" table --- diff --git a/includes/Title.php b/includes/Title.php index b8daa792f1..678b5deea1 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -218,12 +218,13 @@ class Title { return array(); } $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr->select( 'page', array( 'page_namespace', 'page_title' ), - 'page_id IN (' . $dbr->makeList( $ids ) . ')', __METHOD__ ); + + $res = $dbr->select( 'page', array( '*' ), + array( 'page_id' => $ids ), __METHOD__ ); $titles = array(); foreach ( $res as $row ) { - $titles[] = Title::makeTitle( $row->page_namespace, $row->page_title ); + $titles[] = Title::newFromRow( $row ); } return $titles; }