From b0d529d8e28495261cd0b64595f77a71ed42fe45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 15 Jan 2011 13:13:29 +0000 Subject: [PATCH] Do the title construction in a smarter way. Linker can now add mw-redirect class to links. Kept the old div wrapper for compatibility. --- includes/specials/SpecialAllpages.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index 5fa1aa474d..3393914f6e 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -320,7 +320,7 @@ class SpecialAllpages extends IncludableSpecialPage { } $res = $dbr->select( 'page', - array( 'page_namespace', 'page_title', 'page_is_redirect' ), + array( 'page_namespace', 'page_title', 'page_is_redirect', 'page_id' ), $conds, __METHOD__, array( @@ -333,10 +333,10 @@ class SpecialAllpages extends IncludableSpecialPage { if( $res->numRows() > 0 ) { $out = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-chunk' ) ); while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) { - $t = Title::makeTitle( $s->page_namespace, $s->page_title ); + $t = Title::newFromRow( $s ); if( $t ) { $link = ( $s->page_is_redirect ? '
' : '' ) . - $sk->linkKnown( $t, htmlspecialchars( $t->getText() ) ) . + $sk->link( $t ) . ($s->page_is_redirect ? '
' : '' ); } else { $link = '[[' . htmlspecialchars( $s->page_title ) . ']]'; -- 2.20.1