From: Ilmari Karonen Date: Wed, 2 Jul 2008 18:55:56 +0000 (+0000) Subject: Use page_title and page_namespace instead of rc_title and rc_namespace so that moving... X-Git-Tag: 1.31.0-rc.0~46798 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/voir.php?a=commitdiff_plain;h=5cfaba75a94e5a06ce2d9c37e71847222e469c4e;p=lhc%2Fweb%2Fwiklou.git Use page_title and page_namespace instead of rc_title and rc_namespace so that moving a page immediately after creating it won't fool the namespace filter. (bug 3481) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 06083122ea..5ae6e76540 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -409,7 +409,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN searches instead of the domain root (which may not even be a wiki). * (bug 14698) Blocks without "block account creation" set no longer block account creation. - +* (bug 3481) Pages moved shortly after creation are shown at their new title + on Special:Newpages. === API changes in 1.13 === diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 72a01836d0..1a410ae0b6 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -231,7 +231,7 @@ class SpecialNewpages extends SpecialPage { global $wgLang, $wgContLang, $wgUser; $dm = $wgContLang->getDirMark(); - $title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title ); + $title = Title::makeTitleSafe( $result->page_namespace, $result->page_title ); $time = $wgLang->timeAndDate( $result->rc_timestamp, true ); $plink = $this->skin->makeKnownLinkObj( $title, '', $this->patrollable( $result ) ? 'rcid=' . $result->rc_id : '' ); $hist = $this->skin->makeKnownLinkObj( $title, wfMsgHtml( 'hist' ), 'action=history' ); @@ -305,7 +305,7 @@ class SpecialNewpages extends SpecialPage { } protected function feedItem( $row ) { - $title = Title::MakeTitle( intval( $row->rc_namespace ), $row->rc_title ); + $title = Title::MakeTitle( intval( $row->page_namespace ), $row->page_title ); if( $title ) { $date = $row->rc_timestamp; $comments = $title->getTalkPage()->getFullURL(); @@ -379,7 +379,7 @@ class NewPagesPager extends ReverseChronologicalPager { $user = Title::makeTitleSafe( NS_USER, $username ); if( $namespace !== false ) { - $conds['rc_namespace'] = $namespace; + $conds['page_namespace'] = $namespace; $rcIndexes = array( 'new_name_timestamp' ); } else { $rcIndexes = array( 'rc_timestamp' ); @@ -404,7 +404,7 @@ class NewPagesPager extends ReverseChronologicalPager { return array( 'tables' => array( 'recentchanges', 'page' ), - 'fields' => 'rc_namespace,rc_title, rc_cur_id, rc_user,rc_user_text,rc_comment, + 'fields' => 'page_namespace,page_title, rc_cur_id, rc_user,rc_user_text,rc_comment, rc_timestamp,rc_patrolled,rc_id,page_len as length, page_latest as rev_id', 'conds' => $conds, 'options' => array( 'USE INDEX' => array('recentchanges' => $rcIndexes) ) @@ -425,7 +425,7 @@ class NewPagesPager extends ReverseChronologicalPager { while( $row = $this->mResult->fetchObject() ) { $linkBatch->add( NS_USER, $row->rc_user_text ); $linkBatch->add( NS_USER_TALK, $row->rc_user_text ); - $linkBatch->add( $row->rc_namespace, $row->rc_title ); + $linkBatch->add( $row->page_namespace, $row->page_title ); } $linkBatch->execute(); return "