* @param array $pages Map of (page ID => (namespace, DB key)) entries
*/
protected function invalidateTitles( array $pages ) {
- global $wgUpdateRowsPerQuery, $wgUseFileCache;
+ global $wgUpdateRowsPerQuery, $wgUseFileCache, $wgPageLanguageUseDB;
// Get all page IDs in this query into an array
$pageIds = array_keys( $pages );
// Get the list of affected pages (races only mean something else did the purge)
$titleArray = TitleArray::newFromResult( $dbw->select(
'page',
- [ 'page_namespace', 'page_title' ],
+ array_merge(
+ [ 'page_namespace', 'page_title' ],
+ $wgPageLanguageUseDB ? [ 'page_lang' ] : []
+ ),
[ 'page_id' => $pageIds, 'page_touched' => $dbw->timestamp( $touchTimestamp ) ],
__METHOD__
) );