$changed = $propertiesDeletes + array_diff_assoc( $this->mProperties, $existing );
$this->invalidateProperties( $changed );
+ # Update the links table freshness for this title
+ $this->updateLinksTimestamp();
+
# Refresh links of all pages including this page
# This will be in a separate transaction
if ( $this->mRecursive ) {
/**
* Queue recursive jobs for this page
*
- * Which means do LinksUpdate on all templates
- * that include the current page, using the job queue.
+ * Which means do LinksUpdate on all pages that include the current page,
+ * using the job queue.
*/
function queueRecursiveJobs() {
self::queueRecursiveJobsForTable( $this->mTitle, 'templatelinks' );
+ if ( $this->mTitle->getNamespace() == NS_FILE ) {
+ // Process imagelinks in case the title is or was a redirect
+ self::queueRecursiveJobsForTable( $this->mTitle, 'imagelinks' );
+ }
}
/**
foreach ( $diffs as $url => $dummy ) {
foreach ( wfMakeUrlIndexes( $url ) as $index ) {
$arr[] = array(
+ 'el_id' => $this->mDb->nextSequenceValue( 'externallinks_el_id_seq' ),
'el_from' => $this->mId,
'el_to' => $url,
'el_index' => $index,
return $result;
}
+
+ /**
+ * Update links table freshness
+ */
+ protected function updateLinksTimestamp() {
+ if ( $this->mId ) {
+ $this->mDb->update( 'page',
+ array( 'page_links_updated' => $this->mDb->timestamp() ),
+ array( 'page_id' => $this->mId ),
+ __METHOD__
+ );
+ }
+ }
}
/**