From: Roan Kattouw Date: Sat, 19 Nov 2011 17:21:43 +0000 (+0000) Subject: (bug 30368) When a page is moved, link to and display the new name rather than the... X-Git-Tag: 1.31.0-rc.0~26410 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=cdf33f591c6a6ff87241c7b093728ac3e400e65e;p=lhc%2Fweb%2Fwiklou.git (bug 30368) When a page is moved, link to and display the new name rather than the old name on Special:Newpages. Did this by treating relying on rc_cur_id instead of rc_namespace & rc_title when building the list. This is safe because the Newpages query already joins against page, so we know the rc_cur_id points to an existing page. --- diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 7028aea9fc..2467717703 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -297,7 +297,7 @@ class SpecialNewpages extends IncludableSpecialPage { $lang = $this->getLang(); $dm = $lang->getDirMark(); - $title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title ); + $title = Title::newFromID( $result->rc_cur_id ); $spanTime = Html::element( 'span', array( 'class' => 'mw-newpages-time' ), $lang->timeanddate( $result->rc_timestamp, true ) );