Page MenuHomePhabricator

MergeHistory: record the target page ID in the log events
Closed, DuplicatePublic

Description

The MergeHistory module currently saves these log parameters:

			'4::dest' => $this->dest->getPrefixedText(),
			'5::mergepoint' => $this->timestampLimit->getTimestamp( TS_MW )

But it is not possible to obtain the exact ID of the target page, because the page might be renamed any time after the merge. Consider a client which synchronizes the content of a wiki into a local database: it might merge the revisions into a wrong page if it performed a simple lookup by the namespace and title.

The logging table has a log_page field which is set to the target page ID on page moves. I propose to do the same with history merges. Edit: Actually, the synchronization needs both IDs of the source and target page, so they should be both available in the log event at all times. The API currently provides pageid and logpage fields, but pageid is 0 when the source page is deleted after the merge. It would be probably easier to add the target page ID to the log_params field next to the target title.