On Tue, Jul 14, 2020 at 5:49 PM Mark Clements (HappyDog) <
gm...@kennel17.co.uk> wrote:

> I have an extension that uses the LinksUpdate hook to re-parse the article
> in order to extract meta-data that it then stores in the DB for use
> elsewhere in the extension.
> (...)
> In the light of the above change to the LinksUpdate hook, what changes do
> I
> need to make to my extension?  Shall I simply drop the
> ArticleDeleteComplete
> hook and update LinksUpdate to check whether an article is deleted or not
> (how?) to decide which action is required?  Or is there more to it.
>

That would work; you can check the type of the LinksUpdate object to
determine what kind of action you are handling.


> On a separate note, I also reparse the page when the ArticleUndelete hook
> is
> called.  Is this necessary, or is LinksUpdate also being called for
> undeletes?
>

LinksUpdate is called when a page has new content that needs to be
processed for links (or, more generally, metadata), whether it got created,
edited or restored.


> Finally, I do a similar thing in the TitleMoveComplete hook - I reparse
> both
> the old article and the new article.  Is this also redundant due to
> LinksUpdate calls, or not?
>

LinksUpdate is called in those cases as well.
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to