HomePhabricator

Implement ParsoidFetchTemplateData hook for Parsoid/PHP

Description

Implement ParsoidFetchTemplateData hook for Parsoid/PHP

  • This hook supports functionality that Parsoid/JS used the MW API for.

    Parsoid's html2wt code requests templatedata for titles one at a time currently and so this hook also supports lookups one title at a time.

    This initial implementation is good enough for initial Parsoid/PHP deployment.
  • As part of later performance optimization, we should figure out if we want to fetch templatedata for all templates in batch mode and work out the details (selser doesn't touch all templates, for one).

    The hook does accept an array of titles, but it looks them up serially in a simple for-loop.

    Separately, we need to resolve if this is better architected as a lookup service vs. a hook as it is now (see discussion on gerrit).
  • Tested locally on my local wiki.

Bug: T238954
Change-Id: I01fb6a9f334ca37a703be497524180f87fb8bbf7

Details

Provenance
ssastryAuthored on Nov 23 2019, 5:18 AM
Parents
rETDA06adf70c0ced: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
I01fb6a9f334ca37a703be497524180f87fb8bbf7

Event Timeline