This means that, for example, the tags for a file upload's log entry
and the associated page revision should finally be in sync.
Bug: T122090
Change-Id: I3537278ff728d160bbdcf149d0f99fe9621c02e6
+ if ( $log_id && !$rev_id ) {
+ $rev_id = $dbw->selectField(
+ 'log_search',
+ 'ls_value',
+ array( 'ls_field' => 'associated_rev_id', 'ls_log_id' => $log_id ),
+ __METHOD__
+ );
+ } elseif ( !$log_id && $rev_id ) {
+ $log_id = $dbw->selectField(
+ 'log_search',
+ 'ls_log_id',
+ array( 'ls_field' => 'associated_rev_id', 'ls_value' => $rev_id ),
+ __METHOD__
+ );
+ }
+
// update the tag_summary row
$prevTags = array();
if ( !self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, $rc_id, $rev_id,
// update the tag_summary row
$prevTags = array();
if ( !self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, $rc_id, $rev_id,