HomePhorge

specials: Fix "include templates" query builder for Special:Export

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

specials: Fix "include templates" query builder for Special:Export

The 'templatelinks' table was added twice to the query due to
queryInfo() and explicit join(). Also unnecessary fields are added by
queryInfo().

Split queryInfo() call into tables() and joinConds() and remove the
templatelinks while adding the tables. Build the whole query builder
before calling getLinks() to make it easier to see the whole query.

The query is:
SELECT lt_namespace AS namespace

   ,  lt_title AS `title`
FROM `page`
     JOIN `templatelinks`
       ON ((page_id=tl_from))
     JOIN `linktarget`
       ON ((tl_target_id=lt_id))

WHERE page_namespace = 0

AND page_title = '...'

Bug: T364554
Follow-Up: Ie0d54b6abbd5abd7eecff59bde62caacb1f65aa6
Change-Id: I17c4c0da1d373add1369417e8c64c02253b82b2b

Details

Provenance
UmherirrenderAuthored on May 9 2024, 6:01 PM

Event Timeline

Umherirrender <umherirrender_de.wp@web.de> committed rMW1b82da46c2af: specials: Fix "include templates" query builder for Special:Export (authored by Umherirrender <umherirrender_de.wp@web.de>).May 9 2024, 6:01 PM

Commit No Longer Exists

This commit no longer exists in the repository.