From 610db6c3387632b2c4a2a51f7c6c774c046e5153 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 21 Sep 2011 09:41:40 +0000 Subject: [PATCH] * (bug 30245) Use the correct way to construct a log page title --- RELEASE-NOTES-1.19 | 1 + includes/ChangesList.php | 2 +- includes/RecentChange.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index a416aecdb5..ca273b99d8 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -95,6 +95,7 @@ production. * (bug 18424) Special:Prefixindex and Special:Allpages paging links are really small, and somewhat inconsistent with each other. * Per page edit-notices now work in namespaces without subpages enabled. +* (bug 30245) Use the correct way to construct a log page title === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 16c0312130..19cc53b8e0 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -511,7 +511,7 @@ class OldChangesList extends ChangesList { if( $rc->mAttribs['rc_type'] == RC_MOVE || $rc->mAttribs['rc_type'] == RC_MOVE_OVER_REDIRECT ) { // Log entries } elseif( $rc->mAttribs['rc_log_type'] ) { - $logtitle = Title::newFromText( 'Log/'.$rc->mAttribs['rc_log_type'], NS_SPECIAL ); + $logtitle = SpecialPage::getTitleFor( 'Log', $rc->mAttribs['rc_log_type'] ); $this->insertLog( $s, $logtitle, $rc->mAttribs['rc_log_type'] ); // Log entries (old format) or log targets, and special pages } elseif( $rc->mAttribs['rc_namespace'] == NS_SPECIAL ) { diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 9738a67587..d59f1aa273 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -621,7 +621,7 @@ class RecentChange { $wgCanonicalServer, $wgScript; if( $this->mAttribs['rc_type'] == RC_LOG ) { - $titleObj = Title::newFromText( 'Log/' . $this->mAttribs['rc_log_type'], NS_SPECIAL ); + $titleObj = SpecialPage::getTitleFor( 'Log', $this->mAttribs['rc_log_type'] ); } else { $titleObj =& $this->getTitle(); } -- 2.20.1