Wikia code/includes/api/ApiQueryUserContributions.php

< Wikia code‎ | includes‎ | api
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\api\ApiQueryUserContributions.php	2011-07-18 22:31:07.153320300 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\api\ApiQueryUserContributions.php	2011-08-17 15:28:14.372070300 +0100
@@ -58,6 +58,7 @@
 		$this->fld_timestamp = isset( $prop['timestamp'] );
 		$this->fld_patrolled = isset( $prop['patrolled'] );
 		$this->fld_tags = isset( $prop['tags'] );
+		$this->fld_wikiamode = isset($prop['wikiamode']);
 
 		// TODO: if the query is going only against the revision table, should this be done?
 		$this->selectNamedDB( 'contributions', DB_SLAVE, 'contributions' );
@@ -264,6 +265,10 @@
 		}
 		
 		$this->addOption( 'USE INDEX', $index );
+		/* Wikia change begin - @author: Marooned */
+		/* Add revision parent id to make diff link in MyHome and to see if current revision was the first one */
+		$this->addFieldsIf('rev_parent_id', $this->fld_wikiamode);
+		/* Wikia change end */
 	}
 
 	/**
@@ -299,6 +304,13 @@
 				$vals['top'] = '';
 		}
 
+		/* Wikia change begin - @author: Marooned */
+		/* Add revision parent id to make diff link in MyHome and to see if current revision was the first one */
+		if($this->fld_wikiamode) {
+			$vals['rev_parent_id'] = $row->rev_parent_id;
+
+		}
+		/* Wikia change end */
 		if ( ( $this->fld_comment || $this->fld_parsedcomment ) && isset( $row->rev_comment ) ) {
 			if ( $row->rev_deleted & Revision::DELETED_COMMENT )
 				$vals['commenthidden'] = '';
@@ -387,6 +399,7 @@
 					'size',
 					'flags',
 					'patrolled',
+					'wikiamode',
 					'tags'
 				)
 			),