[go: up one dir, main page]

maintenance: Adjust query builder to account for no secondary namespaces

In T321983, we removed the NS_USER namespace from
$wgPageTriageNamespaces but the query builder in RemoveOldRows assumed
that there would be an extra namespace. This supports secondary
namespaces in the query building, but does so conditionally to avoid
errors.

Query in master with $wgPageTriageNamespaces set to [0, 2]:

 (page_namespace = 0 AND (ptrp_reviewed > 0)) OR page_namespace = 2

Query with this patch with $wgPageTriageNamespaces set to [0, 2]:

 (page_namespace = 0 AND (ptrp_reviewed > 0)) OR page_namespace = 2

Query with this patch with $wgPageTriageNamespaces set to 0:

 page_namespace = 0 AND (ptrp_reviewed > 0)

Follows-Up: Ib5b02f693ae15b898e71280362d93bcdc8d0df4b
Bug: T321983
Bug: T331412
Change-Id: Iffe127c7b789b9870be2a73faba1f2fab4d7a9c8
(cherry picked from commit 32eb0c8dbb5f27df90244a005c7f237779e93bb2)
1 file changed