Use other hook to add page_props after upload

Authored by matthiasmullie on Feb 8 2018, 7:23 AM.


Use other hook to add page_props after upload

The previous thing worked at some point, but timings seem to have
changed. Anyway, it has now proven to be unreliable.
The previous solution would add the prop to the database when a
file is uploaded, but that same table gets touched whenever a new
page is created & it cleans out whatever is stored for that id.
The solution was to try to make the page_props insertion run as
late af possible (after that other thing) so that it would survive.
That turns out to be broken already.

New solution: piggyback onto the other thing, the one that cleans
out the page_props. It will wipe all page_props, except for those
present in the parser output: it'll reinstate those.
So... let's add it to the parser output!

Bug: T177023
Change-Id: Ie5bf9a02fd8d0de52e6e5aeba32b3e0b1c770e19