From f741c09aa2591feec0e016b59fce10a817009654 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 17 Jun 2009 21:11:29 +0000 Subject: [PATCH] (bug 19214) Make sure new pages have page ID cached for getTitle() --- includes/RecentChange.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 8e3f110744..2ca2f69c6d 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -119,6 +119,8 @@ class RecentChange public function &getTitle() { if( $this->mTitle === false ) { $this->mTitle = Title::makeTitle( $this->mAttribs['rc_namespace'], $this->mAttribs['rc_title'] ); + # Make sure the correct page ID is process cached + $this->mTitle->resetArticleID( $this->mAttribs['rc_cur_id'] ); } return $this->mTitle; } @@ -158,7 +160,7 @@ class RecentChange ## If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL if( $dbw->cascadingDeletes() and $this->mAttribs['rc_cur_id']==0 ) { - unset ( $this->mAttribs['rc_cur_id'] ); + unset( $this->mAttribs['rc_cur_id'] ); } # Insert new row -- 2.20.1