Lucas_Werkmeister_WMDE added a comment.

As far as I can tell, the QueryPage class does at least four things:

  • manage an SQL query with user-configurable offset and limit, and display the list of pages it returns as a special page
  • optionally, cache the results (opt out by overriding isCacheable)
  • optionally, present the results as an RSS feed (opt out by overriding isSyndicated)
  • optionally, include the special page in a list of query pages (opt out by not adding the page to $wgQueryPages), which is used by…
    • optionally, list=querypage to expose the results as an API module (opt out by adding the page to $wgUselessQueryPages)
    • maintenance/updateSpecialPages.php to update cached results

Since we’re not interested in caching, I don’t think it makes a difference whether we use $wgQueryPages or $wgUselessQueryPages, but conceptually I guess the former makes more sense, both for EntityUsage and for PagesWithBadges. (However, the maintenance script goes through SpecialPageFactory to instantiate the special pages, so it doesn’t crash anyways. Updating ApiQueryQueryPage to do the same would make sense regardless.)

That said, perhaps parts of QueryPage should also be split off so that we don’t need to carry this whole baggage that doesn’t make sense in our situation… a base class QueryResultsPage, just for the first bullet point? Not sure. But probably not our job anyways.


TASK DETAIL
https://phabricator.wikimedia.org/T208924

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Michael, Lucas_Werkmeister_WMDE
Cc: gerritbot, Lucas_Werkmeister_WMDE, Addshore, Anomie, Aklapper, Krinkle, revi, CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Sethakill, Lewizho99, Maathavan, dg711, _jensen, D3r1ck01, Jonas, Wikidata-bugs, aude, jayvdb, Lydia_Pintscher, Jdforrester-WMF, Mbch331, Jay8g, Krenair, Legoktm
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to