Index: includes/RecentChange.php
===================================================================
--- includes/RecentChange.php	(revision 32254)
+++ includes/RecentChange.php	(working copy)
@@ -123,13 +123,21 @@
 		$this->mExtra = $extra;
 	}
 
-	function &getTitle()
+	function getTitle()
 	{
 		if ( $this->mTitle === false ) {
 			$this->mTitle = Title::makeTitle( $this->mAttribs['rc_namespace'], $this->mAttribs['rc_title'] );
 		}
 		return $this->mTitle;
 	}
+	
+	function groupTitle() {
+		if( $this->mAttribs['rc_log_type'] != '' ) {
+			return Title::newFromText( "Log/" . $this->mAttribs['rc_log_type'], NS_SPECIAL );
+		} else {
+			return $this->getTitle();
+		}
+	}
 
 	function getMovedToTitle()
 	{
@@ -446,6 +454,9 @@
 			'rc_new'	=> 0, # obsolete
 			'rc_old_len'	=> NULL,
 			'rc_new_len'	=> NULL,
+			
+			'rc_log_type' => $type,
+			'rc_log_action' => $action,
 		);
 		$rc->mExtra =  array(
 			'prefixedDBkey'	=> $title->getPrefixedDBkey(),
Index: includes/ChangesList.php
===================================================================
--- includes/ChangesList.php	(revision 32257)
+++ includes/ChangesList.php	(working copy)
@@ -314,8 +314,7 @@
 			$this->insertMove( $s, $rc );
 		// Log entries
 		} elseif( $rc_log_type !='' ) {
-			$logtitle = Title::newFromText( "Log/$rc_log_type", NS_SPECIAL );
-			$this->insertLog( $s, $logtitle, $rc_log_type );
+			$this->insertLog( $s, $rc->groupTitle(), $rc_log_type );
 		// Log entries (old format) or log targets, and special pages
 		} elseif( $rc_namespace == NS_SPECIAL ) {
 			list( $specialName, $specialSubpage ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
@@ -486,7 +485,7 @@
 
 		# Put accumulated information into the cache, for later display
 		# Page moves go on their own line
-		$title = $rc->getTitle();
+		$title = $rc->groupTitle();
 		$secureName = $title->getPrefixedDBkey();
 		if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
 			# Use an @ character to prevent collision with page names
Index: includes/LogPage.php
===================================================================
--- includes/LogPage.php	(revision 32254)
+++ includes/LogPage.php	(working copy)
@@ -82,9 +82,10 @@
 
 		# And update recentchanges
 		if ( $this->updateRecentChanges ) {
-			$titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
+			//$titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
 			$rcComment = $this->getRcComment();
-			RecentChange::notifyLog( $now, $titleObj, $wgUser, $rcComment, '',
+			//RecentChange::notifyLog( $now, $titleObj, $wgUser, $rcComment, '',
+			RecentChange::notifyLog( $now, $this->target, $wgUser, $rcComment, '',
 				$this->type, $this->action, $this->target, $this->comment, $this->params );
 		}
 		return true;
