Jump to content

Wikia code/includes/LinksUpdate.php

From mediawiki.org
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\LinksUpdate.php	2011-07-18 22:31:28.163086000 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\LinksUpdate.php	2011-08-17 15:28:46.524414100 +0100
@@ -99,7 +99,9 @@
 		$existing = $this->getExistingImages();
 
 		$imageDeletes = $this->getImageDeletions( $existing );
-		$this->incrTableUpdate( 'imagelinks', 'il', $imageDeletes, $this->getImageInsertions( $existing ) );
+		$imageInserts = $this->getImageInsertions( $existing );
+		Wikia::setVar('imageInserts', $imageInserts);
+		$this->incrTableUpdate( 'imagelinks', 'il', $imageDeletes, $imageInserts );
 
 		# Invalidate all image description pages which had links added or removed
 		$imageUpdates = $imageDeletes + array_diff_key( $this->mImages, $existing );
@@ -133,6 +135,10 @@
 		$this->invalidateCategories( $categoryUpdates );
 		$this->updateCategoryCounts( $categoryInserts, $categoryDeletes );
 
+		wfRunHooks( 'AfterCategoriesUpdate', array( $categoryInserts, $categoryDeletes, $this->mTitle ) );
+
+		Wikia::setVar('categoryInserts', $categoryInserts);
+
 		# Page properties
 		$existing = $this->getExistingProperties();